From 6bdc2eeeb6743b37b3dece00361f8e44f44ac702 Mon Sep 17 00:00:00 2001 From: roiLeo Date: Mon, 13 Nov 2023 16:09:51 +0100 Subject: [PATCH 001/161] =?UTF-8?q?=F0=9F=9A=A7=20wip:=20customize=20colle?= =?UTF-8?q?ction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/collection/CustomizeModal.vue | 63 +++++++++++++++++++ .../HeroButtonCustomizeCollection.vue | 48 ++++++++++++++ components/collection/HeroButtons.vue | 12 ++-- composables/transaction/types.ts | 1 + pnpm-lock.yaml | 2 +- .../general/collectionByIdMinimal.graphql | 1 + 6 files changed, 119 insertions(+), 8 deletions(-) create mode 100644 components/collection/CustomizeModal.vue create mode 100644 components/collection/HeroButtonCustomizeCollection.vue diff --git a/components/collection/CustomizeModal.vue b/components/collection/CustomizeModal.vue new file mode 100644 index 0000000000..c03e9ed550 --- /dev/null +++ b/components/collection/CustomizeModal.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/components/collection/HeroButtonCustomizeCollection.vue b/components/collection/HeroButtonCustomizeCollection.vue new file mode 100644 index 0000000000..2aca241755 --- /dev/null +++ b/components/collection/HeroButtonCustomizeCollection.vue @@ -0,0 +1,48 @@ + + + diff --git a/components/collection/HeroButtons.vue b/components/collection/HeroButtons.vue index be00e802ff..881082267e 100644 --- a/components/collection/HeroButtons.vue +++ b/components/collection/HeroButtons.vue @@ -63,11 +63,10 @@
- - - + + +
{{ $i18n.t('moreActions.reportCollection') }} @@ -96,8 +95,6 @@ import { NeoModal, } from '@kodadot1/brick' import { useCollectionMinimal } from '@/components/collection/utils/useCollectionDetails' -import HeroButtonDeleteCollection from './HeroButtonDeleteCollection.vue' -import HeroButtonDeleteNfts from './HeroButtonDeleteNfts.vue' const route = useRoute() const { isCurrentOwner } = useAuth() @@ -114,6 +111,7 @@ const { collection } = useCollectionMinimal({ collectionId: collectionId.value, }) const collectionIssuer = computed(() => collection.value?.issuer) +const collectionNftCount = computed(() => collection.value?.nftCount) const { twitter } = useIdentity({ address: collectionIssuer, diff --git a/composables/transaction/types.ts b/composables/transaction/types.ts index 2525ee686e..c1d856d55e 100644 --- a/composables/transaction/types.ts +++ b/composables/transaction/types.ts @@ -180,6 +180,7 @@ export interface ActionMintCollection { export enum Collections { DELETE = 'delete', + SET_MAX_SUPPLY = 'setCollectionMaxSupply', } export type ActionsInteractions = Interaction | ShoppingActions | Collections diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 65794c6461..c05acea267 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' settings: autoInstallPeers: false diff --git a/queries/subsquid/general/collectionByIdMinimal.graphql b/queries/subsquid/general/collectionByIdMinimal.graphql index 3c45c88c22..970e7afe89 100644 --- a/queries/subsquid/general/collectionByIdMinimal.graphql +++ b/queries/subsquid/general/collectionByIdMinimal.graphql @@ -10,6 +10,7 @@ query collectionByIdMinimal($id: String!) { name type } + nftCount metadata name currentOwner From 733304a4b9c373591c7e4477598499e78094a97d Mon Sep 17 00:00:00 2001 From: Preschian Febryantara Date: Thu, 23 Nov 2023 17:03:57 +0700 Subject: [PATCH 002/161] fix: show migrate waiting --- components/migrate/landing/content/Waiting.vue | 15 +-------------- locales/en.json | 4 +--- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/components/migrate/landing/content/Waiting.vue b/components/migrate/landing/content/Waiting.vue index 9d913a2f2f..3a73283e09 100644 --- a/components/migrate/landing/content/Waiting.vue +++ b/components/migrate/landing/content/Waiting.vue @@ -1,6 +1,6 @@ diff --git a/locales/en.json b/locales/en.json index d583347be1..b46173a270 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1477,8 +1477,6 @@ "cta": "Migrate Items", "own": "You Own {0} From This Collection" }, - "migrationNotPossible": "Migration Not Possible:", - "migrationNotPossibleLabel": "Migration Is Not Possible For Following Collections That You Own:", "homeButton": "Migration Homepage", "review": "Review", "reviewCtaUncheck": "Acknowledge Before Proceeding", @@ -1523,7 +1521,7 @@ "finalizingItems": "Finalizing {0} Items" } }, - "transactionSteps" : { + "transactionSteps": { "completed": "Completed", "error": "Failed to Sign", "loading": "Transaction in Progress", From 2b367566ad4e105db644031f13982e1e5615eefd Mon Sep 17 00:00:00 2001 From: Preschian Febryantara Date: Thu, 23 Nov 2023 17:06:28 +0700 Subject: [PATCH 003/161] Add 'Migrate' menu item to WalletAssetMenu.vue --- components/common/ConnectWallet/WalletAssetMenu.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/common/ConnectWallet/WalletAssetMenu.vue b/components/common/ConnectWallet/WalletAssetMenu.vue index 85415e2888..6dd8e72f54 100644 --- a/components/common/ConnectWallet/WalletAssetMenu.vue +++ b/components/common/ConnectWallet/WalletAssetMenu.vue @@ -83,6 +83,10 @@ const menus = ref([ label: 'Onchain Identity', to: '/identity', }, + { + label: 'Migrate', + to: '/migrate', + }, ]) watchEffect(() => { From f27b3bcee122987258a92f450d154ac16701b998 Mon Sep 17 00:00:00 2001 From: Preschian Febryantara Date: Thu, 23 Nov 2023 17:43:16 +0700 Subject: [PATCH 004/161] Fix image rendering issue in Ready and Waiting components --- components/migrate/landing/content/Ready.vue | 15 ++++++++++-- .../migrate/landing/content/Waiting.vue | 23 +++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/components/migrate/landing/content/Ready.vue b/components/migrate/landing/content/Ready.vue index 322b3786d6..83465d5ecf 100644 --- a/components/migrate/landing/content/Ready.vue +++ b/components/migrate/landing/content/Ready.vue @@ -18,12 +18,12 @@
@@ -68,4 +68,15 @@ defineProps<{ }>() const { collections } = await useCollectionReady() + +const { urlPrefix } = usePrefix() +const entities = reactive({}) +watchEffect(() => { + collections.value.forEach(async (collection) => { + entities[collection.id] = await getNftMetadata( + collection as unknown as MinimalNFT, + urlPrefix.value, + ) + }) +}) diff --git a/components/migrate/landing/content/Waiting.vue b/components/migrate/landing/content/Waiting.vue index 3a73283e09..b4e0abd17f 100644 --- a/components/migrate/landing/content/Waiting.vue +++ b/components/migrate/landing/content/Waiting.vue @@ -17,22 +17,22 @@

{{ collection.name }}

-

+

@@ -45,7 +45,9 @@ ">

- + {{ $t('migrate.waiting.cta') }}
@@ -97,4 +99,15 @@ const collections = computed(() => { return [] }) + +const { urlPrefix } = usePrefix() +const entities = reactive({}) +watchEffect(() => { + collections.value.forEach(async (collection) => { + entities[collection.id] = await getNftMetadata( + collection as unknown as MinimalNFT, + urlPrefix.value, + ) + }) +}) From 9ad25474f7cd051acd7d279572512f4d647c09b2 Mon Sep 17 00:00:00 2001 From: Preschian Febryantara Date: Thu, 23 Nov 2023 18:37:19 +0700 Subject: [PATCH 005/161] Fix migration button visibility --- components/migrate/landing/content/Waiting.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/migrate/landing/content/Waiting.vue b/components/migrate/landing/content/Waiting.vue index b4e0abd17f..6dc55980c9 100644 --- a/components/migrate/landing/content/Waiting.vue +++ b/components/migrate/landing/content/Waiting.vue @@ -44,13 +44,14 @@ $t('migrate.waiting.own', [collection.nfts?.length]) ">

-
+ +
From 3374f99fd552a4453f55719c8f4eb75dce94746e Mon Sep 17 00:00:00 2001 From: Shashkov Danil Date: Sat, 25 Nov 2023 14:21:36 +0000 Subject: [PATCH 006/161] MediaItem to tailwindcss --- assets/styles/global.scss | 6 -- components/massmint/OverviewTable.vue | 5 -- .../ui/src/components/MediaItem/MediaItem.vue | 72 ++++--------------- .../components/MediaItem/type/AudioMedia.vue | 11 ++- .../components/MediaItem/type/IFrameMedia.vue | 10 +-- .../components/MediaItem/type/ImageMedia.vue | 19 ++--- .../components/MediaItem/type/JsonMedia.vue | 4 +- .../components/MediaItem/type/ModelMedia.vue | 45 ++---------- .../components/MediaItem/type/ObjectMedia.vue | 10 +-- .../components/MediaItem/type/VideoMedia.vue | 39 +--------- libs/ui/src/components/TheImage/TheImage.vue | 1 + 11 files changed, 37 insertions(+), 185 deletions(-) diff --git a/assets/styles/global.scss b/assets/styles/global.scss index f9d41b85dd..98bf9938a3 100644 --- a/assets/styles/global.scss +++ b/assets/styles/global.scss @@ -336,12 +336,6 @@ a.has-text-grey { } } -.border-k-grey { - @include ktheme() { - border-color: theme('k-grey') !important; - } -} - .border-top-k-shade { @include ktheme() { border-top: 1px solid theme('k-shade'); diff --git a/components/massmint/OverviewTable.vue b/components/massmint/OverviewTable.vue index 58fc4b6e67..8742a34e5b 100644 --- a/components/massmint/OverviewTable.vue +++ b/components/massmint/OverviewTable.vue @@ -175,11 +175,6 @@ useIntersectionObserver(sentinel, handleIntersection, { threshold: 0.66 }) diff --git a/libs/ui/src/components/MediaItem/type/AudioMedia.vue b/libs/ui/src/components/MediaItem/type/AudioMedia.vue index 26f45fa999..b8d00a45a8 100644 --- a/libs/ui/src/components/MediaItem/type/AudioMedia.vue +++ b/libs/ui/src/components/MediaItem/type/AudioMedia.vue @@ -6,15 +6,13 @@ :src="playerCover" :placeholder="placeholder" :alt="alt" - :is-detail="isDetail" - :original="original" - :is-dark-mode="isDarkMode" /> + :original="original" /> + class="w-full border-t border-t-border-color" /> @@ -35,11 +33,10 @@ const props = withDefaults( alt?: string original: boolean placeholder: string - isDetail?: boolean - isDarkMode?: boolean }>(), { parentHovering: undefined, + alt: '', }, ) @@ -54,7 +51,7 @@ if (props.hoverOnCoverPlay) { if (props.parentHovering !== undefined) { watchDebounced( () => props.parentHovering, - (hovering) => handleCoverHover(hovering), + (hovering) => handleCoverHover(Boolean(hovering)), { debounce: computed(() => (props.parentHovering ? hoverDelay : 0)) }, ) } else { diff --git a/libs/ui/src/components/MediaItem/type/IFrameMedia.vue b/libs/ui/src/components/MediaItem/type/IFrameMedia.vue index 1c79463730..2923f3f965 100644 --- a/libs/ui/src/components/MediaItem/type/IFrameMedia.vue +++ b/libs/ui/src/components/MediaItem/type/IFrameMedia.vue @@ -1,7 +1,7 @@