feat: memorize language

pull/194/head
三咲智子 2022-11-28 15:12:13 +08:00
rodzic 5e0119aa84
commit 30eb95f1bd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 69992F2250DFD93E
4 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
import { decode } from 'blurhash'
import { getDataUrlFromArr } from '~~/composables/utils'
import { getDataUrlFromArr } from '~/composables/utils'
export default defineComponent({
inheritAttrs: false,

Wyświetl plik

@ -1,7 +1,10 @@
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
import { STORAGE_KEY_LANG } from '~/constants'
const { locale } = useI18n()
useLocalStorage(STORAGE_KEY_LANG, locale)
const languageList = [
{
value: 'en-US',

Wyświetl plik

@ -1,5 +1,5 @@
<script setup lang="ts">
import type { UserLogin } from '~~/types'
import type { UserLogin } from '~/types'
const all = useUsers()

Wyświetl plik

@ -10,4 +10,5 @@ export const STORAGE_KEY_CURRENT_USER = 'elk-current-user'
export const STORAGE_KEY_NOTIFY_TAB = 'elk-notify-tab'
export const STORAGE_KEY_FIRST_VISIT = 'elk-first-visit'
export const STORAGE_KEY_ZEN_MODE = 'elk-zenmode'
export const STORAGE_KEY_LANG = 'elk-lang'