Skip to content

Commit 7467051

Browse files
authored
Merge pull request #11231 from hassnian/issue-11216
feat: Swap Landing link
2 parents 44bf46c + 1e0cf84 commit 7467051

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

components/common/ConnectWallet/WalletAssetMenu.vue

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@
8282
import { NeoDropdown, NeoDropdownItem, NeoIcon } from '@kodadot1/brick'
8383
import type { Prefix } from '@kodadot1/static'
8484
import { langsFlags, setUserLocale } from '@/utils/config/i18n'
85-
import { transferVisible, teleportVisible } from '@/utils/config/permission.config'
85+
import { transferVisible, teleportVisible, swapVisible } from '@/utils/config/permission.config'
8686
8787
const { urlPrefix } = usePrefix()
88-
// const { isAssetHub } = useIsChain(urlPrefix)
8988
const { neoModal } = useProgrammatic()
89+
const { $i18n } = useNuxtApp()
9090
9191
const menus = ref<{ label: string, to: string, check: (v: Prefix) => boolean }[]>([
9292
{
@@ -99,23 +99,13 @@ const menus = ref<{ label: string, to: string, check: (v: Prefix) => boolean }[]
9999
to: `/${urlPrefix.value}/teleport`,
100100
check: teleportVisible,
101101
},
102+
{
103+
label: $i18n.t('swap.swap'),
104+
to: `/${urlPrefix.value}/swap`,
105+
check: swapVisible,
106+
},
102107
])
103108
104-
// TODO: enable when asset hub offers are ready
105-
// watchEffect(() => {
106-
// if (isAssetHub.value) {
107-
// menus.value.push({
108-
// label: 'Incoming Offers',
109-
// to: `/${urlPrefix.value}/incomingoffers`,
110-
// })
111-
112-
// menus.value.push({
113-
// label: 'Assets',
114-
// to: `/${urlPrefix.value}/assets`,
115-
// })
116-
// }
117-
// })
118-
119109
const filteredMenus = computed(() =>
120110
menus.value.filter(menu => menu.check(urlPrefix.value)),
121111
)

locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,6 +1840,7 @@
18401840
"selectOffer": "Select your offer",
18411841
"selectOfferSubtitle": "Select your NFTs you want to offer in this swap.",
18421842
"submit": "Submit Swap Offer",
1843+
"swap": "Swap",
18431844
"swapWithdrawl": "Swap Cancelation",
18441845
"youOffer": "You offer",
18451846
"youWillReceive": "You will receive",

0 commit comments

Comments
 (0)