Add hunt detail
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
const { locale, locales } = useI18n();
|
||||
|
||||
const availableLocales = computed(() => {
|
||||
return locales.value.filter((i) => i.code !== locale.value);
|
||||
});
|
||||
|
||||
function l(locale: (typeof locales.value)[0]) {
|
||||
return typeof locale === 'string' ? locale : locale.code;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VaSidebarItem
|
||||
v-for="loc in availableLocales"
|
||||
:key="loc.code"
|
||||
:to="$switchLocalePath(loc.code)"
|
||||
:title="$t('layouts.switch_lang', { locale: $t(`locales.${l(loc)}`) })"
|
||||
>
|
||||
<VaSidebarItemContent>
|
||||
<VaIcon name="language" />
|
||||
<VaSidebarItemTitle>
|
||||
{{ $t('layouts.switch_lang', { locale: $t(`locales.${l(loc)}`) }) }}
|
||||
</VaSidebarItemTitle>
|
||||
</VaSidebarItemContent>
|
||||
</VaSidebarItem>
|
||||
</template>
|
||||
Reference in New Issue
Block a user