Merge remote-tracking branch 'upstream/master' into whiteboards

This commit is contained in:
Peng Xiao
2022-08-23 11:33:30 +08:00
23 changed files with 439 additions and 320 deletions

View File

@@ -133,6 +133,7 @@
:selection/direction :down
:custom-context-menu/show? false
:custom-context-menu/links nil
:custom-context-menu/position nil
;; pages or blocks in the right sidebar
;; It is a list of `[repo db-id block-type block-data]` 4-tuple
@@ -369,9 +370,11 @@
(get (sub-config) (get-current-repo))))))
(defn enable-journals?
[repo]
(not (false? (:feature/enable-journals?
(get (sub-config) repo)))))
([]
(enable-journals? (get-current-repo)))
([repo]
(not (false? (:feature/enable-journals?
(get (sub-config) repo))))))
(defn enable-flashcards?
([]
@@ -771,16 +774,18 @@
(:selection/direction @state))
(defn show-custom-context-menu!
[links]
[links position]
(swap! state assoc
:custom-context-menu/show? true
:custom-context-menu/links links))
:custom-context-menu/links links
:custom-context-menu/position position))
(defn hide-custom-context-menu!
[]
(swap! state assoc
:custom-context-menu/show? false
:custom-context-menu/links nil))
:custom-context-menu/links nil
:custom-context-menu/position nil))
(defn toggle-navigation-item-collapsed!
[item]