A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: fix theme not persisting
Abdullah Attaa17414dd8987
diff --git a/apps/web/src/stores/theme-store.ts b/apps/web/src/stores/theme-store.tsindex fe39d83ce..2f435a928 100644--- a/apps/web/src/stores/theme-store.ts+++ b/apps/web/src/stores/theme-store.ts@@ -32,8 +32,8 @@ import { ThemesRouter } from "../common/themes-router";type ColorScheme = "dark" | "light";class ThemeStore extends BaseStore<ThemeStore> {colorScheme: "dark" | "light" = Config.get("colorScheme", "light");- darkTheme = ThemeDark; // getTheme("dark");- lightTheme = ThemeLight; // getTheme("light");+ darkTheme = getTheme("dark");+ lightTheme = getTheme("light");followSystemTheme = Config.get("followSystemTheme", false);init = async () => {@@ -42,11 +42,10 @@ class ThemeStore extends BaseStore<ThemeStore> {colorScheme === "dark" ? darkTheme : lightTheme,this.get().followSystemTheme);- // this.set({- // darkTheme: await updateTheme(darkTheme),- // lightTheme: await updateTheme(lightTheme)- // });- console.log(darkTheme, lightTheme);+ this.set({+ darkTheme: await updateTheme(darkTheme),+ lightTheme: await updateTheme(lightTheme)+ });};setTheme = (theme: ThemeDefinition) => {