mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 19:36:35 +00:00
fix: separate dict to solve cyclic dependency
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
(ns frontend.components.commit
|
||||
(:require [rum.core :as rum]
|
||||
[frontend.util :as util :refer-macros [profile]]
|
||||
[clojure.string :as string]
|
||||
[frontend.handler.repo :as repo-handler]
|
||||
[frontend.state :as state]
|
||||
[frontend.mixins :as mixins]
|
||||
@@ -53,3 +54,16 @@
|
||||
{:type "button"
|
||||
:on-click close-fn}
|
||||
"Cancel"]]]]))
|
||||
|
||||
(defn show-commit-modal! [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-and-push!)))))
|
||||
|
||||
Reference in New Issue
Block a user