diff --git a/assets/styles/global.scss b/assets/styles/global.scss index 7164593029..e2c59a82a0 100644 --- a/assets/styles/global.scss +++ b/assets/styles/global.scss @@ -446,6 +446,9 @@ a.has-text-grey { background-color: theme('k-redaccent'); } } +.k-grey-light { + background-color: var(--k-grey-light) !important; +} .theme-background-color { @include ktheme() { background-color: theme('background-color'); @@ -587,3 +590,15 @@ a.has-text-grey { .has-text-inherit { color: inherit !important; } + +.cursor-default { + cursor: default; +} + +.min-width-0 { + min-width: 0; +} + +.pointer-events-none { + pointer-events: none !important; +} \ No newline at end of file diff --git a/assets/styles/layouts/_main-navigation.scss b/assets/styles/layouts/_main-navigation.scss index 412e4fcd62..39ef823017 100644 --- a/assets/styles/layouts/_main-navigation.scss +++ b/assets/styles/layouts/_main-navigation.scss @@ -185,6 +185,8 @@ height: 40px; } } + + max-width: 100% !important; } } diff --git a/components/balance/MultipleBalances.vue b/components/balance/MultipleBalances.vue index 29ecd57590..3928274867 100644 --- a/components/balance/MultipleBalances.vue +++ b/components/balance/MultipleBalances.vue @@ -18,15 +18,15 @@
- {{ key }} + {{ data.key }}
{{ token.name.toUpperCase() }} @@ -61,12 +61,32 @@ import { formatNumber } from '@/utils/format/balance' import { NeoSkeleton } from '@kodadot1/brick' -import { ChainToken, useIdentityStore } from '@/stores/identity' +import { ChainToken, type ChainType, useIdentityStore } from '@/stores/identity' +const displayChainOrder: ChainType[] = [ + 'polkadot', + 'polkadotHub', + 'kusama', + 'kusamaHub', + 'basilisk', +] const identityStore = useIdentityStore() const { multiBalances } = useMultipleBalance(true) +const multiBalancesChainsList = computed(() => { + return Object.keys(multiBalances.value.chains) + .sort( + (a, b) => + displayChainOrder.indexOf(a as ChainType) - + displayChainOrder.indexOf(b as ChainType), + ) + .map((key) => ({ + key, + chain: multiBalances.value.chains[key], + })) +}) + const isBalanceLoading = computed( () => identityStore.getStatusMultiBalances === 'loading', ) diff --git a/components/collection/drop/Generative.vue b/components/collection/drop/Generative.vue index 032d891f2c..48ca7903ca 100644 --- a/components/collection/drop/Generative.vue +++ b/components/collection/drop/Generative.vue @@ -62,6 +62,7 @@ v-dompurify-html=" $t('mint.unlockable.minimumFundsDescription', [ `${minimumFunds} ${token}`, + chainName, ]) " class="minimum-funds-description" /> @@ -192,6 +193,7 @@ const isImageFetching = ref(false) const isConfirmModalActive = ref(false) const isAddFundModalActive = ref(false) +const chainName = computed(() => getChainName(props.drop.chain)) const token = computed(() => prefixToToken[props.drop.chain]) export type DropMintedNft = DoResult & { diff --git a/components/collection/drop/HolderOfGenerative.vue b/components/collection/drop/HolderOfGenerative.vue index ab65c5fb21..011bd94eda 100644 --- a/components/collection/drop/HolderOfGenerative.vue +++ b/components/collection/drop/HolderOfGenerative.vue @@ -69,6 +69,7 @@ v-dompurify-html=" $t('mint.unlockable.minimumFundsDescription', [ `${minimumFunds} ${token}`, + chainName, ]) " class="minimum-funds-description" /> @@ -194,6 +195,7 @@ const { status, } = useMetaTransaction() +const chainName = computed(() => getChainName(props.drop.chain)) const token = computed(() => prefixToToken[props.drop.chain]) const mintedNft = ref() diff --git a/components/common/autoTeleport/AutoTeleportActionButton.vue b/components/common/autoTeleport/AutoTeleportActionButton.vue index 0b0558833f..87d5bdccc0 100644 --- a/components/common/autoTeleport/AutoTeleportActionButton.vue +++ b/components/common/autoTeleport/AutoTeleportActionButton.vue @@ -114,7 +114,7 @@ const amount = ref() const { isAvailable: isAutoTeleportAvailable, - hasBalances, + isReady, hasEnoughInCurrentChain, hasEnoughInRichestChain, optimalTransition, @@ -163,12 +163,12 @@ const showAutoTeleport = computed( () => !hasEnoughInCurrentChain.value && isAutoTeleportAvailable.value && - hasBalances.value && + isReady.value && !props.disabled, ) const allowAutoTeleport = computed( - () => needsAutoTelport.value && canAutoTeleport.value && hasBalances.value, + () => needsAutoTelport.value && canAutoTeleport.value && isReady.value, ) const hasNoFundsAtAll = computed( @@ -188,7 +188,7 @@ const autoTeleportLabel = computed(() => { return props.label } - if (!hasBalances.value) { + if (!isReady.value) { return $i18n.t('autoTeleport.checking') } @@ -291,7 +291,7 @@ watchSyncEffect(() => { } }) -defineExpose({ hasBalances, optimalTransition }) +defineExpose({ isReady, optimalTransition }) diff --git a/components/profile/ProfileDetail.vue b/components/profile/ProfileDetail.vue index 4e6dee70d9..8b45056513 100644 --- a/components/profile/ProfileDetail.vue +++ b/components/profile/ProfileDetail.vue @@ -149,13 +149,25 @@ :label="$t('activity.sold')" url-param="sold" class="ml-4" /> + +
- +

- +
+ activeTab.value === ProfileTab.OWNED ? 'currentOwner_eq' : 'issuer_eq', +) + +const collections = ref( + route.query.collections?.toString().split(',').filter(Boolean) || [], +) + const itemsGridSearch = computed(() => { - const tabKey = - activeTab.value === ProfileTab.OWNED ? 'currentOwner_eq' : 'issuer_eq' const query: Record = { - [tabKey]: id.value, + [tabKey.value]: id.value, + burned_eq: false, } if (listed.value) { query['price_gt'] = 0 } - if (sold.value) { + + if (addSold.value) { query['events_some'] = { interaction_eq: 'BUY', AND: { caller_not_eq: id.value }, } } + if (collections.value?.length) { + query['collection'] = { + id_in: collections.value, + } + } + return query }) @@ -258,6 +286,9 @@ const activeTab = computed({ const listed = computed(() => route.query.buy_now === 'true') const sold = computed(() => route.query.sold === 'true') +const addSold = computed( + () => activeTab.value === ProfileTab.CREATED && sold.value, +) const isMyProfile = computed(() => id.value === accountId.value) const hasBlockExplorer = computed(() => hasExplorer(urlPrefix.value)) @@ -324,6 +355,12 @@ watch(itemsGridSearch, (searchTerm, prevSearchTerm) => { listingCartStore.clear() } }) + +watch(collections, (value) => { + replaceUrl({ + collections: value.length ? value.toString() : undefined, + }) +}) diff --git a/components/teleport/FundsAtRiskWarning.vue b/components/teleport/FundsAtRiskWarning.vue new file mode 100644 index 0000000000..fc21a8a571 --- /dev/null +++ b/components/teleport/FundsAtRiskWarning.vue @@ -0,0 +1,42 @@ + + + diff --git a/components/teleport/Teleport.vue b/components/teleport/Teleport.vue index 11054e7f3f..7cf5a7af65 100644 --- a/components/teleport/Teleport.vue +++ b/components/teleport/Teleport.vue @@ -1,5 +1,7 @@