Reapply "fix(app): more startup efficiency (#18985)"
This reverts commit cbe1337f24.
This commit is contained in:
parent
0dbfefa080
commit
2b0baf97bd
8 changed files with 241 additions and 129 deletions
|
|
@ -118,8 +118,11 @@ export const { use: useSettings, provider: SettingsProvider } = createSimpleCont
|
|||
|
||||
createEffect(() => {
|
||||
if (typeof document === "undefined") return
|
||||
void loadFont().then((x) => x.ensureMonoFont(store.appearance?.font))
|
||||
document.documentElement.style.setProperty("--font-family-mono", monoFontFamily(store.appearance?.font))
|
||||
const id = store.appearance?.font ?? defaultSettings.appearance.font
|
||||
if (id !== defaultSettings.appearance.font) {
|
||||
void loadFont().then((x) => x.ensureMonoFont(id))
|
||||
}
|
||||
document.documentElement.style.setProperty("--font-family-mono", monoFontFamily(id))
|
||||
})
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue