mirror of
https://github.com/penpot/penpot.git
synced 2026-04-26 03:38:18 +00:00
🐛 Enable switch to system theme on options menu (#6946)
This commit is contained in:
parent
c49e9fbf18
commit
f76391ecbb
@ -53,6 +53,7 @@
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Fix unexpected exception on processing old texts [Github #6889](https://github.com/penpot/penpot/pull/6889)
|
||||
- Fix UI theme selection from main menu [Taiga #11567](https://tree.taiga.io/project/penpot/issue/11567)
|
||||
|
||||
## 2.8.0
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
[app.plugins.register :as plugins.register]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
[app.util.storage :as storage]
|
||||
[app.util.theme :as theme]
|
||||
[beicon.v2.core :as rx]
|
||||
[potok.v2.core :as ptk]))
|
||||
|
||||
@ -159,9 +158,6 @@
|
||||
(update-in state [:profile :theme]
|
||||
(fn [current]
|
||||
(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
|
||||
@ -172,7 +168,8 @@
|
||||
current)]
|
||||
(case current
|
||||
"dark" "light"
|
||||
"light" "dark"
|
||||
"light" "system"
|
||||
"system" "dark"
|
||||
; Failsafe for missing data
|
||||
"dark")))))
|
||||
|
||||
|
||||
@ -280,8 +280,8 @@
|
||||
:data-testid "toggle-theme"
|
||||
:id "file-menu-toggle-theme"}
|
||||
[:span {:class (stl/css :item-name)}
|
||||
(case (:theme profile) ;; default = dark -> light -> system -> dark and so on
|
||||
"default" (tr "workspace.header.menu.toggle-light-theme")
|
||||
(case (:theme profile) ;; dark -> light -> system -> dark and so on
|
||||
"dark" (tr "workspace.header.menu.toggle-light-theme")
|
||||
"light" (tr "workspace.header.menu.toggle-system-theme")
|
||||
"system" (tr "workspace.header.menu.toggle-dark-theme")
|
||||
(tr "workspace.header.menu.toggle-light-theme"))]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user