Просмотр исходного кода

feat: add editor state for zotero

Junyu Zhan 4 лет назад
Родитель
Сommit
38ca811980
1 измененных файлов с 13 добавлено и 2 удалено
  1. 13 2
      src/main/frontend/state.cljs

+ 13 - 2
src/main/frontend/state.cljs

@@ -83,6 +83,7 @@
       :editor/show-date-picker? false
       ;; With label or other data
       :editor/show-input nil
+      :editor/show-zotero false
       :editor/last-saved-cursor nil
       :editor/editing? nil
       :editor/last-edit-block-input-id nil
@@ -540,6 +541,16 @@
   []
   (get @state :editor/show-input))
 
+
+(defn set-editor-show-zotero!
+  [value]
+  (set-state! :editor/show-zotero value))
+
+(defn get-editor-show-zotero
+  []
+  (get @state :editor/show-zotero))
+
+
 (defn set-edit-input-id!
   [input-id]
   (swap! state update :editor/editing?
@@ -1255,8 +1266,8 @@
   [q]
   (when-not (string/blank? q)
     (update-state! :search/graph-filters
-                  (fn [value]
-                    (vec (distinct (conj value q)))))))
+                   (fn [value]
+                     (vec (distinct (conj value q)))))))
 
 (defn remove-search-filter!
   [q]