Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(prod): 36 % of September 2024 Yak 🦬 #10970

Merged
merged 73 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
603f13b
refactor: unused drops component
preschian Aug 8, 2024
a7d9a7d
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 8, 2024
be72ec1
feat(drops): add DropItem component and refactor drops display logic
preschian Aug 8, 2024
3893023
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 12, 2024
d30152c
feat: Item preview: Show creator & current owner
Jarsen136 Aug 25, 2024
c815af3
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 26, 2024
0f10165
refactor(drops): consolidate route availability check in parent compo…
preschian Aug 26, 2024
8f80106
fix(drops): handle null dropPrefix and ensure reactive chain properties
preschian Aug 26, 2024
746febf
fix(onchain): handle errors in readContract function calls
preschian Aug 26, 2024
14dbc57
refactor(drops): centralize drop attribute fetching logic and simplif…
preschian Aug 26, 2024
bcc6e72
refactor(drops): integrate useQuery for fetching drops
preschian Aug 26, 2024
ebddd3d
feat(drops): integrate chain-specific logic for drop attributes
preschian Aug 26, 2024
e92f5b3
refactor(carousel): streamline query parameters management in Carouse…
preschian Aug 26, 2024
ea3bb8d
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 26, 2024
a5ef0fd
fix(onchain): handle collection fetch error gracefully
preschian Aug 26, 2024
56e3737
refactor(drops): unify attribute fetching by removing isEvm dependency
preschian Aug 26, 2024
db07246
refactor(drops): streamline drop item formatting and attributes handling
preschian Aug 26, 2024
319d1f2
feat(carousel): add permission-based visibility to drops
preschian Aug 26, 2024
0948a31
feat(minted): track and sort minted drops in store
preschian Aug 26, 2024
b47c9c6
feat(drops): enable dynamic grid for drop items and cards
preschian Aug 27, 2024
f76bee9
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 27, 2024
be3a066
chore(cleanup): remove obsolete onchain utility files and ogi service
preschian Aug 27, 2024
2277228
feat(api): use environment-specific base URLs for API requests
preschian Aug 27, 2024
c785a2e
refactor(drops): consolidate Drop interface and move logic from useDr…
preschian Aug 28, 2024
2983180
refactor(drop): replace formattedDropItem with direct drop reference …
preschian Aug 28, 2024
e62b741
fix(collection): remove unnecessary location verification logic in Ph…
preschian Aug 28, 2024
82b556b
feat(oda): integrate ODA collection owners fetching function
preschian Aug 28, 2024
59f9ca1
docs(drops): add comments to clarify code sections and note potential…
preschian Aug 29, 2024
8a2b702
fix(api): correct endpoint URL in fetchOdaCollectionOwners function
preschian Aug 29, 2024
94e59e6
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Aug 29, 2024
fb954b7
Merge branch 'main' into refactor--unused-drops-component
preschian Sep 4, 2024
fb8f9c8
fix(balance): fetching not working , on non wallet vm
hassnian Sep 5, 2024
7978dae
fix(stores/wallet.ts): wrong ss58 address format
hassnian Sep 5, 2024
888fc2f
fix: Rename KodaDot to Koda throughout the app
rajithaeyee Sep 6, 2024
22daf1f
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Sep 7, 2024
bdac499
replaced invalid keys and re-added the valid keys
rajithaeyee Sep 7, 2024
e6268e0
fix(drops): remove null check for dropPrefix in BasicDropCard component
preschian Sep 9, 2024
1ed352c
fix(collection): correct import path for fetchOdaCollectionOwners
preschian Sep 9, 2024
aca7010
refactor(drops): simplify conditional rendering logic in DropItem.vue
preschian Sep 9, 2024
577a29f
refactor(carousel): replace useDrops with useQuery for fetching drops…
preschian Sep 9, 2024
f00373d
fix(useMultipleBalance.ts): fetching asset from wrong vm chain
hassnian Sep 9, 2024
b27f782
Merge branch 'main' into issue-10933
hassnian Sep 9, 2024
17c355f
feat(ui): display toast message after successful minting
preschian Sep 9, 2024
b889d7a
refactor(oda): remove unused QueryClient import
preschian Sep 9, 2024
effb9ac
fix: Not Showing Name of the Artist
Jarsen136 Sep 9, 2024
700e19d
re-corrected missing mispelled keys and re corrected the valid url
rajithaeyee Sep 9, 2024
61250dd
Merge branch 'main' of github.com:kodadot/nft-gallery into refactor--…
preschian Sep 10, 2024
7b0d692
fix(drops): adjust sorting based on chain type
preschian Sep 10, 2024
c7dbb26
ref(GalleryItem): move `transfer nft` to more dropdown
hassnian Sep 10, 2024
bfce50c
Merge pull request #10950 from Jarsen136/issue-10947
vikiival Sep 10, 2024
7d4ba7f
fix(collection.spec.ts): Activates art view test
hassnian Sep 10, 2024
8f1ce5e
Merge branch 'main' into refactor--unused-drops-component
vikiival Sep 10, 2024
a80c5b9
Merge pull request #10903 from kodadot/refactor--unused-drops-component
vikiival Sep 10, 2024
5fc7a37
feat: drop collection creator
Jarsen136 Sep 10, 2024
ed7611c
Merge branch 'main' into issue-10898
Jarsen136 Sep 10, 2024
a16701d
fix(Offers.vue): offers `outgoing` `incoming` should be tabs
hassnian Sep 10, 2024
c6b223e
fix(OfferRow.vue): mobile target address label
hassnian Sep 10, 2024
706b871
ref(Offers.vue): remove tab target duplication
hassnian Sep 10, 2024
cbe873c
fix: Offer expiration dropdown moving on scroll
Jarsen136 Sep 10, 2024
d357cf9
fix: Collection view: Show artist as Creator
Jarsen136 Sep 10, 2024
e290847
Merge pull request #10899 from Jarsen136/issue-10898
vikiival Sep 10, 2024
b03b640
fix: close menu on move option
Jarsen136 Sep 11, 2024
0cc34c6
Merge pull request #10965 from Jarsen136/issue-10957
vikiival Sep 11, 2024
966e25e
Merge pull request #10961 from hassnian/issue-10960
vikiival Sep 11, 2024
fad12c2
fix(collection.spec.ts): collection advanced filter test
hassnian Sep 11, 2024
d650adf
Merge pull request #10936 from hassnian/issue-10933
vikiival Sep 11, 2024
8ec7c24
Merge pull request #10968 from hassnian/issue-10941-2
vikiival Sep 11, 2024
76bdc5a
Merge pull request #10964 from Jarsen136/issue-10951
vikiival Sep 11, 2024
c4d2aa5
Merge branch 'main' into issue-10954
vikiival Sep 11, 2024
ac92aa9
Merge pull request #10956 from hassnian/issue-10954
vikiival Sep 11, 2024
e692f5d
Merge branch 'main' into fix--rename-kodadot-to-koda
vikiival Sep 11, 2024
391f174
Merge pull request #10943 from rajithaeyee/fix--rename-kodadot-to-koda
vikiival Sep 11, 2024
74c10af
Merge pull request #10969 from kodadot/main
vikiival Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 18 additions & 20 deletions components/carousel/CarouselTypeDrops.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<div ref="container">
<template v-if="isDynamicGridReady">
<CarouselModuleCarouselAgnostic
v-if="isReady"
v-if="isReady && dropsAlias"
:key="dropsAlias.join('-')"
v-slot="{ item }"
:items="drops"
:config="config"
>
<DropsDropCard
<DropsDropItem
:drop="item"
:show-minted="true"
/>
</CarouselModuleCarouselAgnostic>
<CarouselModuleCarouselAgnostic
Expand All @@ -24,22 +25,9 @@
</template>

<script lang="ts" setup>
import { useDrops } from '@/components/drops/useDrops'

let queries = {
limit: 14,
active: [true],
chain: ['ahp', 'base'],
}

const { urlPrefix } = usePrefix()

if (!isProduction && urlPrefix.value === 'ahk') {
queries = {
...queries,
chain: ['ahk'],
}
}
import { useQuery } from '@tanstack/vue-query'
import { dropsVisible } from '@/utils/config/permission.config'
import { getDrops } from '@/services/fxart'

const container = ref()
const { cols, isReady: isDynamicGridReady } = useDynamicGrid({
Expand All @@ -55,6 +43,16 @@ const skeletonCount = computed(() =>
Number.isInteger(perView.value) ? perView.value : Math.ceil(perView.value),
)

const { drops, loaded: isReady } = useDrops(queries, { filterOutMinted: true })
const dropsAlias = computed(() => drops.value.map(drop => drop.alias))
const { urlPrefix } = usePrefix()

const { data: drops, isSuccess: isReady } = useQuery({
queryKey: ['drop-items-carousel', urlPrefix.value],
queryFn: () => getDrops({
active: [true],
chain: dropsVisible(urlPrefix.value) ? [urlPrefix.value] : ['base', 'ahp'],
limit: 14,
}),
})

const dropsAlias = computed(() => drops.value?.map(drop => drop.alias))
</script>
2 changes: 1 addition & 1 deletion components/collection/CollectionInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const chain = computed(
availableChains.value.find(chain => chain.value === route.params.prefix)
?.text,
)
const address = computed(() => collectionInfo.value?.currentOwner)
const address = computed(() => collectionInfo.value?.displayCreator)
const recipient = computed(() => collectionInfo.value?.recipient)
const royalty = computed(() => collectionInfo.value?.royalty)
const createdAt = computed(() => collectionInfo.value?.createdAt)
Expand Down
30 changes: 20 additions & 10 deletions components/collection/CollectionRelatedDropNotification.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div
v-if="relatedActiveDrop"
v-if="drop && !drop.isMintedOut"
class="flex w-full justify-center mt-4"
>
<div
Expand All @@ -20,19 +20,19 @@
<div class="w-4 h-[1px] bg-separator-line-color mx-2" />
<nuxt-link
class="flex items-center font-bold my-2"
:to="`/${relatedActiveDrop.chain}/drops/${relatedActiveDrop.alias}`"
:to="`/${drop?.chain}/drops/${drop?.alias}`"
>
{{ $t('drops.viewDrop') }}
</nuxt-link>
</div>
</div>
<div
v-else-if="relatedEndedDrop"
v-else
class="flex w-full justify-center mt-4"
>
<NeoButton
:tag="NuxtLink"
:to="`/${relatedEndedDrop.chain}/drops/${relatedEndedDrop.alias}`"
:to="`/${drop?.chain}/drops/${drop?.alias}`"
variant="secondary-rounded"
icon-left="puzzle-piece"
icon-pack="fal"
Expand All @@ -44,18 +44,28 @@

<script lang="ts" setup>
import { NeoButton } from '@kodadot1/brick'
import { useRelatedActiveDrop } from '@/components/drops/useDrops'
import { getDropAttributes } from '../drops/utils'
import { getDrops } from '@/services/fxart'
import type { DropItem } from '@/params/types'

const NuxtLink = resolveComponent('NuxtLink')

const props = defineProps<{
collectionId: string
}>()

const collectionId = computed(() => props.collectionId)
const { urlPrefix } = usePrefix()
const { relatedActiveDrop, relatedEndedDrop } = useRelatedActiveDrop(
collectionId.value,
urlPrefix.value,
)

const drop = ref<DropItem>()

onBeforeMount(async () => {
const fetchDrops = await getDrops({
chain: [urlPrefix.value],
collection: props.collectionId,
})

if (fetchDrops.length) {
drop.value = await getDropAttributes(fetchDrops[0].alias)
}
})
</script>
2 changes: 1 addition & 1 deletion components/collection/HeroButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const shareCollectionToFarcaster = () => {
const { collection } = useCollectionMinimal({
collectionId,
})
const collectionIssuer = computed(() => collection.value?.issuer)
const collectionIssuer = computed(() => collection.value?.displayCreator)
const collectionNftCount = computed(() => collection.value?.nftCount)
const collectionMaxCount = computed(() => collection.value?.max)

Expand Down
41 changes: 11 additions & 30 deletions components/collection/drop/GenerativeLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

<CollectionDropPhase
class="mt-28 md:mt-7"
:drop-status="formattedDropItem?.status"
:drop-start-time="formattedDropItem?.dropStartTime"
:drop-status="drop?.status"
:drop-start-time="drop?.dropStartTime"
/>

<CollectionUnlockableTag :collection-id="drop?.collection" />
Expand Down Expand Up @@ -89,16 +89,9 @@

<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import type {
Drop } from '@/components/drops/useDrops'
import {
getFormattedDropItem,
} from '@/components/drops/useDrops'
import { useCollectionActivity } from '@/composables/collectionActivity/useCollectionActivity'
import { useCollectionMinimal } from '@/components/collection/utils/useCollectionDetails'
import useCursorDropEvents from '@/composables/party/useCursorDropEvents'
import { DropEventType } from '@/composables/party/types'
import type { DropItem } from '@/params/types'
import { fetchOdaCollectionOwners } from '@/services/oda'

const mdBreakpoint = 768

Expand All @@ -109,32 +102,20 @@ const { previewItem, userMintsCount } = storeToRefs(useDropStore())
const { width } = useWindowSize()

const { emitEvent, completeLastEvent } = useCursorDropEvents()
const { collection: collectionInfo } = useCollectionMinimal({
collectionId: computed(() => drop.value?.collection ?? ''),
})

const divider = ref()

const address = computed(() => drop.value?.creator)

const { owners } = useCollectionActivity({
collectionId: computed(() => drop.value?.collection),
const owners = ref()
const ownerAddresses = computed(() => Object.keys(owners.value?.owners || {}))
watchEffect(async () => {
if (!drop.value?.collection) {
return
}

owners.value = await fetchOdaCollectionOwners(drop.value.chain, drop.value.collection)
})
const ownerAddresses = computed(() => Object.keys(owners.value || {}))

const formattedDropItem = ref<Drop>()
watch(
[collectionInfo],
async () => {
if (collectionInfo.value) {
formattedDropItem.value = await getFormattedDropItem(
collectionInfo.value,
drop.value as DropItem,
)
}
},
{ immediate: true },
)

const handleNftGeneration = (preview: GenerativePreviewItem) => {
emitEvent(DropEventType.DROP_GENERATING)
Expand Down
15 changes: 0 additions & 15 deletions components/collection/drop/Phase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,6 @@
:title="`Drop: ${drop.name}`"
:drop-start-time="dropStartTime"
/>

<!-- if there is location on the campaign -->
<CollectionDropRequirementItem
v-if="drop?.location"
:fulfilled="Boolean(drop?.userAccess)"
>
<p class="capitalize">
Location Verification: You are
<span
v-if="!Boolean(drop?.userAccess)"
class="font-bold"
>not</span> in
<span class="font-bold">{{ drop?.location }}</span>
</p>
</CollectionDropRequirementItem>
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ const itemMedias = props.mintingSession.items.map(item => ({
}))
const items = ref<ItemMedia[]>(itemMedias)

// update serial number in nft.name asynchronously
onMounted(async () => {
toast('Successfully minted token. There is a 1 minute indexer and worker delay for this action to appear in the website.', { position: 'top-right', duration: 15000 })

// update serial number in nft.name asynchronously
const metadatas = await Promise.all(
items.value.map(item => $fetch<{ name?: string }>(item.metadata)),
)
Expand Down
86 changes: 0 additions & 86 deletions components/collection/unlockable/UnlockableHeroButtons.vue

This file was deleted.

This file was deleted.

Loading
Loading