Skip to content

Commit

Permalink
🔧 transfer page conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
roiLeo committed Jul 31, 2023
2 parents 6a782b1 + e0f8cfe commit 93ce85b
Show file tree
Hide file tree
Showing 47 changed files with 1,097 additions and 884 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🐞₷ Bug Report Statemine
description: Create a report to help us improve KodaDot on Statemine
name: 🐞₷ Bug Report Polkadot Assests Hub & Kusama Assets Hub (known as Statemint & Statemine)
description: Create a report to help us improve KodaDot on Assets Hub
title: 'Be descriptive and short'
labels: ['A-statemine', 'bug', 'p2']
body:
Expand Down
3 changes: 2 additions & 1 deletion .github/push_release_production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# experimental
# https://github.com/kodadot/nft-gallery/issues/5770

gh pr list -s merged --json url -B main --jq ".[] | .url" | sed 's/^/- /' $1 | awk 'BEGIN{print "copilot:summary \n"}{ print}' $1 | gh pr create -t "release update" -d -H beta -B production -l release --body-file -
gh pr list -s merged --json url -B main --jq ".[] | .url" | sed 's/^/- /' $1 | awk 'BEGIN{print "copilot:summary \n"}{ print}' $1 | gh pr create -t "release update" -d -H
beta -B production-cf -l release --body-file -
4 changes: 2 additions & 2 deletions components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
ref="mobilSearchRef"
hide-filter
class="is-flex-grow-1 mt-3" />
<a class="cancel-btn p-3" @click="hideMobileSearchBar">
<button class="cancel-btn p-3" @click="hideMobileSearchBar">
{{ $t('cancel') }}
</a>
</button>
</div>
</div>
</div>
Expand Down
117 changes: 117 additions & 0 deletions components/blog/BlogPost.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<template>
<div class="article">
<div
class="is-flex is-justify-content-space-between has-text-grey is-size-5">
<div>{{ attributes.tags }}</div>
<div v-if="attributes.date">
{{ format(new Date(attributes.date), 'dd.MM.yyyy') }}
</div>
</div>
<h1>{{ attributes.title }}</h1>
<p v-if="attributes.subtitle" class="subtitle">{{ attributes.subtitle }}</p>
<img
v-if="attributes.image"
:src="attributes.image"
:alt="attributes.title"
width="100%" />
<component :is="singlePostComponent" />
</div>
</template>

<script setup>
import { format } from 'date-fns'
import { convertMarkdownToText } from '@/utils/markdown'
const { $seoMeta } = useNuxtApp()
const route = useRoute()
const slug = route.params.slug
const attributes = ref({})
const singlePostComponent = ref('')
onMounted(async () => {
const post = await import(`~/content/blog/${slug}.md`)
attributes.value = post.attributes
singlePostComponent.value = post.vue.component
})
const title = computed(() => attributes.value.title)
const meta = computed(() => {
return [
...$seoMeta({
title: attributes.value.title,
description: convertMarkdownToText(attributes.value.subtitle),
url: route.path,
image: attributes.value.image,
}),
]
})
useNuxt2Meta({
title,
meta,
})
</script>

<style lang="scss">
@import '@/styles/abstracts/variables';
.article {
margin: 0 auto;
max-width: 40rem;
.subtitle {
font-size: 25px;
margin-bottom: 0;
}
h1 {
font-size: 3rem;
font-weight: 700;
margin: 1rem 0;
}
h2 {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 1rem;
}
img {
border-radius: 1rem;
margin: 2.5rem 0;
}
p {
font-size: 20px;
line-height: 30px;
margin-bottom: 1rem;
}
@include ktheme() {
.markdown-body {
color: theme('k-accentlight2-dark');
}
img {
border: 1px solid theme('border-color');
}
}
@include touch {
.subtitle {
font-size: 1.25rem;
}
h1 {
font-size: 1.75rem;
}
h2,
p {
font-size: 1rem;
}
}
}
</style>
6 changes: 3 additions & 3 deletions components/gallery/useGalleryItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ export const useGalleryItem = (nftId?: string): GalleryItem => {
const resources = nftEntity.resources?.map((resource) => {
return {
...resource,
src: sanitizeIpfsUrl(resource.meta.animationUrl || resource.src),
thumb: sanitizeIpfsUrl(resource.thumb || resource.meta.image),
animation: sanitizeIpfsUrl(resource.meta.animationUrl),
src: sanitizeIpfsUrl(resource.meta?.animationUrl || resource.src),
thumb: sanitizeIpfsUrl(resource.thumb || resource.meta?.image),
animation: sanitizeIpfsUrl(resource.meta?.animationUrl),
}
})

Expand Down
8 changes: 0 additions & 8 deletions components/items/ItemsGrid/utils/useSearchParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ function useSearchByCollections() {
},
},
]
} else if (route.query.collectionId) {
return [
{
collection: {
id_eq: route.query.collectionId,
},
},
]
}
return []
}),
Expand Down
177 changes: 93 additions & 84 deletions components/massmint/Massmint.vue
Original file line number Diff line number Diff line change
@@ -1,89 +1,78 @@
<template>
<div>
<Loader v-model="isMinting" :status="mintStatus" :can-cancel="false" />
<div class="pt-4">
<div>
<section class="is-flex pb-8 is-flex-wrap-wrap row-gap">
<NeoButton class="mr-8" @click.native="toOnborading">
<NeoIcon icon="arrow-left" size="small" class="mr-1" />
{{ $t('massmint.backToOnbaording') }}
</NeoButton>
<div class="is-flex">
<TabItem
v-for="tab in tabs"
:key="tab"
:active="tab === 'Mass Mint'"
:text="tab"
:to="route.path"
:class="{ 'tab-nft': tab === 'NFT' }"
class="mobile-width" />
<div>
<section class="is-flex controls">
<NeoButton class="left" @click.native="toOnborading">
<NeoIcon icon="arrow-left" size="small" class="mr-1" />
{{ $t('massmint.backToOnbaording') }}
</NeoButton>
<div class="dropdown-container">
<div>
<p class="mb-4">{{ $t('massmint.chooseCollection') }}</p>
<ChooseCollectionDropdown
@selectedCollection="onCollectionSelected" />
</div>
</section>
<hr class="m-0" />
<section
class="pt-8 is-flex is-flex-direction-column is-align-items-center">
<p class="mb-4">{{ $t('massmint.chooseCollection') }}</p>
<ChooseCollectionDropdown
@selectedCollection="onCollectionSelected" />
</section>
<section class="border k-shadow mt-7">
<UploadMediaZip
:disabled="!selectedCollection"
@zipLoaded="onMediaZipLoaded" />
<UploadDescription
:disabled="!mediaLoaded"
@fileLoaded="onDescriptionLoaded" />
<OverviewTable
:disabled="!mediaLoaded"
:nfts="NFTS"
@openSideBarWith="openSideBarWith"
@delete="openDeleteModalWith" />
</section>
</div>
<EditPanel
:nft="nftBeingEdited"
:open="sideBarOpen"
@close="sideBarOpen = false"
@save="updateNFT" />
<div class="mt-6 is-flex is-justify-content-center w-full">
<NeoButton
class="is-flex is-flex-grow-1 limit-width"
variant="k-accent"
size="large"
</div>
</section>

<section class="border k-shadow mt-7">
<UploadMediaZip
:disabled="!selectedCollection"
@zipLoaded="onMediaZipLoaded" />
<UploadDescription
:disabled="!mediaLoaded"
@click.native="openReviewModal">
<span class="is-size-5"
>{{ $t('massmint.mintNFTs') }}
<span v-if="numOfValidNFTs" class="has-text-weight-bold">
({{ numOfValidNFTs }})
</span>
@fileLoaded="onDescriptionLoaded" />
<OverviewTable
:disabled="!mediaLoaded"
:nfts="NFTS"
@openSideBarWith="openSideBarWith"
@delete="openDeleteModalWith" />
</section>
</div>
<EditPanel
:nft="nftBeingEdited"
:open="sideBarOpen"
@close="sideBarOpen = false"
@save="updateNFT" />
<div class="mt-6 is-flex is-justify-content-center w-full">
<NeoButton
class="is-flex is-flex-grow-1 limit-width"
variant="k-accent"
size="large"
:disabled="!mediaLoaded"
@click.native="openReviewModal">
<span class="is-size-5"
>{{ $t('massmint.mintNFTs') }}
<span v-if="numOfValidNFTs" class="has-text-weight-bold">
({{ numOfValidNFTs }})
</span>
</NeoButton>
</div>
<DeleteModal
v-if="nftInDeleteModal"
v-model="deleteModalOpen"
:nft="nftInDeleteModal"
@close="closeDeleteModal"
@delete="deleteNFT" />
<MissingInfoModal
v-model="missingInfoModalOpen"
:num-missing-names="numberOfMissingNames"
:num-missing-descriptions="numberOfMissingDescriptions"
:num-missing-prices="numberOfMissingPrices"
@close="missingInfoModalOpen = false" />
<ReviewModal
v-model="overViewModalOpen"
:num-missing-descriptions="numberOfMissingDescriptions"
:num-missing-prices="numberOfMissingPrices"
:num-nfts="Object.keys(NFTS).length"
@close="overViewModalOpen = false"
@mint="startMint" />
<MintingModal
v-model="mintModalOpen"
:loading="isMinting"
@close="mintModalOpen = false" />
</span>
</NeoButton>
</div>
<DeleteModal
v-if="nftInDeleteModal"
v-model="deleteModalOpen"
:nft="nftInDeleteModal"
@close="closeDeleteModal"
@delete="deleteNFT" />
<MissingInfoModal
v-model="missingInfoModalOpen"
:num-missing-names="numberOfMissingNames"
:num-missing-descriptions="numberOfMissingDescriptions"
:num-missing-prices="numberOfMissingPrices"
@close="missingInfoModalOpen = false" />
<ReviewModal
v-model="overViewModalOpen"
:num-missing-descriptions="numberOfMissingDescriptions"
:num-missing-prices="numberOfMissingPrices"
:num-nfts="Object.keys(NFTS).length"
@close="overViewModalOpen = false"
@mint="startMint" />
<MintingModal
v-model="mintModalOpen"
:loading="isMinting"
@close="mintModalOpen = false" />
</div>
</template>

Expand All @@ -109,7 +98,6 @@ import { FileObject } from '@/composables/massmint/useZipValidator'
const preferencesStore = usePreferencesStore()
const { $consola, $i18n } = useNuxtApp()
const router = useRouter()
const route = useRoute()
const { urlPrefix } = usePrefix()
const selectedCollection = ref<MintedCollection>()
Expand Down Expand Up @@ -199,8 +187,6 @@ const startMint = () => {
)
}
const tabs = ['Collection', 'NFT', 'Mass Mint']
const onCollectionSelected = (collection) => {
selectedCollection.value = collection
}
Expand Down Expand Up @@ -259,8 +245,31 @@ const onDescriptionLoaded = (entries: Record<string, Entry>) => {
}
</script>
<style lang="scss" scoped>
.row-gap {
row-gap: 2rem;
@import '@/styles/abstracts/variables.scss';
.controls {
justify-content: center;
align-items: flex-end;
.left {
position: absolute;
left: 2.5rem;
}
}
@include touch {
.controls {
flex-direction: column;
gap: 2rem;
align-items: flex-start;
.dropdown-container {
align-self: center;
}
.left {
position: unset;
}
}
}
.limit-width {
Expand Down
1 change: 1 addition & 0 deletions components/navbar/NavbarExploreOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<nuxt-link
:to="`/${urlPrefix}/explore/items`"
class="menu-item mr-2"
data-cy="explore-items"
@click.native="emit('closeMobileNavbar')">
{{ $t('items') }}
</nuxt-link>
Expand Down
Loading

0 comments on commit 93ce85b

Please sign in to comment.