mirror of https://github.com/logseq/logseq
fix: rename to create page with recent property type change
parent
988f86345d
commit
06a1b69d6e
|
@ -127,7 +127,7 @@
|
|||
|
||||
(rum/defcs page-search < rum/reactive
|
||||
{:init (fn [state]
|
||||
(reset! (:editor/create-object? @state/state) true)
|
||||
(reset! (:editor/create-page? @state/state) true)
|
||||
state)
|
||||
:will-unmount (fn [state]
|
||||
(reset! commands/*current-command nil)
|
||||
|
@ -138,7 +138,7 @@
|
|||
db? (config/db-based-graph? (state/get-current-repo))
|
||||
embed? (and db? (= @commands/*current-command "Page embed"))
|
||||
tag? (= action :page-search-hashtag)
|
||||
create-object? (state/sub :editor/create-object?)]
|
||||
create-page? (state/sub :editor/create-page?)]
|
||||
(when (contains? #{:page-search :page-search-hashtag} action)
|
||||
(let [pos (state/get-editor-last-pos)
|
||||
input (gdom/getElement id)]
|
||||
|
@ -182,10 +182,10 @@
|
|||
[:div
|
||||
(when (and db? tag?)
|
||||
[:div.flex.flex-row.items-center.px-4.py-1.text-sm.opacity-70.gap-2
|
||||
"Create object:"
|
||||
(ui/toggle create-object?
|
||||
"Create page:"
|
||||
(ui/toggle create-page?
|
||||
(fn [_e]
|
||||
(swap! (:editor/create-object? @state/state) not))
|
||||
(swap! (:editor/create-page? @state/state) not))
|
||||
true)])
|
||||
(ui/auto-complete
|
||||
matched-pages
|
||||
|
@ -707,7 +707,7 @@
|
|||
(assoc state
|
||||
::id (str (random-uuid))))
|
||||
:will-unmount (fn [state]
|
||||
(reset! (:editor/create-object? @state/state) false)
|
||||
(reset! (:editor/create-page? @state/state) false)
|
||||
state)
|
||||
:did-mount (fn [state]
|
||||
(state/set-editor-args! (:rum/args state))
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
:block/refs []
|
||||
:block/link [:block/uuid (:block/uuid page-m)]}]
|
||||
merge-tx))))))
|
||||
(reset! (:editor/create-object? @state/state) false)))
|
||||
(reset! (:editor/create-page? @state/state) false)))
|
||||
|
||||
(defn rebuild-block-refs
|
||||
[block new-properties & {:keys [skip-content-parsing?]}]
|
||||
|
@ -286,7 +286,7 @@
|
|||
structured-tags? (and (config/db-based-graph? (state/get-current-repo))
|
||||
(:block/page block-entity)
|
||||
(seq (:block/tags m))
|
||||
@(:editor/create-object? @state/state))]
|
||||
@(:editor/create-page? @state/state))]
|
||||
(when id
|
||||
;; Retract attributes to prepare for tx which rewrites block attributes
|
||||
(let [retract-attributes (if db-based?
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
|
||||
:editor/code-block-context {}
|
||||
|
||||
:editor/create-object? (atom false)
|
||||
:editor/create-page? (atom false)
|
||||
|
||||
:db/properties-changed-pages {}
|
||||
:db/last-transact-time (atom {})
|
||||
|
|
Loading…
Reference in New Issue