feat: add show-command-doc? config

pull/2223/head
Junyu Zhan 2021-06-08 00:28:01 +08:00 committed by Tienson Qin
parent c123f978a5
commit 9e3c197d8e
3 changed files with 10 additions and 2 deletions

View File

@ -42,7 +42,7 @@
(fn [item]
(let [command-name (first item)
command-doc (get item 2)]
[:div {:title command-doc} command-name]))
[:div {:title (when (state/show-command-doc?) command-doc)} command-name]))
:on-chosen
(fn [chosen-item]

View File

@ -429,7 +429,7 @@
;; (remove #(= leader-parent %)))]
;; (prn "followers: " (count followers))
;; ))
)))
)))
(defn get-edit-input-id
[]
@ -1060,6 +1060,12 @@
:ui/enable-tooltip?
true))
(defn show-command-doc?
[]
(get (get (sub-config) (get-current-repo))
:ui/show-command-doc?
true))
(defn set-config!
[repo-url value]
(set-state! [:config repo-url] value))

View File

@ -96,6 +96,8 @@
;; :editor/down ["ctrl+j" "down"]
;; :editor/left ["ctrl+h" "left"]
;; :editor/right ["ctrl+l" "right"]}
;; Whether to show command doc on hover
:ui/show-command-doc? true
;; The app will show those queries in today's journal page,
;; the "NOW" query asks the tasks which need to be finished "now",