diff --git a/ACTIVITY.md b/ACTIVITY.md index 264d8568c2..eba3684f78 100644 --- a/ACTIVITY.md +++ b/ACTIVITY.md @@ -40,14 +40,17 @@ flowchart TD ## Pace of development -## [![Repography logo](https://images.repography.com/logo.svg)](https://repography.com) / Recent activity [![Time period](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/pGfAgBUKqY3G-v6I743PiFRW_UY1tmd-HKHy6d1ear4/IHNavWbCVC3MxqvOc_yKjOWxIPiZr3TlKUnZDbWuTG0_badge.svg)](https://repography.com) -[![Issue status graph](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/pGfAgBUKqY3G-v6I743PiFRW_UY1tmd-HKHy6d1ear4/IHNavWbCVC3MxqvOc_yKjOWxIPiZr3TlKUnZDbWuTG0_issues.svg)](https://github.com/kodadot/nft-gallery/issues) -[![Pull request status graph](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/pGfAgBUKqY3G-v6I743PiFRW_UY1tmd-HKHy6d1ear4/IHNavWbCVC3MxqvOc_yKjOWxIPiZr3TlKUnZDbWuTG0_prs.svg)](https://github.com/kodadot/nft-gallery/pulls) -[![Timeline graph](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/pGfAgBUKqY3G-v6I743PiFRW_UY1tmd-HKHy6d1ear4/IHNavWbCVC3MxqvOc_yKjOWxIPiZr3TlKUnZDbWuTG0_timeline.svg)](https://github.com/kodadot/nft-gallery/commits) -[![Top contributors](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/pGfAgBUKqY3G-v6I743PiFRW_UY1tmd-HKHy6d1ear4/IHNavWbCVC3MxqvOc_yKjOWxIPiZr3TlKUnZDbWuTG0_users.svg)](https://github.com/kodadot/nft-gallery/graphs/contributors) + +## [![Repography logo](https://images.repography.com/logo.svg)](https://repography.com) / Recent activity [![Time period](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/1nMiB_aZjymZHZUDQ6R3hWGHqWUWahnU6VdRYYv2InU/ygTelP2NVzMzr-XPmCeXq2GzAIHSFlcUsZDXKY3Qrl4_badge.svg)](https://repography.com) +[![Timeline graph](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/1nMiB_aZjymZHZUDQ6R3hWGHqWUWahnU6VdRYYv2InU/ygTelP2NVzMzr-XPmCeXq2GzAIHSFlcUsZDXKY3Qrl4_timeline.svg)](https://github.com/kodadot/nft-gallery/commits) +[![Issue status graph](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/1nMiB_aZjymZHZUDQ6R3hWGHqWUWahnU6VdRYYv2InU/ygTelP2NVzMzr-XPmCeXq2GzAIHSFlcUsZDXKY3Qrl4_issues.svg)](https://github.com/kodadot/nft-gallery/issues) +[![Pull request status graph](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/1nMiB_aZjymZHZUDQ6R3hWGHqWUWahnU6VdRYYv2InU/ygTelP2NVzMzr-XPmCeXq2GzAIHSFlcUsZDXKY3Qrl4_prs.svg)](https://github.com/kodadot/nft-gallery/pulls) +[![Top contributors](https://images.repography.com/23713223/kodadot/nft-gallery/recent-activity/1nMiB_aZjymZHZUDQ6R3hWGHqWUWahnU6VdRYYv2InU/ygTelP2NVzMzr-XPmCeXq2GzAIHSFlcUsZDXKY3Qrl4_users.svg)](https://github.com/kodadot/nft-gallery/graphs/contributors) + ## [![Repography logo](https://images.repography.com/logo.svg)](https://repography.com) / Top contributors -[![Top contributors](https://images.repography.com/23713223/kodadot/nft-gallery/top-contributors/pGfAgBUKqY3G-v6I743PiFRW_UY1tmd-HKHy6d1ear4/IHNavWbCVC3MxqvOc_yKjOWxIPiZr3TlKUnZDbWuTG0_table.svg)](https://github.com/kodadot/nft-gallery/graphs/contributors) +[![Top contributors](https://images.repography.com/23713223/kodadot/nft-gallery/top-contributors/1nMiB_aZjymZHZUDQ6R3hWGHqWUWahnU6VdRYYv2InU/ygTelP2NVzMzr-XPmCeXq2GzAIHSFlcUsZDXKY3Qrl4_table.svg)](https://github.com/kodadot/nft-gallery/graphs/contributors) + ### RepoTracker diff --git a/components/Navbar.vue b/components/Navbar.vue index 3801272b04..d6a28df712 100644 --- a/components/Navbar.vue +++ b/components/Navbar.vue @@ -205,7 +205,7 @@ import { useEventListener } from '@vueuse/core' import { useIdentityStore } from '@/stores/identity' import { getChainNameByPrefix } from '@/utils/chain' -import { createVisible } from '@/utils/config/permision.config' +import { createVisible } from '@/utils/config/permission.config' import ShoppingCartButton from './navbar/ShoppingCartButton.vue' const { $nextTick, $neoModal } = useNuxtApp() diff --git a/components/TheFooter.vue b/components/TheFooter.vue index c627c3b6fb..423fbe67dc 100644 --- a/components/TheFooter.vue +++ b/components/TheFooter.vue @@ -2,10 +2,10 @@ @@ -272,7 +275,4 @@ const socials = [ icon: 'reddit-alien', }, ] -const goToSocials = (url): void => { - window.open(url, '_blank') -} diff --git a/components/blog/BlogPost.vue b/components/blog/BlogPost.vue index 751af935b3..cd98a58959 100644 --- a/components/blog/BlogPost.vue +++ b/components/blog/BlogPost.vue @@ -21,6 +21,8 @@ diff --git a/components/items/ItemsGrid/useItemsGrid.ts b/components/items/ItemsGrid/useItemsGrid.ts index 6cfb38f6cc..962f122d96 100644 --- a/components/items/ItemsGrid/useItemsGrid.ts +++ b/components/items/ItemsGrid/useItemsGrid.ts @@ -26,10 +26,17 @@ export function useFetchSearch({ const { searchParams } = useSearchParams() - async function fetchSearch( - page: number, - loadDirection: 'up' | 'down' = 'down' - ) { + interface FetchSearchParams { + page?: number + loadDirection?: 'up' | 'down' + search?: { [key: string]: string | number }[] + } + + async function fetchSearch({ + page = 1, + loadDirection = 'down', + search, + }: FetchSearchParams) { if (isFetchingData.value) { return false } @@ -46,22 +53,33 @@ export function useFetchSearch({ } } + const variables = search + ? { + search, + first: first.value, + offset: (page - 1) * first.value, + orderBy: route.query.sort?.length + ? route.query.sort + : ['blockNumber_DESC'], + } + : { + denyList: getDenyList(urlPrefix.value), + orderBy: route.query.sort?.length + ? route.query.sort + : ['blockNumber_DESC'], + search: searchParams.value, + priceMin: Number(route.query.min), + priceMax: Number(route.query.max), + first: first.value, + offset: (page - 1) * first.value, + } + const queryPath = getQueryPath(client.value) const query = await resolveQueryPath(queryPath, 'nftListWithSearch') const result = await $apollo.query({ query: query.default, client: client.value, - variables: { - denyList: getDenyList(urlPrefix.value), - orderBy: route.query.sort?.length - ? route.query.sort - : ['blockNumber_DESC'], - search: searchParams.value, - priceMin: Number(route.query.min), - priceMax: Number(route.query.max), - first: first.value, - offset: (page - 1) * first.value, - }, + variables: variables, }) // handle results @@ -80,6 +98,11 @@ export function useFetchSearch({ return true } + const refetch = (search?: { [key: string]: string | number }[]) => { + nfts.value = [] + fetchSearch({ search }) + } + watch( [ () => route.query.sort, @@ -98,5 +121,6 @@ export function useFetchSearch({ return { nfts, fetchSearch, + refetch, } } diff --git a/components/landing/SearchLanding.vue b/components/landing/SearchLanding.vue index fdc3e4751c..615c6e2aff 100644 --- a/components/landing/SearchLanding.vue +++ b/components/landing/SearchLanding.vue @@ -29,8 +29,9 @@ + @click.prevent="switchChain(chain.value)"> {{ chainText(chain.text) }} {{ $t('beta') }} { } }) -const switchChain = (value) => { +const switchChain = (value, event) => { + event.preventDefault() if (value !== urlPrefix.value) { setUrlPrefix(value) } diff --git a/components/navbar/ProfileDropdown.vue b/components/navbar/ProfileDropdown.vue index 6f7406b6a6..3a7db3e471 100644 --- a/components/navbar/ProfileDropdown.vue +++ b/components/navbar/ProfileDropdown.vue @@ -4,6 +4,7 @@ v-if="account" class="navbar-item" role="button" + aria-label="open profile menu" @click="toggleWalletConnectModal"> diff --git a/components/navbar/ShoppingCartButton.vue b/components/navbar/ShoppingCartButton.vue index 23b8ad0ce7..fefda38ca0 100644 --- a/components/navbar/ShoppingCartButton.vue +++ b/components/navbar/ShoppingCartButton.vue @@ -1,5 +1,5 @@ + + diff --git a/components/profile/OrderByDropdown.vue b/components/profile/OrderByDropdown.vue new file mode 100644 index 0000000000..7f39f062f0 --- /dev/null +++ b/components/profile/OrderByDropdown.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/components/rmrk/Profile/ProfileActivity.vue b/components/profile/ProfileActivitySummery.vue similarity index 94% rename from components/rmrk/Profile/ProfileActivity.vue rename to components/profile/ProfileActivitySummery.vue index 5d5910d133..b03b864787 100644 --- a/components/rmrk/Profile/ProfileActivity.vue +++ b/components/profile/ProfileActivitySummery.vue @@ -4,7 +4,7 @@

{{ listedCount }} ⊆ {{ totalSoldItems }}

-

+

{{ $t('profileStats.listed') }} / {{ $t('profileStats.totalSoldItems') }}

@@ -25,11 +25,9 @@

⊆ -

-

-

+

{{ $t('profileStats.highestBuy') }} / {{ $t('profileStats.totalAmountSpend') }}

@@ -41,7 +39,7 @@

-

+

{{ $t('profileStats.totalHoldingsBoughtValues') }}

@@ -53,7 +51,7 @@

-

+

{{ $t('profileStats.maxSoldPrice') }} / {{ $t('profileStats.totalSellValues') }}

@@ -66,10 +64,10 @@ + + diff --git a/components/profile/ProfileGrid.vue b/components/profile/ProfileGrid.vue new file mode 100644 index 0000000000..68843d3d2c --- /dev/null +++ b/components/profile/ProfileGrid.vue @@ -0,0 +1,31 @@ + + + diff --git a/components/rmrk/Profile/ProfileLink.vue b/components/profile/ProfileLink.vue similarity index 100% rename from components/rmrk/Profile/ProfileLink.vue rename to components/profile/ProfileLink.vue diff --git a/components/profile/activityTab/Activity.vue b/components/profile/activityTab/Activity.vue new file mode 100644 index 0000000000..1734f9eba7 --- /dev/null +++ b/components/profile/activityTab/Activity.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/components/rmrk/Gallery/History.vue b/components/profile/activityTab/History.vue similarity index 88% rename from components/rmrk/Gallery/History.vue rename to components/profile/activityTab/History.vue index 334aa13f3e..a2fed23123 100644 --- a/components/rmrk/Gallery/History.vue +++ b/components/profile/activityTab/History.vue @@ -1,17 +1,6 @@ - - diff --git a/components/rmrk/Profile/Sales.vue b/components/rmrk/Profile/Sales.vue deleted file mode 100644 index d46e60c4ee..0000000000 --- a/components/rmrk/Profile/Sales.vue +++ /dev/null @@ -1,236 +0,0 @@ - - - diff --git a/components/shared/BalanceInput.vue b/components/shared/BalanceInput.vue index 2578f04a24..616fe181e3 100644 --- a/components/shared/BalanceInput.vue +++ b/components/shared/BalanceInput.vue @@ -37,108 +37,111 @@
- diff --git a/components/shared/TabItem.vue b/components/shared/TabItem.vue index b988d6e60c..63ce95a23c 100644 --- a/components/shared/TabItem.vue +++ b/components/shared/TabItem.vue @@ -2,7 +2,7 @@

(), { to: '', + tag: 'nuxt-link', } ) diff --git a/components/shared/form/BasicNumberInput.vue b/components/shared/form/BasicNumberInput.vue index c75b9d8580..f36dd0d928 100644 --- a/components/shared/form/BasicNumberInput.vue +++ b/components/shared/form/BasicNumberInput.vue @@ -21,30 +21,32 @@ - diff --git a/composables/transaction/transactionList.ts b/composables/transaction/transactionList.ts index 7dc01da461..3b867c54ac 100644 --- a/composables/transaction/transactionList.ts +++ b/composables/transaction/transactionList.ts @@ -103,16 +103,16 @@ export function execListTx(item: ActionList, api, executeTransaction) { const legacy = isLegacy(token.nftId) const paramResolver = assetHubParamResolver(legacy) executeTransaction({ - cb: getApiCall(api, item.urlPrefix, Interaction.LIST), + cb: getApiCall(api, item.urlPrefix, Interaction.LIST, legacy), arg: paramResolver(token.nftId, Interaction.LIST, token.price), successMessage: item.successMessage, errorMessage: item.errorMessage, }) } else { const tokens = item.token as TokenToList[] - const cb = getApiCall(api, item.urlPrefix, Interaction.LIST) const args = tokens.map((token) => { const legacy = isLegacy(token.nftId) + const cb = getApiCall(api, item.urlPrefix, Interaction.LIST, legacy) const paramResolver = assetHubParamResolver(legacy) return cb(...paramResolver(token.nftId, Interaction.LIST, token.price)) }) diff --git a/composables/useChainRedirect.ts b/composables/useChainRedirect.ts index d823a6e686..c27b82ab4a 100644 --- a/composables/useChainRedirect.ts +++ b/composables/useChainRedirect.ts @@ -3,7 +3,7 @@ import { assetsVisible, createVisible, incomingOfferssVisible, -} from '@/utils/config/permision.config' +} from '@/utils/config/permission.config' import { RawLocation } from 'vue-router/types/router' const NO_REDIRECT_ROUTE_NAMES = [ diff --git a/composables/useToken.ts b/composables/useToken.ts new file mode 100644 index 0000000000..11ddb07958 --- /dev/null +++ b/composables/useToken.ts @@ -0,0 +1,74 @@ +import { useFiatStore } from '@/stores/fiat' +import { type ChainProperties, type Prefix } from '@kodadot1/static' +import { chainPropListOf } from '@/utils/config/chain.config' +import { groupByNestedProperty } from '@/utils/objects' +import { availablePrefixes } from '@/utils/chain' + +export interface TokenDetails { + symbol: string + value: number | string | null + icon: string + chains: Prefix[] +} + +export default function useToken() { + const { getCurrentTokenValue } = useFiatStore() + const { getTokenIconBySymbol } = useIcon() + + const availableChains = availablePrefixes().map( + (item) => item.value as Prefix + ) + + const availableTokens = ['BSX', 'DOT', 'KSM'] + + const chainsProperties = computed(() => { + return availableChains.reduce( + (reducer, chain: Prefix) => ({ + ...reducer, + [chain]: chainPropListOf(chain), + }), + {} + ) as { [k in Prefix]: ChainProperties }[] + }) + + const groupedTokensByChains = computed(() => + groupByNestedProperty(chainsProperties.value, 'tokenSymbol') + ) + + const getTokenChain = (token: string): Prefix[] => + groupedTokensByChains.value[token] || [] + + const tokens = computed(() => { + const filteredTokens = Object.keys(groupedTokensByChains.value).filter( + (token) => availableTokens.includes(token) + ) + + return filteredTokens.map((tokenSymbol) => { + return { + symbol: tokenSymbol as string, + value: getCurrentTokenValue(tokenSymbol), + icon: getTokenIconBySymbol(tokenSymbol), + chains: getTokenChain(tokenSymbol), + } + }) + }) + + const getPrefixByToken = (token: string): Prefix | null => { + switch (token.toLowerCase()) { + case 'bsx': + return 'bsx' + case 'dot': + return 'dot' + case 'ksm': + return 'ksm' + default: + return null + } + } + + return { + tokens, + availableTokens, + getPrefixByToken, + } +} diff --git a/libs/ui/src/components/NeoButton/NeoButton.scss b/libs/ui/src/components/NeoButton/NeoButton.scss index de110c42e1..acf9ebc2fc 100644 --- a/libs/ui/src/components/NeoButton/NeoButton.scss +++ b/libs/ui/src/components/NeoButton/NeoButton.scss @@ -39,7 +39,7 @@ background: theme('background-color'); border: none; &:hover { - color: theme('k-hovergrey'); + color: theme('link-hover'); background: theme('background-color'); } diff --git a/libs/ui/src/components/NeoDropdown/NeoDropdown.vue b/libs/ui/src/components/NeoDropdown/NeoDropdown.vue index df3255c0c4..010dc51581 100644 --- a/libs/ui/src/components/NeoDropdown/NeoDropdown.vue +++ b/libs/ui/src/components/NeoDropdown/NeoDropdown.vue @@ -3,6 +3,12 @@ import { ODropdown } from '@oruga-ui/oruga' export default { mixins: [ODropdown], + props: { + mobileModal: { + type: Boolean, + default: false, + }, + }, computed: { rootClasses() { return [ diff --git a/locales/de.json b/locales/de.json index 7cca001ffb..a00afabf5d 100644 --- a/locales/de.json +++ b/locales/de.json @@ -643,11 +643,6 @@ "totalSoldItems": "Σ verkaufter Artikel", "totalHoldingsBoughtValues": "Ausgegebene KSM für die NFTs im Konto" }, - "tutorial": { - "create": "1. Erstelle ein polkadot.js Konto", - "ksm": "2. Besorge KSM", - "mint": "3. Minten" - }, "general": { "apply": "Anwenden", "using": "benutzen", diff --git a/locales/en.json b/locales/en.json index 4755fa4ea4..76670686dd 100644 --- a/locales/en.json +++ b/locales/en.json @@ -556,6 +556,7 @@ "UNLIST": "UNLIST", "RELIST": "RELIST", "SEND": "GIFT", + "SELL": "SELL", "CONSUME": "BURN", "BUY": "BUY", "MAKE_OFFER": "MAKE OFFER", @@ -1012,7 +1013,8 @@ "share": { "copyLink": "Copy Link", "qrCode": "QR Code", - "twitter": "Share on Twitter" + "twitter": "Share on Twitter", + "copyAddress": "Copy Address" }, "moreActions": { "download": "Download", diff --git a/pages/_prefix/explore/collectibles.vue b/pages/_prefix/explore/collectibles.vue index cbf04a98f5..f67c88cab4 100644 --- a/pages/_prefix/explore/collectibles.vue +++ b/pages/_prefix/explore/collectibles.vue @@ -1,11 +1,11 @@ diff --git a/pages/sales.vue b/pages/sales.vue index 87ccae759d..60f62a620f 100644 --- a/pages/sales.vue +++ b/pages/sales.vue @@ -8,7 +8,7 @@