Skip to content

Commit

Permalink
Merge branch 'main' into feature/init/swapLanding
Browse files Browse the repository at this point in the history
  • Loading branch information
hassnian authored Nov 26, 2024
2 parents 8b80fdb + 516e3e2 commit caf0042
Show file tree
Hide file tree
Showing 11 changed files with 406 additions and 354 deletions.
2 changes: 1 addition & 1 deletion .github/diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 3 additions & 20 deletions components/drops/Drops.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@
<div>
<div class="flex max-md:flex-col md:items-center justify-between mb-7 md:gap-8">
<h1 class="text-4xl font-semibold text-balance">
<span class="block lg:inline mb-0 md:mr-3">{{ $i18n.t('drops.title') }},</span>
<span class="inverse-text">{{ $i18n.t('drops.everyThursday') }}</span>
<span>{{ $i18n.t('drops.title') }}</span>
</h1>

<div class="max-md:pt-8 flex items-center flex-col md:flex-row gap-6 max-md:gap-4 md:justify-between flex-grow">
<NeoButton
icon-left="plus"
rounded
variant="outlined-rounded"
@click="isCreateEventModalActive = true"
>
{{ $t('drops.addToCal') }}
</NeoButton>

<div class="max-md:pt-8 flex items-center flex-col md:flex-row gap-6 max-md:gap-4 md:justify-end flex-grow">
<nuxt-link
class="flex-shrink-0"
to="https://form.kodadot.xyz/drop-interest"
Expand Down Expand Up @@ -60,25 +50,18 @@
:drop="drop"
/>
</DynamicGrid>

<DropsCreateCalendarEventModal
v-model="isCreateEventModalActive"
:title="$t('drops.kodadotWeeklyGenerativeDrop')"
/>
</template>
</div>
</template>

<script lang="ts" setup>
import { NeoButton, NeoIcon } from '@kodadot1/brick'
import { NeoIcon } from '@kodadot1/brick'
import { useQuery } from '@tanstack/vue-query'
import { getDrops } from '@/services/fxart'
const { $i18n } = useNuxtApp()
const { urlPrefix } = usePrefix()
const isCreateEventModalActive = ref(false)
const { data: dropItems } = useQuery({
queryKey: ['drop-items', urlPrefix.value],
queryFn: () => getDrops({
Expand Down
14 changes: 2 additions & 12 deletions components/items/ItemsGrid/useNftActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,19 @@ export const fetchNft = async (nftId: string): Promise<NFTWithMetadata> => {

export const prepareListingQuery = (
entities: TokenEntity[],
isThereAnythingToList: boolean,
) => {
const { accountId } = useAuth()

const tokenSearchTerm = { id_in: entities.map(n => n.id) }

const variables = {
first: 10000, // some large number
search: [
{
token: tokenSearchTerm,
token: { id_in: entities.map(n => n.id) },
currentOwner_eq: accountId.value,
burned_eq: false,
},
],
}

const searchKey = isThereAnythingToList ? 'price_eq' : 'price_gt'
variables.search[0][searchKey] = '0'

return {
query: nftListWithSearch,
variables,
Expand Down Expand Up @@ -73,10 +66,7 @@ const getCachedAndMissingEntities = (
const fetchMissingEntities = async (
missingEntities: TokenEntity[],
): Promise<NFTWitToken[]> => {
const { query, variables } = prepareListingQuery(
missingEntities,
await checkIfAnythingToList(missingEntities),
)
const { query, variables } = prepareListingQuery(missingEntities)
const { client } = usePrefix()

const { data } = await useAsyncQuery<{ nFTEntities: NFTWitToken[] }>({
Expand Down
1 change: 1 addition & 0 deletions components/navbar/ConnectedProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
root-class="!px-2"
label-class="flex gap-[10px] items-center"
aria-label="open profile menu"
data-testid="navbar-connected-profile"
:active="isWalletModalOpen"
@click="$emit('click')"
>
Expand Down
1 change: 1 addition & 0 deletions composables/massmint/useMassMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const useCollectionForMint = () => {

if (collectionEntities?.length) {
const newCollections = collectionEntities
.map(collection => ({ ...collection, lastIndexUsed: Number(collection.lastNft[0]?.sn || 0) }))
.filter(collection => (collection.max || Infinity) - collection.minted > 0)

collections.value = unwrapSafe(newCollections)
Expand Down
3 changes: 3 additions & 0 deletions libs/ui/src/components/NeoModal/NeoModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
:destroy-on-hide="destroyOnHide"
:can-cancel="canCancel"
:full-screen="fullScreen"
:data-testid="dataTestid"
:content-class="[
...contentClassName,
noShadow ? 'no-shadow' : '',
Expand Down Expand Up @@ -50,6 +51,7 @@ const props = withDefaults(
mobileBreakpoint?: string
appendToBody?: boolean
noOverlap?: boolean
dataTestid?: string
}>(),
{
destroyOnHide: true,
Expand All @@ -62,6 +64,7 @@ const props = withDefaults(
maxHeight: '80vh',
mobileBreakpoint: '768px',
appendToBody: true,
dataTestid: undefined,
},
)
Expand Down
3 changes: 0 additions & 3 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@
"documentation": "Documentation",
"dropUpload": "Drop your file here or click to select.",
"drops": {
"addToCal": "Add To Calendar",
"agreeToProceed": "Agree to proceed",
"amountMintedSuccessfully": "{0} NFTs minted successfully",
"artBy": "{0} By",
Expand All @@ -328,7 +327,6 @@
"emailConfirmationSent": "Email confirmation sent",
"emailNotConfirmed": "Email not confirmed. Please confirm your email address and check again",
"enterValidEmail": "Enter valid email address",
"everyThursday": "Every Thursday",
"exploreDrop": "Explore Algorithm",
"failedCheckingSubscription": "Failed checking subscription",
"failedEmailConfirmation": "Failed sending email confirmation",
Expand All @@ -339,7 +337,6 @@
"holderOfCollection": "Holder of NFT from {name} collection",
"iveConfirmed": "I've confirmed",
"justConfirmSubscriptionViaEmail": "Just confirm your subscription via email",
"kodadotWeeklyGenerativeDrop": "Koda weekly generative drop",
"latestMints": "Latest NFT Mints",
"listNft": "List NFT",
"mintDrop": "Mint Drop",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@kodadot1/sub-api": "0.3.2-rc.0",
"@nuxt/image": "^1.8.0",
"@nuxtjs/apollo": "5.0.0-alpha.6",
"@paraspell/sdk": "^6.1.1",
"@paraspell/sdk": "^7.2.0",
"@pinia/nuxt": "^0.5.4",
"@polkadot/api": "^11.2.1",
"@polkadot/api-base": "^11.2.1",
Expand Down
Loading

0 comments on commit caf0042

Please sign in to comment.