mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
feat(ui): custom editor font
This commit is contained in:
@@ -95,6 +95,7 @@
|
||||
:ui/custom-theme (or (storage/get :ui/custom-theme) {:light {:mode "light"} :dark {:mode "dark"}})
|
||||
:ui/wide-mode? (storage/get :ui/wide-mode)
|
||||
:ui/radix-color (storage/get :ui/radix-color)
|
||||
:ui/editor-font (storage/get :ui/editor-font)
|
||||
|
||||
;; ui/collapsed-blocks is to separate the collapse/expand state from db for:
|
||||
;; 1. right sidebar
|
||||
@@ -2385,6 +2386,11 @@ Similar to re-frame subscriptions"
|
||||
(storage/remove :ui/radix-color)
|
||||
(util/set-android-theme))
|
||||
|
||||
(defn set-editor-font! [font]
|
||||
(let [font (if (keyword? font) (name font) (str font))]
|
||||
(swap! state assoc :ui/editor-font font)
|
||||
(storage/set :ui/editor-font font)))
|
||||
|
||||
(defn handbook-open?
|
||||
[]
|
||||
(:ui/handbooks-open? @state))
|
||||
|
||||
Reference in New Issue
Block a user