Migrates to svelte 5

This commit is contained in:
Christian Beutel
2025-01-24 17:46:13 +01:00
parent 7571f6e9b9
commit 3721b7f537
106 changed files with 5524 additions and 4232 deletions

View File

@@ -1,4 +1,5 @@
import { browser } from '$app/environment'
import { pb } from '$lib/pocketbase'
import { currentUser } from '$lib/stores/user_store'
import { init, register } from 'svelte-i18n'
import { get } from 'svelte/store'
@@ -17,5 +18,5 @@ register('zh', () => import('./locales/zh.json'))
init({
fallbackLocale: defaultLocale,
initialLocale: browser ? get(currentUser)?.language ?? window.navigator.language : defaultLocale,
initialLocale: browser ? pb.authStore.model?.language ?? window.navigator.language : defaultLocale,
})