mirror of https://github.com/logseq/logseq
parent
687283af12
commit
e14a8d4a93
|
@ -39,8 +39,7 @@
|
||||||
"Your commit message:"]]]
|
"Your commit message:"]]]
|
||||||
|
|
||||||
[:input#commit-message.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
|
[:input#commit-message.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
|
||||||
{:style {:color "#000"}
|
{:auto-focus true
|
||||||
:auto-focus true
|
|
||||||
:default-value ""}]
|
:default-value ""}]
|
||||||
|
|
||||||
[:div.mt-5.sm:mt-4.sm:flex.sm:flex-row-reverse
|
[:div.mt-5.sm:mt-4.sm:flex.sm:flex-row-reverse
|
||||||
|
|
|
@ -185,7 +185,6 @@
|
||||||
|
|
||||||
[:input.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
|
[:input.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
|
||||||
{:auto-focus true
|
{:auto-focus true
|
||||||
:style {:color "#000"}
|
|
||||||
:on-change (fn [e]
|
:on-change (fn [e]
|
||||||
(reset! input (util/evalue e)))}]
|
(reset! input (util/evalue e)))}]
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
|
|
||||||
[:input.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
|
[:input.form-input.block.w-full.sm:text-sm.sm:leading-5.my-2
|
||||||
{:auto-focus true
|
{:auto-focus true
|
||||||
:style {:color "#000"}
|
|
||||||
:on-change (fn [e]
|
:on-change (fn [e]
|
||||||
(reset! project (util/evalue e)))}]
|
(reset! project (util/evalue e)))}]
|
||||||
|
|
||||||
|
|
|
@ -341,11 +341,11 @@
|
||||||
|
|
||||||
(defn rename!
|
(defn rename!
|
||||||
[old-name new-name]
|
[old-name new-name]
|
||||||
|
(let [new-name (string/trim new-name)]
|
||||||
|
(when-not (string/blank? new-name)
|
||||||
(when (and old-name new-name
|
(when (and old-name new-name
|
||||||
(not= (string/lower-case old-name) (string/lower-case new-name)))
|
(not= (string/trim old-name) (string/trim new-name)))
|
||||||
(when-let [repo (state/get-current-repo)]
|
(when-let [repo (state/get-current-repo)]
|
||||||
(if (db/entity [:page/name (string/lower-case new-name)])
|
|
||||||
(notification/show! "Page already exists!" :error)
|
|
||||||
(when-let [page (db/entity [:page/name (string/lower-case old-name)])]
|
(when-let [page (db/entity [:page/name (string/lower-case old-name)])]
|
||||||
(let [old-original-name (:page/original-name page)
|
(let [old-original-name (:page/original-name page)
|
||||||
file (:page/file page)
|
file (:page/file page)
|
||||||
|
@ -384,7 +384,7 @@
|
||||||
|
|
||||||
(repo-handler/push-if-auto-enabled! repo)
|
(repo-handler/push-if-auto-enabled! repo)
|
||||||
|
|
||||||
(ui-handler/re-render-root!))))))
|
(ui-handler/re-render-root!)))))))
|
||||||
|
|
||||||
(defn rename-when-alter-title-property!
|
(defn rename-when-alter-title-property!
|
||||||
[page path format original-content content]
|
[page path format original-content content]
|
||||||
|
|
Loading…
Reference in New Issue