Merge remote-tracking branch 'origin/master' into feat/ui-tweaks-settings

This commit is contained in:
charlie
2021-02-28 10:18:54 +08:00
18 changed files with 132 additions and 109 deletions

View File

@@ -274,6 +274,7 @@
(editor-handler/clear-selection! e)
(state/set-selection-start-block! nil))))
;; TODO: move to keyboards
(mixins/on-key-down
state
{;; esc
@@ -291,20 +292,7 @@
;; ?
191 (fn [state e]
(when-not (util/input? (gobj/get e "target"))
(state/sidebar-add-block! (state/get-current-repo) "help" :help nil)))
;; c
67 (fn [state e]
(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)
(state/set-modal! commit/add-commit-message)))))})))
(state/sidebar-add-block! (state/get-current-repo) "help" :help nil)))})))
{:did-mount (fn [state]
(keyboards/bind-shortcuts!)
state)}