mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 01:46:35 +00:00
feat: db auto backup on desktop (#12275)
* feat: db auto backup on desktop * fix: press delete closes right sidebar fix https://github.com/logseq/db-test/issues/670 * disable git backup for db graphs since it's confusing Users can still use external Git for version control. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1301,12 +1301,21 @@ Similar to re-frame subscriptions"
|
||||
[item]
|
||||
(update-state! [:ui/navigation-item-collapsed? item] not))
|
||||
|
||||
(declare sidebar-add-block!)
|
||||
(defn- sidebar-add-content-when-open!
|
||||
[]
|
||||
(when (empty? (:sidebar/blocks @state))
|
||||
(sidebar-add-block! (get-current-repo) "contents" :contents)))
|
||||
|
||||
(defn toggle-sidebar-open?!
|
||||
[]
|
||||
(when-not (:ui/sidebar-open? @state)
|
||||
(sidebar-add-content-when-open!))
|
||||
(swap! state update :ui/sidebar-open? not))
|
||||
|
||||
(defn open-right-sidebar!
|
||||
[]
|
||||
(sidebar-add-content-when-open!)
|
||||
(swap! state assoc :ui/sidebar-open? true))
|
||||
|
||||
(defn hide-right-sidebar!
|
||||
|
||||
Reference in New Issue
Block a user