Skip to content

Commit

Permalink
Merge branch 'main' into issue-10651
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiival authored Jul 19, 2024
2 parents 84c3cc0 + 0165250 commit e53b604
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 15 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.
65 changes: 65 additions & 0 deletions components/profile/CuratedDrops.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div
v-if="!(loaded && !drops.length)"
class="pt-6 pb-7 md:!pb-16 max-sm:mx-5 mx-12 2xl:mx-auto border-b border-neutral-5 dark:border-neutral-9 max-w-[89rem]">
<div class="flex flex-col gap-8 w-full">
<div
v-if="loaded"
class="flex flex-wrap items-center max-md:gap-2 justify-between">
<div class="flex gap-2 items-center">
<p class="text-xl font-bold">
{{ $t('profiles.curatedGenerativDrops.title') }}
</p>

<NeoIcon icon="badge-check" pack="fass" class="text-k-accent" />
</div>

<NeoTooltip
:label="$t('profiles.curatedGenerativDrops.explainHowThisWorks')"
position="auto"
multiline
multiline-width="256px">
<p class="text-neutral-7 text-sm capitalize">
{{ $t('profiles.curatedGenerativDrops.howThisWorks') }}
</p>
</NeoTooltip>
</div>

<div v-else class="flex justify-between items-center">
<div class="flex gap-2">
<div class="w-[255] h-[24]">
<NeoSkeleton width="255" height="24" :rounded="false" no-margin />
</div>
<div class="!w-4">
<NeoSkeleton width="16" rounded circle no-margin />
</div>
</div>
<div>
<NeoSkeleton width="120" height="14" :rounded="false" no-margin />
</div>
</div>

<DropsGrid
:drops="drops"
:loaded="loaded"
:default-skeleton-count="4"
skeleton-key="curated-drops-skeleton" />
</div>
</div>
</template>
<script lang="ts" setup>
import { NeoIcon, NeoSkeleton, NeoTooltip } from '@kodadot1/brick'
import { useDrops } from '@/components/drops/useDrops'
const props = defineProps<{
id: string
}>()
const { urlPrefix } = usePrefix()
const { drops, loaded } = useDrops({
active: [true, false],
chain: [urlPrefix.value],
creator: props.id,
})
</script>
6 changes: 5 additions & 1 deletion components/profile/ProfileDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>

<div
class="pt-6 pb-7 max-sm:mx-5 mx-12 2xl:mx-auto flex justify-between border-b border-neutral-5 dark:border-neutral-9 max-w-[89rem]">
class="pt-6 pb-7 max-sm:mx-5 mx-12 2xl:mx-auto flex justify-between max-w-[89rem]">
<ProfileSkeleton v-if="isFetchingProfile" />

<div v-else class="flex flex-col gap-6">
Expand Down Expand Up @@ -246,6 +246,9 @@
@click-followers="onFollowersClick"
@click-following="onFollowingClick" />
</div>

<ProfileCuratedDrops :id="$route.params.id" />

<div
class="visible md:invisible py-7 md:!py-0 md:h-0 border-b border-neutral-5 dark:border-neutral-9 max-sm:mx-5 mx-12">
<ProfileActivity
Expand All @@ -256,6 +259,7 @@
@click-followers="onFollowersClick"
@click-following="onFollowingClick" />
</div>

<div class="pb-8">
<div class="max-sm:mx-5 mx-12 2xl:mx-auto max-w-[89rem] py-7">
<div class="flex is-hidden-touch is-hidden-desktop-only">
Expand Down
2 changes: 1 addition & 1 deletion components/profile/create/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const processProfile = async (profileData: ProfileFormData) => {
? getBioWithLinks(profileData.description)
: profileData.description,
image: imageUrl,
banner: hasProfile.value ? (bannerUrl ?? null) : bannerUrl!,
banner: hasProfile.value ? bannerUrl ?? null : bannerUrl!,
socials: constructSocials(profileData),
signature,
message,
Expand Down
8 changes: 4 additions & 4 deletions components/profile/create/stages/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ watchEffect(async () => {
// Use Farcaster data if useFarcaster is true and data is available, otherwise fallback to profile data
form.name = useFarcasterData
? (farcasterProfile.displayName ?? '')
: (profile?.name ?? '')
? farcasterProfile.displayName ?? ''
: profile?.name ?? ''
form.description = useFarcasterData
? (farcasterProfile.bio ?? '')
: (profile?.description ?? '')
? farcasterProfile.bio ?? ''
: profile?.description ?? ''
form.imagePreview = useFarcasterData
? farcasterProfile.pfpUrl
: profile?.image
Expand Down
6 changes: 3 additions & 3 deletions composables/useTeleport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function (fetchBalancePeriodically: boolean = false) {
useTransactionStatus()
const { accountId } = useAuth()
const { assets } = usePrefix()
const { $i18n } = useNuxtApp()
const { $i18n, $consola } = useNuxtApp()
const { decimalsOf } = useChain()
const { urlPrefix } = usePrefix()
const { fetchMultipleBalance, chainBalances } = useMultipleBalance(
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function (fetchBalancePeriodically: boolean = false) {

const transactionHandler = txCb(
({ blockHash }) => {
successMessage(`Transaction finalized at blockHash ${blockHash}`)
$consola.log(`Transaction finalized at blockHash ${blockHash}`)
status.value = TransactionStatus.Finalized
isLoading.value = false

Expand All @@ -85,7 +85,7 @@ export default function (fetchBalancePeriodically: boolean = false) {
const { txHash } = submittableResult

if (isFirstStatus) {
infoMessage(`Transaction hash is ${txHash.toHex()}`)
$consola.log(`Transaction hash is ${txHash.toHex()}`)
txId.value = txHash.toHex()
status.value = TransactionStatus.Block
isFirstStatus = false
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/src/components/NeoTooltip/NeoTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { OTooltip } from '@oruga-ui/oruga-next'
export interface Props {
label?: string
position?: 'top' | 'bottom' | 'left' | 'right'
position?: 'top' | 'bottom' | 'left' | 'right' | 'auto'
active?: boolean
multiline?: boolean
appendToBody?: boolean
Expand Down
10 changes: 8 additions & 2 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@
"claimingDrop": "Claiming drop",
"stayTuned": "Stay tuned — Your unique NFT is finalizing!",
"preparingYourNft": "Preparing Your NFT",
"youSuccessfullyClaimedNft": "You successfully claimed {0} NFT",
"youSuccessfullyClaimedNft": "You successfully minted {0} NFT",
"artBy": "{0} By",
"viewNft": "View NFT",
"listNft": "List NFT",
Expand Down Expand Up @@ -1784,7 +1784,7 @@
"confirm": "Teleport required amount"
},
"paid_drop": {
"confirm": "Teleport and claim NFT",
"confirm": "Teleport and Mint NFT",
"title": "Minting NFT"
},
"mintnft": {
Expand Down Expand Up @@ -2077,6 +2077,12 @@
"message": "Somehting went wrong linking with your farcaster account, please try again."
}
},

"curatedGenerativDrops": {
"title": "Curated Generative Drops",
"howThisWorks": "How this works?",
"explainHowThisWorks": "Discover generative art collections owned by this artist. Each curated drop is created using algorithms, resulting in unique and dynamic artworks that blend creativity with computational precision."
},
"delete": "Reset all Fields - start over",
"deleteConfirm": "You sure? - click again",
"waitSeconds": "Wait {0} Seconds",
Expand Down
1 change: 1 addition & 0 deletions services/fxart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type GetDropsQuery = {
limit?: number
active?: boolean[]
chain?: string[]
creator?: string
collection?: string
}

Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/drops.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ test('Drop page verification', async ({ page, Commands }) => {
})

await test.step('Collected By', async () => {
await expect(page.getByTestId('drop-collected-by-container')).toBeVisible()
await expect(page.getByTestId('drop-collected-by-container')).toBeVisible({
timeout: 15000,
})
await expect(page.getByTestId('collector-avatar').first()).toBeVisible()
await page.getByTestId('collector-avatar').first().hover()
await expect(page.getByTestId('identity-popover-container')).toBeVisible()
Expand Down
1 change: 0 additions & 1 deletion utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const dotHubDenyList = [
'128qRiVjxU3TuT37tg7AX99zwqfPtj2t4nDKUv9Dvi5wzxuF', // RMRK test
'155HWw3J9jyYphMm5is4vp9Bzj7ZRRd6HEzCPdWd8cq97KfT', // Very old unreacheable IPFS
'16aWyT5Xa2wogTARQxk8LnQqi5nquy3Xrc4YcgJrmjEWrduq', // Market Manipulation
'1HzwKkNGv4gdWq4ds1C5k63u8hvmjC6ULneAaZbwUBZEauF', // Dead collection
]

export const IPFS_KODADOT_IMAGE_PLACEHOLDER =
Expand Down

0 comments on commit e53b604

Please sign in to comment.