Skip to content

Commit

Permalink
🔧 resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
roiLeo committed Oct 24, 2023
2 parents 1461788 + d2a7382 commit cb7628c
Show file tree
Hide file tree
Showing 13 changed files with 627 additions and 536 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ For crafting much better culture and Developer Experience, we reccomend some ext

This repository has a [code of conduct](CODE_OF_CONDUCT.md) and we will remove things that do not respect it.

### Want to ask question?

[Ask smart questions best](http://www.catb.org/~esr/faqs/smart-questions.html)

## Follow us

- [Twitter @KodaDot](https://twitter.com/kodadot)
Expand Down
1 change: 1 addition & 0 deletions components/common/listingCart/ListingCartModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
variant="k-accent"
no-shadow
class="is-flex is-flex-grow-1 py-5"
size="large"
@click="confirm" />
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions components/common/shoppingCart/ShoppingCartModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
<NeoButton
:label="$t('shoppingCart.completePurchase')"
:disabled="!numberOfItems"
class="w-full fixed-height"
class="w-full"
no-shadow
size="large"
variant="k-accent"
@click="onCompletePurchase" />
</div>
Expand Down Expand Up @@ -77,7 +78,8 @@
<NeoButton
:label="$t('shoppingCart.completePurchase')"
disabled
class="w-full fixed-height"
class="w-full"
size="large"
no-shadow
variant="k-accent" />
</div>
Expand Down Expand Up @@ -190,8 +192,4 @@ const onCompletePurchase = () => {
.scroll-y {
overflow-y: auto;
}
.fixed-height {
height: 3.5rem;
}
</style>
2 changes: 1 addition & 1 deletion components/landing/SignupBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const submit = async () => {
@import '@/assets/styles/abstracts/variables';
.fixed-height {
height: 2.5rem !important;
height: 2.5rem;
}
$column-gap: 20px;
Expand Down
32 changes: 16 additions & 16 deletions components/teleport/Teleport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ const currency = computed(() => {
switch (fromChain.value) {
case Chain.KUSAMA:
case Chain.BASILISK:
case Chain.STATEMINE:
case Chain.ASSETHUBKUSAMA:
return 'KSM'
case Chain.POLKADOT:
case Chain.STATEMINT:
case Chain.ASSETHUBPOLKADOT:
return 'DOT'
}
})
Expand All @@ -156,22 +156,22 @@ const tokenFiatValue = computed(() => {
})
const allowedTransitiosn = {
[Chain.KUSAMA]: [Chain.BASILISK, Chain.STATEMINE],
[Chain.KUSAMA]: [Chain.BASILISK, Chain.ASSETHUBKUSAMA],
[Chain.BASILISK]: [Chain.KUSAMA],
[Chain.STATEMINE]: [Chain.KUSAMA],
[Chain.POLKADOT]: [Chain.STATEMINT],
[Chain.STATEMINT]: [Chain.POLKADOT],
[Chain.ASSETHUBKUSAMA]: [Chain.KUSAMA],
[Chain.POLKADOT]: [Chain.ASSETHUBPOLKADOT],
[Chain.ASSETHUBPOLKADOT]: [Chain.POLKADOT],
}
const chainBalances = {
[Chain.KUSAMA]: () =>
identityStore.multiBalances.chains.kusama?.ksm?.nativeBalance,
[Chain.BASILISK]: () =>
identityStore.multiBalances.chains.basilisk?.ksm?.nativeBalance,
[Chain.STATEMINE]: () =>
[Chain.ASSETHUBKUSAMA]: () =>
identityStore.multiBalances.chains.kusamaHub?.ksm?.nativeBalance,
[Chain.POLKADOT]: () =>
identityStore.multiBalances.chains.polkadot?.dot?.nativeBalance,
[Chain.STATEMINT]: () =>
[Chain.ASSETHUBPOLKADOT]: () =>
identityStore.multiBalances.chains.polkadotHub?.dot?.nativeBalance,
}
Expand All @@ -190,15 +190,15 @@ const fromTabs = [
},
{
label: getChainName('ahk'),
value: Chain.STATEMINE,
value: Chain.ASSETHUBKUSAMA,
},
{
label: getChainName('dot'),
value: Chain.POLKADOT,
},
{
label: getChainName('ahp'),
value: Chain.STATEMINT,
value: Chain.ASSETHUBPOLKADOT,
},
]
const toTabs = [
Expand All @@ -214,8 +214,8 @@ const toTabs = [
},
{
label: getChainName('ahk'),
value: Chain.STATEMINE,
disabled: computed(() => isDisabled(Chain.STATEMINE)),
value: Chain.ASSETHUBKUSAMA,
disabled: computed(() => isDisabled(Chain.ASSETHUBKUSAMA)),
},
{
label: getChainName('dot'),
Expand All @@ -224,20 +224,20 @@ const toTabs = [
},
{
label: getChainName('ahp'),
value: Chain.STATEMINT,
disabled: computed(() => isDisabled(Chain.STATEMINT)),
value: Chain.ASSETHUBPOLKADOT,
disabled: computed(() => isDisabled(Chain.ASSETHUBPOLKADOT)),
},
]
const currentTokenDecimals = computed(() => {
switch (fromChain.value) {
case Chain.KUSAMA:
case Chain.BASILISK:
case Chain.STATEMINE:
case Chain.ASSETHUBKUSAMA:
return assets(5).decimals
case Chain.POLKADOT:
return decimalsOf('dot')
case Chain.STATEMINT:
case Chain.ASSETHUBPOLKADOT:
return decimalsOf('ahp')
}
})
Expand Down
25 changes: 19 additions & 6 deletions composables/useChainRedirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ const getAddress = (chain: string, accountId: string) => {
return encodeAddress(publicKey, CHAINS[chain].ss58Format)
}

const clearInstanceSortFromQuery = (query) => {
if (Array.isArray(query.sort)) {
query.sort = query.sort.filter((value) => !value.startsWith('instance_'))
return query
}

if (query.sort?.startsWith('instance_')) {
const { _sort, ...restOfQuery } = query
return restOfQuery
}

return query
}

function getRedirectPathForPrefix({
routeName,
chain,
Expand Down Expand Up @@ -66,16 +80,15 @@ function getRedirectPathForPrefix({
const { isRemark } = useIsChain(computed(() => chain))

// https://github.com/kodadot/nft-gallery/pull/7742#issuecomment-1771105341
if (!isRemark.value && restOfQuery.sort) {
restOfQuery.sort = restOfQuery.sort.filter(
(value) => !value.startsWith('instance_'),
)
}
const finalQuery =
!isRemark.value && restOfQuery.sort
? clearInstanceSortFromQuery(restOfQuery)
: restOfQuery
return {
params: {
prefix: chain,
},
query: restOfQuery,
query: finalQuery,
}
}

Expand Down
2 changes: 1 addition & 1 deletion libs/static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"devDependencies": {
"@vitest/coverage-c8": "^0.33.0",
"changelogen": "^0.5.5",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"eslint-config-unjs": "^0.2.1",
"prettier": "^2.8.8",
"typescript": "^4.9.5",
Expand Down
6 changes: 3 additions & 3 deletions libs/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"@histoire/plugin-vue": "^0.17.1",
"@oruga-ui/oruga-next": "^0.7.0",
"@vitejs/plugin-vue": "^4.4.0",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"eslint-plugin-vue": "^8.7.1",
"histoire": "^0.17.2",
"vite": "^4.4.11"
"vite": "^4.5.0"
},
"dependencies": {
"@google/model-viewer": "^3.3.0",
"@vueuse/core": "^9.13.0",
"bulma": "0.9.4",
"three": "^0.157.0",
"vue": "^3.3.4",
"vue": "^3.3.6",
"vue-audio-visual": "2.5.0"
}
}
5 changes: 5 additions & 0 deletions libs/ui/src/components/NeoButton/NeoButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
padding-top: 8px;
padding-bottom: 8px;

&.o-btn--large {
height: 3.5rem;
font-size: 1rem;
}

@include ktheme() {
box-shadow: theme('primary-shadow');
border: 1px solid theme('border-color');
Expand Down
7 changes: 7 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export default defineNuxtConfig({
host: '0.0.0.0',
},

vue: {
compilerOptions: {
// model-viewer from ModelMedia throw warning
isCustomElement: (tag) => tag.includes('model-viewer'),
},
},

nitro: {
publicAssets: [],
},
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@kodadot1/sub-api": "0.2.0-rc.0",
"@nuxtjs/apollo": "5.0.0-alpha.6",
"@nuxtjs/i18n": "8.0.0-rc.3",
"@paraspell/sdk": "^2.0.6",
"@paraspell/sdk": "^3.0.1",
"@pinia/nuxt": "^0.5.1",
"@polkadot/api": "^10.9.1",
"@polkadot/api-base": "^10.9.1",
Expand All @@ -84,7 +84,7 @@
"@polkadot/vue-identicon": "^3.6.2",
"@ramp-network/ramp-instant-sdk": "^4.0.4",
"@transak/transak-sdk": "^1.4.1",
"@types/node": "^20.8.6",
"@types/node": "^20.8.8",
"@vitejs/plugin-vue": "^4.4.0",
"apollo-boost": "^0.4.9",
"chart.js": "^3.9.1",
Expand All @@ -94,7 +94,7 @@
"date-fns": "^2.30.0",
"emoji-unicode": "^2.0.1",
"graphql": "^16.8.0",
"graphql-ws": "^5.14.1",
"graphql-ws": "^5.14.2",
"highlight.js": "^11.9.0",
"keen-slider": "^6.8.6",
"lazysizes": "^5.3.2",
Expand All @@ -115,7 +115,7 @@
"vue-dompurify-html": "^4.1.4",
"vue-social-sharing": "4.0.0-alpha4",
"vue-tippy": "^6.3.1",
"wavesurfer.js": "^7.3.8",
"wavesurfer.js": "^7.4.2",
"workbox-window": "^6.6.0"
},
"devDependencies": {
Expand All @@ -127,14 +127,14 @@
"@babel/plugin-transform-runtime": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@nuxt/content": "^2.8.5",
"@nuxt/types": "^2.17.1",
"@nuxt/types": "^2.17.2",
"@nuxtjs/color-mode": "^3.3.0",
"@playwright/test": "^1.39.0",
"@rollup/plugin-graphql": "^1.1.0",
"@types/jest": "^27.5.2",
"@types/markdown-it": "^12.2.3",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vite-pwa/nuxt": "^0.1.1",
"@vitest/coverage-istanbul": "^0.34.6",
"@vueuse/core": "^9.13.0",
Expand All @@ -143,7 +143,7 @@
"c8": "^7.14.0",
"consola": "^3.2.3",
"cross-env": "^7.0.3",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unicorn": "^48.0.1",
Expand All @@ -157,10 +157,10 @@
"lint-staged": "^12.5.0",
"nuxt-simple-sitemap": "^3.4.0",
"prettier": "^3.0.3",
"sass": "^1.69.3",
"sass": "^1.69.4",
"typescript": "^4.9.5",
"vitest": "^0.34.6",
"vue": "^3.3.4",
"vue": "^3.3.6",
"vue-debounce-decorator": "^1.0.1",
"vue-eslint-parser": "^9.3.2",
"vue-gtag": "^2.0.1",
Expand Down
Loading

0 comments on commit cb7628c

Please sign in to comment.