feat: add shortcut t c to toggle Contents

This commit is contained in:
Tienson Qin
2021-02-24 22:14:01 +08:00
parent 46d8270061
commit 84190df469
6 changed files with 29 additions and 8 deletions

View File

@@ -278,11 +278,13 @@
(state/sidebar-add-block! (state/get-current-repo) "help" :help nil)))
;; c
67 (fn [state e]
(when (and (not (util/input? (gobj/get e "target")))
(not (gobj/get e "shiftKey"))
(not (gobj/get e "ctrlKey"))
(not (gobj/get e "altKey"))
(not (gobj/get e "metaKey")))
(when (and
(string/starts-with? (state/get-current-repo) "https://")
(not (util/input? (gobj/get e "target")))
(not (gobj/get e "shiftKey"))
(not (gobj/get e "ctrlKey"))
(not (gobj/get e "altKey"))
(not (gobj/get e "metaKey")))
(when-let [repo-url (state/get-current-repo)]
(when-not (state/get-edit-input-id)
(util/stop e)