mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 18:06:32 +00:00
Merge remote-tracking branch 'upstream/master' into whiteboards
This commit is contained in:
@@ -60,6 +60,8 @@
|
||||
:modal/close-btn? nil
|
||||
:modal/subsets []
|
||||
|
||||
;; left sidebar
|
||||
:ui/navigation-item-collapsed? {}
|
||||
|
||||
;; right sidebar
|
||||
:ui/fullscreen? false
|
||||
@@ -296,17 +298,22 @@
|
||||
(when-not (mobile-util/native-platform?)
|
||||
"local")))
|
||||
|
||||
(def default-config
|
||||
"Default config for a repo-specific, user config"
|
||||
{:feature/enable-search-remove-accents? true
|
||||
:default-arweave-gateway "https://arweave.net"})
|
||||
|
||||
(defn get-config
|
||||
"User config for the given repo or current repo if none given"
|
||||
([]
|
||||
(get-config (get-current-repo)))
|
||||
([repo-url]
|
||||
(get-in @state [:config repo-url])))
|
||||
|
||||
(def default-arweave-gateway "https://arweave.net")
|
||||
(merge default-config
|
||||
(get-in @state [:config repo-url]))))
|
||||
|
||||
(defn get-arweave-gateway
|
||||
[]
|
||||
(:arweave/gateway (get-config) default-arweave-gateway))
|
||||
(:arweave/gateway (get-config)))
|
||||
|
||||
(defonce built-in-macros
|
||||
{"img" "[:img.$4 {:src \"$1\" :style {:width $2 :height $3}}]"})
|
||||
@@ -755,6 +762,10 @@
|
||||
:custom-context-menu/show? false
|
||||
:custom-context-menu/links nil))
|
||||
|
||||
(defn toggle-navigation-item-collapsed!
|
||||
[item]
|
||||
(update-state! [:ui/navigation-item-collapsed? item] not))
|
||||
|
||||
(defn toggle-sidebar-open?!
|
||||
[]
|
||||
(swap! state update :ui/sidebar-open? not))
|
||||
@@ -1715,3 +1726,7 @@
|
||||
(defn unlinked-dir?
|
||||
[dir]
|
||||
(contains? (:file/unlinked-dirs @state) dir))
|
||||
|
||||
(defn enable-search-remove-accents?
|
||||
[]
|
||||
(:feature/enable-search-remove-accents? (get-config)))
|
||||
|
||||
Reference in New Issue
Block a user