diff --git a/.env.example b/.env.example index d207e8e3a1..443e9cba89 100644 --- a/.env.example +++ b/.env.example @@ -14,3 +14,4 @@ SUBSQUID_ENDPOINT="" RAMP_API_KEY="" TRANSAK_API_KEY="" TRANSAK_ENV="" #STAGING|PRODUCTION +WALLET_CONNECT_PROJECT_ID="" diff --git a/.github/diagram.svg b/.github/diagram.svg index d1b4501176..bd944d0893 100644 --- a/.github/diagram.svg +++ b/.github/diagram.svg @@ -1 +1 @@ -utilsutilsteststestsstoresstoresservicesservicesqueriesqueriesparamsparamspagespageslibslibscomposablescomposablescomponentscomponentspublicpublicconfigconfige2ee2esubsquidsubsquid[prefix][prefix]uiuistaticstatictransactiontransactionmassmintmassmintdropdroptransfertransferteleportteleportsharedsharedseriesseriessearchsearchrmrkrmrkprofileprofilemigratemigratemassmintmassmintlandinglandingitemsitemsidentityidentitygallerygalleryexploreexploredropsdropscreatecreatecommoncommoncollectioncollectioncodeCheckercodeCheckercarouselcarouselbsxbsxdropdropblogbloggeneralgeneralsrcsrcfiltersfiltersGalleryGallerycreatecreatestepsstepslandinglandingItemsGridItemsGridlistingCartlistingCartunlockableunlockabledropdropactivityactivitycomponentscomponentsmodulesmoduleseventseventsMediaItemMediaItem.ahk.csv.filters.graphql.html.js.mjs.scss.tab.ts.txt.ui.vue.xml.yamleach dot sized by file size \ No newline at end of file +utilsutilsteststestsstoresstoresservicesservicesqueriesqueriesparamsparamspagespageslibslibscomposablescomposablescomponentscomponentspublicpublicconfigconfige2ee2esubsquidsubsquid[prefix][prefix]uiuistaticstatictransactiontransactionmassmintmassmintdropdroptransfertransfersharedsharedsearchsearchrmrkrmrkprofileprofilemigratemigratemassmintmassmintlandinglandingitemsitemsidentityidentitygallerygalleryexploreexploredropsdropscreatecreatecommoncommoncollectioncollectioncodeCheckercodeCheckercarouselcarouselbsxbsxblogbloggeneralgeneralsrcsrcfiltersfiltersGalleryGallerycreatecreatestepsstepslandinglandingItemsGridItemsGridlistingCartlistingCartunlockableunlockabledropdropactivityactivitycomponentscomponentsmodulesmoduleseventseventsMediaItemMediaItem.ahk.csv.filters.graphql.html.js.mjs.scss.tab.ts.txt.ui.vue.xml.yamleach dot sized by file size \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..b751658b78 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,34 @@ +name: 'Close stale issues' +on: + schedule: + # run at 12:00 every day + - cron: '0 0 * * SAT' + + +permissions: + issues: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # start from the oldest issues when performing stale operations + ascending: true + days-before-issue-stale: 720 + days-before-issue-close: 120 + + stale-issue-label: stale + exempt-issue-labels: chief + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + activity in last 720 days. It will be closed in 120 days if no further activity occurs. Please @kodadot/internal + + feel free to leave a comment if you believe the issue is still relevant. + Thank you for your contributions! + close-issue-message: > + This issue has been automatically closed because it has not had any further + activity in the last 120 days. Thank you for your contributions! + diff --git a/assets/styles/pages/create.scss b/assets/styles/pages/create.scss deleted file mode 100644 index c610b62f34..0000000000 --- a/assets/styles/pages/create.scss +++ /dev/null @@ -1,42 +0,0 @@ -@import '@/assets/styles/abstracts/variables'; - -:deep(.o-field__label) { - margin-bottom: 4px; -} - -.o-field:not(:last-child) { - margin-bottom: 2rem; -} - -.form-addons { - @apply text-center leading-[3rem] h-12 w-16 border-l-[none]; - @include ktheme() { - border: 1px solid theme('card-border-color'); - } -} - -.sale :deep(.o-field__label) { - position: relative; - -webkit-text-stroke: 1px #000; - filter: drop-shadow(1px 1px #000); - font-weight: 700; - font-size: 18px; -} - -.sale { - position: relative; -} - -.hidden-sale-label { - @apply absolute pointer-events-none text-transparent bg-clip-text font-bold text-lg left-0 top-0; - background: linear-gradient(to right, white, white, white); - -webkit-text-stroke: 0; - -webkit-background-clip: text; -} - -.sale.sale-on { - .hidden-sale-label { - background: linear-gradient(90deg, #ffffff 30%, #ff7ac3 100%); - background-clip: text; - } -} diff --git a/components/BackablePage.vue b/components/BackablePage.vue new file mode 100644 index 0000000000..c774c98ed9 --- /dev/null +++ b/components/BackablePage.vue @@ -0,0 +1,24 @@ + + diff --git a/components/CreateLanding.vue b/components/CreateLanding.vue new file mode 100644 index 0000000000..ff6a7fce99 --- /dev/null +++ b/components/CreateLanding.vue @@ -0,0 +1,33 @@ + diff --git a/components/Navbar.vue b/components/Navbar.vue index 9008f97a58..39c1ae9cc0 100644 --- a/components/Navbar.vue +++ b/components/Navbar.vue @@ -114,12 +114,6 @@ data-testid="learn"> {{ $t('learn') }} - void } | null>(null) const account = computed(() => identityStore.getAuthAddress) -const isCreateVisible = computed(() => createVisible(urlPrefix.value)) - const logoSrc = computed(() => { const variant = isTouch ? 'Koda' : 'Koda_Beta' const color = isDarkMode.value ? '_dark' : '' diff --git a/components/TheFooter.vue b/components/TheFooter.vue index 5d9be0232c..3d040c695b 100644 --- a/components/TheFooter.vue +++ b/components/TheFooter.vue @@ -207,6 +207,11 @@ const menuKodadot: Menu[] = [ url: '/terms-of-use', external: false, }, + { + name: $i18n.t('footer.create'), + url: '/create', + external: false, + }, ] const socials = [ diff --git a/components/base/BaseCollectionForm.vue b/components/base/BaseCollectionForm.vue deleted file mode 100644 index b794eeb12f..0000000000 --- a/components/base/BaseCollectionForm.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - diff --git a/components/base/BaseTokenForm.vue b/components/base/BaseTokenForm.vue deleted file mode 100644 index 13c3abf8b6..0000000000 --- a/components/base/BaseTokenForm.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - diff --git a/components/base/MediaItem.vue b/components/base/MediaItem.vue index a14ca88e9e..aa7aa916dd 100644 --- a/components/base/MediaItem.vue +++ b/components/base/MediaItem.vue @@ -30,9 +30,9 @@ {{ $t('lewd.explicitDesc') }}
- + v-if="hasNormalTag" + class="bg-k-shade border-k-grey text-text-color flex items-center justify-center border rounded-md absolute right-3 top-3 image is-24x24 z-[18]"> +
{ const PREFIX = 'Neo' const SUFFIX = 'Media' - -const isInteractive = computed(() => { - return resolveMedia(mimeType.value) === MediaType.IFRAME && !props.isDetail -}) const type = ref('') +const hasNormalTag = computed(() => { + return ( + props.enableNormalTag && + (props.mimeType || type.value || !props.animationSrc) && // avoid showing normal tag before type has updated + resolveMedia(mimeType.value) !== MediaType.IFRAME && + !props.isDetail + ) +}) const isLewdBlurredLayer = ref(props.isLewd) const components = { NeoImageMedia, diff --git a/components/base/SubmitButton.vue b/components/base/SubmitButton.vue deleted file mode 100644 index 947b4a709d..0000000000 --- a/components/base/SubmitButton.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/components/base/types.ts b/components/base/types.ts index 7704802ec3..b6239b8f30 100644 --- a/components/base/types.ts +++ b/components/base/types.ts @@ -1,23 +1,6 @@ import { ItemResources } from '@/composables/useNft' import type { Prefix } from '@kodadot1/static' -export type BaseMintedCollection = { - id: string - alreadyMinted: number - metadata: string - name?: string - lastIndexUsed: number -} - -export type BaseTokenType = { - name: string - file: File | null - description: string - selectedCollection: T | null - copies: number - secondFile: File | null -} - export interface CarouselNFT extends ItemResources { currentOwner: string id: string diff --git a/components/bsx/Create/GenerativeMint.vue b/components/bsx/Create/GenerativeMint.vue deleted file mode 100644 index 9a4da214ba..0000000000 --- a/components/bsx/Create/GenerativeMint.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - diff --git a/components/bsx/Create/RoyaltyForm.vue b/components/bsx/Create/RoyaltyForm.vue deleted file mode 100644 index 7b41e390d4..0000000000 --- a/components/bsx/Create/RoyaltyForm.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - diff --git a/components/bsx/Create/utils.ts b/components/bsx/Create/utils.ts deleted file mode 100644 index c6cce367c0..0000000000 --- a/components/bsx/Create/utils.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type Token = 'DOT' | 'KSM' - -export const getBalance = (_token?: Token): number => { - const { balance } = useAuth() - - return Number(balance.value) -} diff --git a/components/carousel/module/CarouselMedia.vue b/components/carousel/module/CarouselMedia.vue index 21e685ab28..19885f7813 100644 --- a/components/carousel/module/CarouselMedia.vue +++ b/components/carousel/module/CarouselMedia.vue @@ -15,6 +15,7 @@ :title="item.name" :image-component="NuxtImg" disable-operation + enable-normal-tag :audio-player-cover="imageSrc || ''" audio-hover-on-cover-play /> diff --git a/components/codeChecker/CodeChecker.vue b/components/codeChecker/CodeChecker.vue index f1988cdac2..4e6b9c7f9f 100644 --- a/components/codeChecker/CodeChecker.vue +++ b/components/codeChecker/CodeChecker.vue @@ -104,6 +104,13 @@ + + + @@ -156,6 +163,7 @@ :render="Boolean(selectedFile)" :koda-renderer-used="fileValidity.kodaRendererUsed" :reload-trigger="reloadTrigger" + :index-url="indexUrl" @reload="startClock" @hash:update="(hash) => (previewHash = hash)" /> @@ -163,7 +171,8 @@ v-if="selectedFile && indexContent" class="!mt-11" :assets="assets" - :index-content="indexContent" /> + :index-content="indexContent" + @upload="(value) => (indexUrl = value)" />

@@ -214,11 +223,13 @@ const validtyDefault: Validity = { title: '-', validKodaRenderPayload: 'loading', consistent: 'loading', + externalResourcesNotUsed: 'unknown', } const selectedFile = ref(null) const assets = ref([]) const indexContent = ref() +const indexUrl = ref() const fileName = computed(() => selectedFile.value?.name) const fileValidity = reactive({ ...validtyDefault }) const errorMessage = ref('') @@ -266,6 +277,8 @@ const clear = () => { errorMessage.value = '' reloadTrigger.value = 0 renderCount.value = 0 + indexUrl.value = undefined + indexContent.value = undefined Object.assign(fileValidity, validtyDefault) } diff --git a/components/codeChecker/PreviewCard.vue b/components/codeChecker/PreviewCard.vue index 24b5feb22f..ee7e3fce88 100644 --- a/components/codeChecker/PreviewCard.vue +++ b/components/codeChecker/PreviewCard.vue @@ -7,7 +7,7 @@ class="fixed top-[3rem] left-[3rem] z-[1]" icon-left="chevron-left" @click="toggleFullscreen"> -
{{ $t('massmint.goBack') }}
+
{{ $t('goBack') }}
{{ $t('codeChecker.replayAnimation') }}{{ $t('codeChecker.replay') }} + + @click="toggleFullscreen" />
{{ $t('codeChecker.currentHash') }} @@ -101,6 +109,7 @@ const props = defineProps<{ render: boolean kodaRendererUsed: Passed reloadTrigger: number + indexUrl: string }>() const fullscreenRef = ref(null) @@ -115,11 +124,17 @@ const count = ref(0) const variationCounter = ref(0) const selectedVariation = ref(variationOptions[0]) +const codeShareLink = computed(() => + props.indexUrl ? `${props.indexUrl}?hash=${hash.value}` : null, +) + useMediaFullscreen({ ref: fullscreenRef, isFullscreen, }) +const openInNewTab = () => window.open(codeShareLink.value, '_blank') + const newHash = () => { hash.value = generateRandomHash() emit('reload') diff --git a/components/codeChecker/issueHint/NotUsingExternalResources.vue b/components/codeChecker/issueHint/NotUsingExternalResources.vue new file mode 100644 index 0000000000..87f2d62768 --- /dev/null +++ b/components/codeChecker/issueHint/NotUsingExternalResources.vue @@ -0,0 +1,17 @@ + + + diff --git a/components/codeChecker/massPreview/Capture.vue b/components/codeChecker/massPreview/Capture.vue index 6b037fea65..3c4b0f3743 100644 --- a/components/codeChecker/massPreview/Capture.vue +++ b/components/codeChecker/massPreview/Capture.vue @@ -15,16 +15,16 @@
- +
@@ -33,13 +33,15 @@ diff --git a/components/collection/HeroButtons.vue b/components/collection/HeroButtons.vue index cd88dac986..58bdb8d393 100644 --- a/components/collection/HeroButtons.vue +++ b/components/collection/HeroButtons.vue @@ -69,7 +69,6 @@
- props.address), }) -provide('address', props.address) provide( - 'shortenedAddress', - computed(() => shortenedAddress.value), + 'address', + computed(() => props.address), ) +provide('shortenedAddress', shortenedAddress) +provide('identity', identity) diff --git a/components/collection/drop/GenerativeLayout.vue b/components/collection/drop/GenerativeLayout.vue index 510b4dd7dc..746bb871a4 100644 --- a/components/collection/drop/GenerativeLayout.vue +++ b/components/collection/drop/GenerativeLayout.vue @@ -65,7 +65,7 @@ + :user-minted-count="userMintsCount" /> @@ -89,8 +89,8 @@ const mdBreakpoint = 768 const emit = defineEmits(['mint']) const { drop } = useDrop() -const { previewItem } = storeToRefs(useDropStore()) -const { mintedAmountForCurrentUser, description } = useCollectionEntity() +const { previewItem, userMintsCount } = storeToRefs(useDropStore()) +const { description } = useCollectionEntity() const { width } = useWindowSize() const { emitEvent, completeLastEvent } = useCursorDropEvents() diff --git a/components/collection/drop/GenerativePreview.vue b/components/collection/drop/GenerativePreview.vue index 80ed895c62..8cb08edde4 100644 --- a/components/collection/drop/GenerativePreview.vue +++ b/components/collection/drop/GenerativePreview.vue @@ -2,12 +2,19 @@
- +
+ + +
drop.value.price), @@ -111,7 +116,7 @@ const mintedPercent = computed(() => { if (!maxCount.value) { return 0 } - return Math.round((dropStore.mintsCount / maxCount.value) * 100) + return Math.round((mintsCount.value / maxCount.value) * 100) }) const displayUrl = computed(() => generativeImageUrl.value || drop.value?.image) @@ -124,7 +129,7 @@ const generateNft = () => { startTimer() const previewItem = generatePreviewItem({ - entropyRange: getEntropyRange(mintedAmountForCurrentUser.value), + entropyRange: getEntropyRange(userMintsCount.value), accountId: accountId.value, content: drop.value.content, }) @@ -142,10 +147,7 @@ watch(imageDataLoaded, () => { } }) -watch( - [accountId, () => drop.value.content, mintedAmountForCurrentUser], - generateNft, -) +watch([accountId, () => drop.value.content, userMintsCount], generateNft) onMounted(() => { setTimeout(generateNft, 500) diff --git a/components/collection/drop/MintButton.vue b/components/collection/drop/MintButton.vue index 337c931892..5b859eb2fc 100644 --- a/components/collection/drop/MintButton.vue +++ b/components/collection/drop/MintButton.vue @@ -19,9 +19,7 @@ diff --git a/components/common/ChainDropdown.vue b/components/common/ChainDropdown.vue index 7a058ecf94..fd0f84f18e 100644 --- a/components/common/ChainDropdown.vue +++ b/components/common/ChainDropdown.vue @@ -46,7 +46,7 @@ const props = withDefaults( const route = useRoute() const { setUrlPrefix, urlPrefix } = usePrefix() -const { availableChains: allChains } = useChain() +const allChains = useAvailableChainsOptions() const { redirectAfterChainChange } = useChainRedirect() const { isMobile } = useViewport() diff --git a/components/common/ChooseCollectionDropdown.vue b/components/common/ChooseCollectionDropdown.vue deleted file mode 100644 index 91f24ca0dd..0000000000 --- a/components/common/ChooseCollectionDropdown.vue +++ /dev/null @@ -1,143 +0,0 @@ - - - - diff --git a/components/common/ConnectWallet/ConnectEvm.vue b/components/common/ConnectWallet/ConnectEvm.vue new file mode 100644 index 0000000000..772f5199c7 --- /dev/null +++ b/components/common/ConnectWallet/ConnectEvm.vue @@ -0,0 +1,45 @@ + + diff --git a/components/common/ConnectWallet/ConnectSubstrate.vue b/components/common/ConnectWallet/ConnectSubstrate.vue new file mode 100644 index 0000000000..ebb8e98e7e --- /dev/null +++ b/components/common/ConnectWallet/ConnectSubstrate.vue @@ -0,0 +1,126 @@ + + diff --git a/components/common/ConnectWallet/ConnectWalletModal.vue b/components/common/ConnectWallet/ConnectWalletModal.vue index b4d61f1724..0de9ba6c8e 100644 --- a/components/common/ConnectWallet/ConnectWalletModal.vue +++ b/components/common/ConnectWallet/ConnectWalletModal.vue @@ -4,163 +4,76 @@ data-testid="wallet-connect-sidebar-modal"> +
-
diff --git a/components/common/ConnectWallet/MnemonicNotice.vue b/components/common/ConnectWallet/MnemonicNotice.vue new file mode 100644 index 0000000000..7ccf731f9f --- /dev/null +++ b/components/common/ConnectWallet/MnemonicNotice.vue @@ -0,0 +1,18 @@ + diff --git a/components/common/ConnectWallet/WalletAsset.vue b/components/common/ConnectWallet/WalletAsset.vue index 02d0015c9a..90e3cd7259 100644 --- a/components/common/ConnectWallet/WalletAsset.vue +++ b/components/common/ConnectWallet/WalletAsset.vue @@ -4,9 +4,11 @@ -
+
@@ -25,9 +27,10 @@ const MultipleBalances = defineAsyncComponent( const identityStore = useIdentityStore() const { $consola } = useNuxtApp() +const { getIsSubstrate } = storeToRefs(useWalletStore()) onMounted(async () => { - if (identityStore.getAuthAddress) { + if (identityStore.getAuthAddress && getIsSubstrate.value) { $consola.log('fetching balance...') await identityStore.fetchBalance({ address: identityStore.getAuthAddress, diff --git a/components/common/ConnectWallet/WalletAssetIdentity.vue b/components/common/ConnectWallet/WalletAssetIdentity.vue index 23d1c492d9..197e67cf84 100644 --- a/components/common/ConnectWallet/WalletAssetIdentity.vue +++ b/components/common/ConnectWallet/WalletAssetIdentity.vue @@ -39,7 +39,7 @@ import { NeoIcon } from '@kodadot1/brick' import { useIdentityStore } from '@/stores/identity' import { useShoppingCartStore } from '@/stores/shoppingCart' -import { useWalletStore, walletHistory } from '@/stores/wallet' +import { useWalletStore } from '@/stores/wallet' const identityStore = useIdentityStore() const shoppingCartStore = useShoppingCartStore() @@ -58,12 +58,20 @@ const { display, shortenedAddress } = useIdentity({ const closeModal = () => neoModal.closeAll() -const logout = () => { +const { disconnect: disconnectWeb3Modal } = useWagmi() + +const logout = async () => { identityStore.resetAuth() sessionStorage.clear() localStorage.clear() shoppingCartStore.clear() - walletHistory.value = walletStore.history + const isEvm = walletStore.getIsEvm + walletStore.setDisconnecting(true) + walletStore.clear() + if (isEvm) { + await disconnectWeb3Modal() + } + walletStore.setDisconnecting(false) } diff --git a/components/common/ConnectWallet/WalletAssetMenu.vue b/components/common/ConnectWallet/WalletAssetMenu.vue index 09c2b8b9fd..6701cf2615 100644 --- a/components/common/ConnectWallet/WalletAssetMenu.vue +++ b/components/common/ConnectWallet/WalletAssetMenu.vue @@ -1,11 +1,12 @@ diff --git a/components/create/Confirm/ConfirmMintItem.vue b/components/create/Confirm/ConfirmMintItem.vue deleted file mode 100644 index 3932438a2c..0000000000 --- a/components/create/Confirm/ConfirmMintItem.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - diff --git a/components/create/Confirm/MintConfirmModal.vue b/components/create/Confirm/MintConfirmModal.vue deleted file mode 100644 index 434d94c428..0000000000 --- a/components/create/Confirm/MintConfirmModal.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/components/create/Confirm/PriceItem.vue b/components/create/Confirm/PriceItem.vue deleted file mode 100644 index 4058e99595..0000000000 --- a/components/create/Confirm/PriceItem.vue +++ /dev/null @@ -1,161 +0,0 @@ - - - diff --git a/components/create/CreateCollection.vue b/components/create/CreateCollection.vue deleted file mode 100644 index 5604c2ab75..0000000000 --- a/components/create/CreateCollection.vue +++ /dev/null @@ -1,430 +0,0 @@ - - - - - diff --git a/components/create/CreateLanding.vue b/components/create/CreateLanding.vue deleted file mode 100644 index 17affe8f0f..0000000000 --- a/components/create/CreateLanding.vue +++ /dev/null @@ -1,202 +0,0 @@ - - - - - diff --git a/components/create/CreateNft.vue b/components/create/CreateNft.vue deleted file mode 100644 index b8d0183726..0000000000 --- a/components/create/CreateNft.vue +++ /dev/null @@ -1,636 +0,0 @@ - - - - - - - diff --git a/components/create/CreateNftPreview.vue b/components/create/CreateNftPreview.vue deleted file mode 100644 index 59406ae96d..0000000000 --- a/components/create/CreateNftPreview.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/components/create/modals/CollectionSuccessModal.vue b/components/create/modals/CollectionSuccessModal.vue deleted file mode 100644 index 51b1aef069..0000000000 --- a/components/create/modals/CollectionSuccessModal.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - diff --git a/components/drops/useDrops.ts b/components/drops/useDrops.ts index eba3c1e42a..a0210bee8c 100644 --- a/components/drops/useDrops.ts +++ b/components/drops/useDrops.ts @@ -194,17 +194,23 @@ export const fetchDropMintedCount = async ( } const subscribeDropMintedCount = ( - drop: Pick, - onChange: (count: number | undefined) => void, + { drop, account }: { drop: Pick; account: string }, + onChange: (params: { collection?: number; user?: number }) => void, ) => { return useSubscriptionGraphql({ query: ` collectionEntityById(id: "${drop.collection}") { nftCount + nfts(where: { issuer_eq: "${account}" }) { + id + } } `, onChange: ({ data }) => { - onChange(data.collectionEntityById?.nftCount) + onChange({ + collection: data.collectionEntityById?.nftCount, + user: data.collectionEntityById?.nfts?.length, + }) }, }) } @@ -212,40 +218,40 @@ const subscribeDropMintedCount = ( export const useDropStatus = ( drop: WritableComputedRef<{ collection: string; chain: Prefix }>, ) => { - const dropStore = useDropStore() + const { mintsCount, userMintsCount } = storeToRefs(useDropStore()) + const { accountId } = useAuth() const dropStatusSubscription = ref<{ collection: string | undefined + account: string | undefined unsubscribe: () => void }>({ + account: undefined, collection: undefined, unsubscribe: () => {}, }) - const mintsCount = computed({ - get: () => dropStore.mintsCount, - set: (value) => dropStore.setMintedDropCount(value), - }) - const subscribeDropStatus = () => { - watch( - () => drop.value, - (drop) => { - if (drop) { - if (drop.collection !== dropStatusSubscription.value.collection) { - dropStatusSubscription.value.unsubscribe?.() - } - - dropStatusSubscription.value.collection = drop.collection - dropStatusSubscription.value.unsubscribe = subscribeDropMintedCount( - drop, - (count) => { - mintsCount.value = count ?? 0 - }, - ) + watch([() => drop.value, accountId], ([drop, account]) => { + if (drop) { + if ( + drop.collection !== dropStatusSubscription.value.collection || + account !== dropStatusSubscription.value.account + ) { + dropStatusSubscription.value.unsubscribe?.() } - }, - ) + + dropStatusSubscription.value.collection = drop.collection + dropStatusSubscription.value.account = accountId.value + dropStatusSubscription.value.unsubscribe = subscribeDropMintedCount( + { drop, account: accountId.value }, + ({ collection, user }) => { + mintsCount.value = collection ?? 0 + userMintsCount.value = user ?? 0 + }, + ) + } + }) onUnmounted(() => dropStatusSubscription.value.unsubscribe?.()) } diff --git a/components/gallery/GalleryItem.vue b/components/gallery/GalleryItem.vue index ac81e2fa7e..b6d305d190 100644 --- a/components/gallery/GalleryItem.vue +++ b/components/gallery/GalleryItem.vue @@ -18,7 +18,7 @@ class="back-button z-20" @click="toggleFullscreen"> - {{ $t('go back') }} + {{ $t('goBack') }} diff --git a/components/gallery/GalleryItemDescription.vue b/components/gallery/GalleryItemDescription.vue index cc7102e514..e906e56acc 100644 --- a/components/gallery/GalleryItemDescription.vue +++ b/components/gallery/GalleryItemDescription.vue @@ -186,6 +186,7 @@ :src="parent?.nftImage.value" :animation-src="parent?.nftAnimation.value" :title="parent?.nftMetadata?.value?.name" + enable-normal-tag is-detail />
+
+defineExpose({ refresh }) + diff --git a/components/identity/module/IdentityPopoverHeader.vue b/components/identity/module/IdentityPopoverHeader.vue index 766afd7761..f535d70fb2 100644 --- a/components/identity/module/IdentityPopoverHeader.vue +++ b/components/identity/module/IdentityPopoverHeader.vue @@ -1,33 +1,35 @@ @@ -35,10 +37,13 @@ diff --git a/components/identity/utils/useIdentityStats.ts b/components/identity/utils/useIdentityStats.ts index 135f8ccca3..16b0ef927e 100644 --- a/components/identity/utils/useIdentityStats.ts +++ b/components/identity/utils/useIdentityStats.ts @@ -43,17 +43,11 @@ const whichData = ({ data, type }) => { return totalCount[type] || 0 } -const cacheTotalCount = ({ data, totalCreated, totalCollected, totalSold }) => { +const cacheTotalCount = ({ data, totalCreated }) => { const cacheData = { created: { totalCount: totalCreated, }, - collected: { - totalCount: totalCollected, - }, - sold: { - totalCount: totalSold, - }, firstMintDate: data.value?.firstMint[0]?.createdAt || new Date(), updatedAt: Date.now(), } @@ -64,9 +58,7 @@ const cacheTotalCount = ({ data, totalCreated, totalCollected, totalSold }) => { export default function useIdentityStats({ address }) { const identityMintStore = useIdentityMintStore() - const totalCollected = ref(0) const totalCreated = ref(0) - const totalSold = ref(0) const firstMintDate = ref(new Date()) const { lastBoughtDate } = useLastBought({ address }) @@ -82,8 +74,6 @@ export default function useIdentityStats({ address }) { const handleNFTStats = ({ data, type }) => { totalCreated.value = whichData({ data, type: 'created' }) - totalCollected.value = whichData({ data, type: 'collected' }) - totalSold.value = whichData({ data, type: 'sold' }) if (type === 'cache') { firstMintDate.value = data.firstMintDate @@ -93,8 +83,6 @@ export default function useIdentityStats({ address }) { const cacheData = cacheTotalCount({ data, totalCreated: totalCreated.value, - totalCollected: totalCollected.value, - totalSold: totalSold.value, }) firstMintDate.value = cacheData.firstMintDate @@ -118,9 +106,7 @@ export default function useIdentityStats({ address }) { watch(stats, fetchNFTStats) return { - totalCollected, totalCreated, - totalSold, lastBought, startedMinting, } diff --git a/components/massmint/EditPanel.vue b/components/massmint/EditPanel.vue deleted file mode 100644 index c97d6af487..0000000000 --- a/components/massmint/EditPanel.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - - - diff --git a/components/massmint/Massmint.vue b/components/massmint/Massmint.vue deleted file mode 100644 index 67ed5db356..0000000000 --- a/components/massmint/Massmint.vue +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - diff --git a/components/massmint/OnBoarding.vue b/components/massmint/OnBoarding.vue deleted file mode 100644 index bca6f82b07..0000000000 --- a/components/massmint/OnBoarding.vue +++ /dev/null @@ -1,295 +0,0 @@ - - - - - diff --git a/components/massmint/OnBoardingCard.vue b/components/massmint/OnBoardingCard.vue deleted file mode 100644 index 8141ac4675..0000000000 --- a/components/massmint/OnBoardingCard.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - diff --git a/components/massmint/OverviewTable.vue b/components/massmint/OverviewTable.vue deleted file mode 100644 index 4f665d0483..0000000000 --- a/components/massmint/OverviewTable.vue +++ /dev/null @@ -1,178 +0,0 @@ - - - diff --git a/components/massmint/descriptionTabs.ts b/components/massmint/descriptionTabs.ts deleted file mode 100644 index 991a29d33e..0000000000 --- a/components/massmint/descriptionTabs.ts +++ /dev/null @@ -1,62 +0,0 @@ -export const descriptionTabs = { - JSON: { - label: 'JSON', - fileStructureDescription: ` - \`\`\`json - [ - { - "file": "file1.jpg", - "name": "Image1", - "description": "This is an image", - "price": 2.45 - }, - { - "file": "file2.jpg", - "name": "Image2", - "price": 200 - }, - { - "file": "file3.jpg", - "description": "This is another image" - } - ] - \`\`\` - `, - }, - - // https://highlightjs.readthedocs.io/en/latest/supported-languages.html - // csv is not supported by highlight.js - // properties gives a decent highlighting - CSV: { - label: 'CSV', - fileStructureDescription: ` - \`\`\`properties - file,name,description,price - file1.jpg,Image1,This is an image,100 - file2.jpg,Image2,,200 - file3.jpg,,This is another image, - \`\`\` - `, - }, - // https://highlightjs.readthedocs.io/en/latest/supported-languages.html - // properties gives a better highlighting then txt - TXT: { - label: 'TXT', - fileStructureDescription: ` - \`\`\`properties - file: file1.jpg - name: Image1 - description: This is an image - price: 100 KSM - - file: file2.jpg - name: Image2 - price: 200 - - file: file3.jpg - description: This is another image - price: 1 - \`\`\` - `, - }, -} diff --git a/components/massmint/modals/DeleteModal.vue b/components/massmint/modals/DeleteModal.vue deleted file mode 100644 index 4d3ea9b59e..0000000000 --- a/components/massmint/modals/DeleteModal.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/components/massmint/modals/MintingModal.vue b/components/massmint/modals/MintingModal.vue deleted file mode 100644 index 54aa7dd2e4..0000000000 --- a/components/massmint/modals/MintingModal.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/components/massmint/modals/MissingInfoModal.vue b/components/massmint/modals/MissingInfoModal.vue deleted file mode 100644 index ddbebda7d6..0000000000 --- a/components/massmint/modals/MissingInfoModal.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - diff --git a/components/massmint/modals/MobileDisclaimerModal.vue b/components/massmint/modals/MobileDisclaimerModal.vue deleted file mode 100644 index 3c03ec8417..0000000000 --- a/components/massmint/modals/MobileDisclaimerModal.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/components/massmint/modals/ReviewModal.vue b/components/massmint/modals/ReviewModal.vue deleted file mode 100644 index 0a3d41b5dc..0000000000 --- a/components/massmint/modals/ReviewModal.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - diff --git a/components/massmint/modals/index.ts b/components/massmint/modals/index.ts deleted file mode 100644 index 808fd001d7..0000000000 --- a/components/massmint/modals/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as MintingModal } from './MintingModal.vue' -export { default as MissingInfoModal } from './MissingInfoModal.vue' -export { default as MobileDisclaimerModal } from './MobileDisclaimerModal.vue' -export { default as DeleteModal } from './DeleteModal.vue' -export { default as ReviewModal } from './ReviewModal.vue' diff --git a/components/massmint/types.ts b/components/massmint/types.ts deleted file mode 100644 index ea738ec754..0000000000 --- a/components/massmint/types.ts +++ /dev/null @@ -1,26 +0,0 @@ -export enum Status { - Ok = 'Ok', - Incomplete = 'Incomplete', - Description = 'Description', - Price = 'Price', - Optional = 'Optional', -} - -export type NFT = { - id: number - imageUrl: string - name?: string - file: File - description?: string - price?: number - status?: Status -} - -export type NFTToMint = { - name: string - file: File - description?: string - price?: number -} - -export type NFTS = { [id: string]: NFT } diff --git a/components/massmint/uploadCompressedMedia/UploadCompressedMedia.vue b/components/massmint/uploadCompressedMedia/UploadCompressedMedia.vue deleted file mode 100644 index fc8b2ad05b..0000000000 --- a/components/massmint/uploadCompressedMedia/UploadCompressedMedia.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - diff --git a/components/massmint/uploadDescription/UploadDescription.vue b/components/massmint/uploadDescription/UploadDescription.vue deleted file mode 100644 index 57bd57da34..0000000000 --- a/components/massmint/uploadDescription/UploadDescription.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/components/navbar/ChainSelectDropdown.vue b/components/navbar/ChainSelectDropdown.vue index ec5ced3b1d..5e876d6096 100644 --- a/components/navbar/ChainSelectDropdown.vue +++ b/components/navbar/ChainSelectDropdown.vue @@ -9,7 +9,7 @@ urlPrefix.value, diff --git a/components/navbar/CreateDropdown.vue b/components/navbar/CreateDropdown.vue deleted file mode 100644 index 96fee3189f..0000000000 --- a/components/navbar/CreateDropdown.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/components/profile/ButtonConfig.vue b/components/profile/ButtonConfig.vue new file mode 100644 index 0000000000..65bfb34ee7 --- /dev/null +++ b/components/profile/ButtonConfig.vue @@ -0,0 +1,27 @@ + + diff --git a/components/profile/FollowButton.vue b/components/profile/FollowButton.vue new file mode 100644 index 0000000000..eda6ea56f3 --- /dev/null +++ b/components/profile/FollowButton.vue @@ -0,0 +1,128 @@ + + diff --git a/components/profile/ProfileActivitySummery.vue b/components/profile/ProfileActivitySummery.vue index 2795e672d6..6397fb1445 100644 --- a/components/profile/ProfileActivitySummery.vue +++ b/components/profile/ProfileActivitySummery.vue @@ -10,7 +10,7 @@ {{ $t(item.label) }}
-
+
+ class="collection-banner-content flex md:items-end items-center h-full md:pb-7 max-sm:mx-5 mx-12 2xl:mx-auto max-w-[89rem]">
+ class="!rounded-full overflow-hidden p-2.5 bg-background-color border aspect-square"> + class="md:w-[124px] md:h-[124px] h-[78px] w-[78px] object-cover rounded-full" />
@@ -40,7 +40,7 @@
-

+

{{ userProfile.name }}
- - - {{ buttonConfig.label }} - + + +