feat(#22): Add settings page with language switcher
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<UApp>
|
||||
<UApp :locale="locales[locale]">
|
||||
<NuxtLoadingIndicator />
|
||||
|
||||
<NuxtLayout>
|
||||
@@ -11,9 +11,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import * as locales from '@nuxt/ui/locale'
|
||||
|
||||
const { locale } = useI18n()
|
||||
const colorMode = useColorMode()
|
||||
|
||||
const color = computed(() => (colorMode.value === 'dark' ? '#111827' : 'white'))
|
||||
const lang = computed(() => locales[locale.value].code)
|
||||
const dir = computed(() => locales[locale.value].dir)
|
||||
|
||||
useHead({
|
||||
meta: [
|
||||
@@ -23,7 +28,8 @@ useHead({
|
||||
],
|
||||
link: [{ rel: 'icon', href: '/favicon.ico' }],
|
||||
htmlAttrs: {
|
||||
lang: 'en'
|
||||
lang,
|
||||
dir
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user