diff --git a/assets/styles/pages/create.scss b/assets/styles/pages/create.scss index c610b62f34..fe43548cac 100644 --- a/assets/styles/pages/create.scss +++ b/assets/styles/pages/create.scss @@ -14,29 +14,3 @@ 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/Navbar.vue b/components/Navbar.vue index 2d7ca39e0f..bcffbed635 100644 --- a/components/Navbar.vue +++ b/components/Navbar.vue @@ -116,6 +116,7 @@ @@ -259,10 +261,9 @@ import NavbarChainOptions from '@/components/navbar/NavbarChainOptions.vue' import NavbarExploreOptions from '@/components/navbar/NavbarExploreOptions.vue' import Search from '@/components/search/Search.vue' import ConnectWalletButton from '@/components/shared/ConnectWalletButton.vue' - +import { explorerVisible, createVisible } from '@/utils/config/permission.config' import { useIdentityStore } from '@/stores/identity' import { getChainNameByPrefix } from '@/utils/chain' -import { createVisible } from '@/utils/config/permission.config' const { neoModal } = useProgrammatic() const openMobileSearchBar = ref(false) @@ -280,6 +281,7 @@ const mobilSearchRef = ref<{ focusInput: () => void } | null>(null) const account = computed(() => identityStore.getAuthAddress) const isCreateVisible = computed(() => createVisible(urlPrefix.value)) +const isExplorerVisible = computed(() => explorerVisible(urlPrefix.value)) const logoSrc = computed(() => { const variant = isTouch ? 'Koda' : 'Koda_Beta' diff --git a/components/base/types.ts b/components/base/types.ts index 4472716615..233a4277c9 100644 --- a/components/base/types.ts +++ b/components/base/types.ts @@ -1,5 +1,4 @@ import type { Prefix } from '@kodadot1/static' -import type { ItemResources } from '@/composables/useNft' export type BaseMintedCollection = { id: string @@ -18,7 +17,7 @@ export type BaseTokenType = { secondFile: File | null } -export interface CarouselNFT extends ItemResources { +export interface CarouselNFT { currentOwner: string id: string image: string diff --git a/components/bsx/Create/RoyaltyForm.vue b/components/bsx/Create/RoyaltyForm.vue index 8b461f0ef6..ecfb678c64 100644 --- a/components/bsx/Create/RoyaltyForm.vue +++ b/components/bsx/Create/RoyaltyForm.vue @@ -11,19 +11,21 @@ :max="99.99" /> - - + + + + diff --git a/components/carousel/module/CarouselAgnostic.vue b/components/carousel/module/CarouselAgnostic.vue index 70a942f781..67cc2ffbf1 100644 --- a/components/carousel/module/CarouselAgnostic.vue +++ b/components/carousel/module/CarouselAgnostic.vue @@ -145,7 +145,7 @@ const syncSlider = (s) => { updateSliderArrows(s) } -const updateConfig = () => slider.value?.update(props.config) +const updateConfig = () => nextTick().then(() => slider.value?.update(props.config)) if (props.config) { watch( diff --git a/components/carousel/module/CarouselMedia.vue b/components/carousel/module/CarouselMedia.vue index e3573a2465..670770aa8f 100644 --- a/components/carousel/module/CarouselMedia.vue +++ b/components/carousel/module/CarouselMedia.vue @@ -4,12 +4,6 @@ :class="{ 'carousel-media-collection': isCollection }" > - props.item)) - -watch( - () => props.item.image, - async () => { - const nft = await getNftMetadata(props.item, urlPrefix.value) - imageSrc.value = nft.image - }, -) diff --git a/components/collection/CollectionHeader.vue b/components/collection/CollectionHeader.vue new file mode 100644 index 0000000000..547147bbf1 --- /dev/null +++ b/components/collection/CollectionHeader.vue @@ -0,0 +1,32 @@ + + + + + + + + + + + + + diff --git a/components/collection/CollectionHeader/CollectionBanner.vue b/components/collection/CollectionHeader/CollectionBanner.vue index 309d699ddf..49aa49b62a 100644 --- a/components/collection/CollectionHeader/CollectionBanner.vue +++ b/components/collection/CollectionHeader/CollectionBanner.vue @@ -44,21 +44,15 @@ import { sanitizeIpfsUrl, toOriginalContentUrl } from '@/utils/ipfs' import HeroButtons from '@/components/collection/HeroButtons.vue' import { generateCollectionImage } from '@/utils/seoImageGenerator' import { convertMarkdownToText } from '@/utils/markdown' -import collectionById from '@/queries/subsquid/general/collectionById.query' const NuxtImg = resolveComponent('NuxtImg') -const collectionId = computed(() => route.params.id as string) +const props = defineProps<{ + collectionId: string + collection?: unknown +}>() + const route = useRoute() -const { client } = usePrefix() - -const { data, refresh: refetch } = useAsyncQuery({ - query: collectionById, - variables: { - id: collectionId.value, - }, - clientId: client.value, -}) const collectionAvatar = ref('') const collectionName = ref('--') @@ -67,13 +61,13 @@ const bannerImageUrl = computed( () => collectionAvatar.value && toOriginalContentUrl(collectionAvatar.value), ) -watch(collectionId, () => { - refetch() +watch(() => props.collectionId, () => { collectionAvatar.value = '' + collectionName.value = '--' }) watchEffect(async () => { - const collection = data.value?.collectionEntity + const collection = props.collection const metadata = collection?.metadata const image = collection?.meta?.image const name = collection?.name @@ -102,21 +96,21 @@ watchEffect(async () => { useSeoMeta({ title: collectionName, description: () => - convertMarkdownToText(data.value?.collectionEntity?.meta?.description), + convertMarkdownToText(props.collection?.meta?.description), ogUrl: route.path, ogTitle: collectionName, ogDescription: () => - convertMarkdownToText(data.value?.collectionEntity?.meta?.description), + convertMarkdownToText(props.collection?.meta?.description), ogImage: () => generateCollectionImage( collectionName.value, - data.value?.nftEntitiesConnection?.totalCount, + props.collection?.nftCount, collectionAvatar.value, ), twitterImage: () => generateCollectionImage( collectionName.value, - data.value?.nftEntitiesConnection?.totalCount, + props.collection?.nftCount, collectionAvatar.value, ), }) diff --git a/components/collection/CollectionInfo.vue b/components/collection/CollectionInfo.vue index d676ef2e21..1a687f2386 100644 --- a/components/collection/CollectionInfo.vue +++ b/components/collection/CollectionInfo.vue @@ -121,29 +121,31 @@ diff --git a/components/collection/CollectionRelatedDropNotification.vue b/components/collection/CollectionRelatedDropNotification.vue index b8cf74ecb8..4518b91caf 100644 --- a/components/collection/CollectionRelatedDropNotification.vue +++ b/components/collection/CollectionRelatedDropNotification.vue @@ -27,7 +27,7 @@ import { NeoButton } from '@kodadot1/brick' import { getDropAttributes } from '../drops/utils' -import { getDrops } from '@/services/fxart' import type { DropItem } from '@/params/types' const NuxtLink = resolveComponent('NuxtLink') @@ -54,18 +53,13 @@ const props = defineProps<{ collectionId: string }>() -const { urlPrefix } = usePrefix() +const { drop: dropItem, isPending } = useCollectionDrop(computed(() => props.collectionId)) const drop = ref() -onBeforeMount(async () => { - const fetchDrops = await getDrops({ - chain: [urlPrefix.value], - collection: props.collectionId, - }) - - if (fetchDrops.length) { - drop.value = await getDropAttributes(fetchDrops[0].alias) +watchEffect(async () => { + if (Boolean(dropItem.value) && !isPending.value) { + drop.value = await getDropAttributes(dropItem.value?.alias as string) } }) diff --git a/components/collection/activity/Activity.vue b/components/collection/activity/Activity.vue index 356b026d6e..9dc62b91f3 100644 --- a/components/collection/activity/Activity.vue +++ b/components/collection/activity/Activity.vue @@ -10,7 +10,8 @@ @@ -29,7 +30,10 @@ :flippers="flippers" /> - + @@ -37,7 +41,10 @@ class="mb-7" :class="{ 'my-7': !isBreadCrumbsShowing }" > - + @@ -63,8 +70,9 @@ const isBreadCrumbsShowing = computed( () => isAnyActivityFilterActive() && tablet.value, ) -const collectionId = computed(() => route.params.id) -const { events, flippers, owners, offers } = useCollectionActivity({ +const collectionId = computed(() => route.params.id.toString()) + +const { events, flippers, owners, offers, loading } = useCollectionActivity({ collectionId, }) diff --git a/components/collection/activity/ActivityChart.vue b/components/collection/activity/ActivityChart.vue index a92985b0a9..c5483d0dde 100644 --- a/components/collection/activity/ActivityChart.vue +++ b/components/collection/activity/ActivityChart.vue @@ -7,6 +7,15 @@ chart-height="350px" data-testid="collection-activity-chart" /> + + + diff --git a/components/drops/useDrops.ts b/components/drops/useDrops.ts index 975ace50cb..ec92cc1633 100644 --- a/components/drops/useDrops.ts +++ b/components/drops/useDrops.ts @@ -67,6 +67,8 @@ export const fetchDropMintedCount = async ( export const useDropMinimumFunds = (amount = ref(1)) => { const { drop } = useDrop() + const { urlPrefix } = usePrefix() + const { itemDeposit } = useDeposit(urlPrefix) const chainProperties = computed(() => chainPropListOf(drop.value?.chain ?? 'ahp'), @@ -76,9 +78,7 @@ export const useDropMinimumFunds = (amount = ref(1)) => { = useMultipleBalance() const price = computed(() => Number(drop.value?.price) || 0) - const minimumFunds = computed(() => - price.value ? amount.value * price.value : 0, - ) + const minimumFunds = computed(() => amount.value * (price.value + itemDeposit.value)) const hasMinimumFunds = computed( () => !minimumFunds.value diff --git a/components/drops/utils.ts b/components/drops/utils.ts index c55e14fc75..6f533abe8f 100644 --- a/components/drops/utils.ts +++ b/components/drops/utils.ts @@ -152,3 +152,5 @@ export async function getDropAttributes(alias: string): Promise price === null || price === '' diff --git a/components/gallery/GalleryItem.vue b/components/gallery/GalleryItem.vue index 0734bceb73..4325abdd66 100644 --- a/components/gallery/GalleryItem.vue +++ b/components/gallery/GalleryItem.vue @@ -23,37 +23,7 @@ {{ $t('go back') }} - - - - - - - - - + - + - + @@ -209,33 +170,25 @@ - - diff --git a/components/gallery/GalleryItemButton/GalleryItemButton.vue b/components/gallery/GalleryItemButton/GalleryItemButton.vue index 67440041bd..1816fe5e13 100644 --- a/components/gallery/GalleryItemButton/GalleryItemButton.vue +++ b/components/gallery/GalleryItemButton/GalleryItemButton.vue @@ -16,20 +16,13 @@