82
82
import { NeoDropdown , NeoDropdownItem , NeoIcon } from ' @kodadot1/brick'
83
83
import type { Prefix } from ' @kodadot1/static'
84
84
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'
86
86
87
87
const { urlPrefix } = usePrefix ()
88
- // const { isAssetHub } = useIsChain(urlPrefix)
89
88
const { neoModal } = useProgrammatic ()
89
+ const { $i18n } = useNuxtApp ()
90
90
91
91
const menus = ref <{ label: string , to: string , check: (v : Prefix ) => boolean }[]>([
92
92
{
@@ -99,23 +99,13 @@ const menus = ref<{ label: string, to: string, check: (v: Prefix) => boolean }[]
99
99
to: ` /${urlPrefix .value }/teleport ` ,
100
100
check: teleportVisible ,
101
101
},
102
+ {
103
+ label: $i18n .t (' swap.swap' ),
104
+ to: ` /${urlPrefix .value }/swap ` ,
105
+ check: swapVisible ,
106
+ },
102
107
])
103
108
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
-
119
109
const filteredMenus = computed (() =>
120
110
menus .value .filter (menu => menu .check (urlPrefix .value )),
121
111
)
0 commit comments