Преглед изворни кода

Fix git commit command not opening

Removed unused event handler logic from when it was keydown based -
https://github.com/logseq/logseq/commit/5d0ecd68b2d5394db058bf7cdc3d0b359420effa
Gabriel Horner пре 2 година
родитељ
комит
739b953ea3

+ 2 - 12
src/main/frontend/components/commit.cljs

@@ -89,15 +89,5 @@
            "Commit"]]]])]))
 
 (defn show-commit-modal! [e]
-  (when (and
-         (util/electron?)
-         (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")))
-    #_:clj-kondo/ignore
-    (when-let [repo-url (state/get-current-repo)]
-      (when-not (state/get-edit-input-id)
-        (util/stop e)
-        (state/set-modal! add-commit-message)))))
+  (state/set-modal! add-commit-message)
+  (when e (util/stop e)))

+ 1 - 0
src/main/frontend/modules/shortcut/config.cljs

@@ -437,6 +437,7 @@
                                      :fn      ui-handler/toggle-cards!}
 
    :git/commit                      {:binding "mod+g c"
+                                     :inactive (not (util/electron?))
                                      :fn      commit/show-commit-modal!}
 
    :dev/show-block-data            {:binding false