feat(sync): 持久化类型化主题与编辑器偏好并支持草稿恢复

This commit is contained in:
2026-09-08 19:54:24 +08:00
parent cf39b1a905
commit 5c995e66be
20 changed files with 681 additions and 16 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import { useSettingsStore } from './stores/settings'
import { watch } from 'vue'
import { appLocale } from './i18n'
import { updateDocumentTitle } from './router'
import { installPreferenceSync } from './services/platform/preferenceSync'
import { installDesktopLifecycle } from './services/platform/lifecycle'
const app = createApp(App)
@@ -20,7 +21,7 @@ app.use(router)
const themeStore = useThemeStore()
const settingsStore = useSettingsStore()
void themeStore.initTheme()
void themeStore.initTheme().then(installPreferenceSync, installPreferenceSync)
watch(appLocale, () => updateDocumentTitle())
watch(() => settingsStore.spellCheck, (enabled) => {
document.body.spellcheck = enabled