mirror of
https://github.com/baserow/baserow.git
synced 2026-12-05 08:48:35 +00:00
Update the nuxt3 version. Co-authored-by: Jonathan Adeline <jonathan@baserow.io> Co-authored-by: Bram Wiepjes <bramw@protonmail.com> Co-authored-by: Cezary <cezary@baserow.io> Co-authored-by: Tsering Paljor <tsering@baserow.io> Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io> Co-authored-by: Bram <bram2w@users.noreply.github.com>
31 lines
794 B
Vue
31 lines
794 B
Vue
<template>
|
|
<div class="lang-picker">
|
|
<a
|
|
ref="dropdownLink"
|
|
class="lang-picker__link"
|
|
@click="$refs.dropdown.toggle($refs.dropdownLink)"
|
|
>
|
|
{{ visibleLanguageName }}
|
|
<i class="iconoir-nav-arrow-down lang-picker__icon"></i>
|
|
</a>
|
|
<LanguageSwitcherDropdown
|
|
ref="dropdown"
|
|
class="lang-picker__dropdown"
|
|
:show-input="false"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { computed } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
import LanguageSwitcherDropdown from '@baserow/modules/core/components/LangSwitcherDropdown'
|
|
|
|
const { locale, locales } = useI18n()
|
|
|
|
const visibleLanguageName = computed(() => {
|
|
const currentLocale = locales.value.find((l) => l.code === locale.value)
|
|
return currentLocale?.name || ''
|
|
})
|
|
</script>
|