mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 00:24:51 +00:00
feat: limit the scope of undo/redo to page only
This commit is contained in:
@@ -275,7 +275,9 @@
|
||||
:whiteboard/onboarding-whiteboard? (or (storage/get :ls-onboarding-whiteboard?) false)
|
||||
:whiteboard/onboarding-tour? (or (storage/get :whiteboard-onboarding-tour?) false)
|
||||
:whiteboard/last-persisted-at {}
|
||||
:whiteboard/pending-tx-data {}})))
|
||||
:whiteboard/pending-tx-data {}
|
||||
:history/page-only-mode? false
|
||||
:history/page nil})))
|
||||
|
||||
;; Block ast state
|
||||
;; ===============
|
||||
@@ -2093,3 +2095,13 @@ Similar to re-frame subscriptions"
|
||||
(defn clear-user-info!
|
||||
[]
|
||||
(storage/remove :user-groups))
|
||||
|
||||
(defn toggle-undo-redo-mode!
|
||||
[]
|
||||
(if (:history/page-only-mode? @state)
|
||||
(swap! state assoc
|
||||
:history/page-only-mode? false
|
||||
:history/page nil)
|
||||
(swap! state assoc
|
||||
:history/page-only-mode? true
|
||||
:history/page nil)))
|
||||
|
||||
Reference in New Issue
Block a user