Move property-edit to file-based.property

Also, util.property -> file-based.property.util
This commit is contained in:
Tienson Qin
2023-07-27 11:47:08 +08:00
parent 4a5dd5bd83
commit 1671f540fb
20 changed files with 388 additions and 346 deletions

View File

@@ -32,7 +32,7 @@
[frontend.util.fs :as fs-util]
[frontend.util.page-property :as page-property]
[frontend.util.page :as page-util]
[frontend.util.property-edit :as property-edit]
[frontend.handler.file-based.property :as file-property]
[frontend.util.url :as url-util]
[goog.functions :refer [debounce]]
[goog.object :as gobj]
@@ -578,11 +578,10 @@
properties-content
(string/includes? (util/page-name-sanity-lc properties-content)
old-page-name))
(let [front-matter? (and (property-edit/front-matter?-when-file-based properties-content)
(let [front-matter? (and (file-property/front-matter?-when-file-based properties-content)
(= :markdown (:block/format properties-block)))]
{:db/id (:db/id properties-block)
:block/content (property-edit/insert-property-when-file-based
repo
:block/content (file-property/insert-property
(:block/format properties-block)
properties-content
:title