diff --git a/frontend/src/app/main/data/profile.cljs b/frontend/src/app/main/data/profile.cljs index 4a0fe03cb6..12d9d32a72 100644 --- a/frontend/src/app/main/data/profile.cljs +++ b/frontend/src/app/main/data/profile.cljs @@ -158,8 +158,17 @@ (update [_ state] (update-in state [:profile :theme] (fn [current] - (let [current (if (= current "system") + (let [current (cond + (= current "system") (theme/get-system-theme) + + ;; NOTE: this is a workaround for + ;; the old data on the database + ;; where whe have `default` value + (= current "default") + "dark" + + :else current)] (case current "dark" "light" diff --git a/frontend/src/app/main/ui/settings/options.cljs b/frontend/src/app/main/ui/settings/options.cljs index 5d3ff406e9..d855086816 100644 --- a/frontend/src/app/main/ui/settings/options.cljs +++ b/frontend/src/app/main/ui/settings/options.cljs @@ -37,7 +37,11 @@ [] (let [profile (mf/deref refs/profile) initial (mf/with-memo [profile] - (update profile :lang #(or % ""))) + (-> profile + (update :lang #(or % "")) + (update :theme #(if (= % "default") + "dark" + %)))) form (fm/use-form :schema schema:options-form :initial initial)] diff --git a/frontend/src/app/util/theme.cljs b/frontend/src/app/util/theme.cljs index 3c07f7ab68..e4c8db8bb7 100644 --- a/frontend/src/app/util/theme.cljs +++ b/frontend/src/app/util/theme.cljs @@ -44,5 +44,7 @@ (mf/with-effect [system-theme profile-theme] (set-color-scheme - (if (= profile-theme "system") system-theme - (d/nilv profile-theme "dark")))))) + (cond + (= profile-theme "system") system-theme + (= profile-theme "default") "dark" + :else (d/nilv profile-theme "dark"))))))