Kaynağa Gözat

chore: rename :logseq.property/title-format to

:logseq.property.journal/title-format
Tienson Qin 1 yıl önce
ebeveyn
işleme
2293d11a2b

+ 1 - 1
deps/db/src/logseq/db/frontend/class.cljs

@@ -14,7 +14,7 @@
    :logseq.class/Card {:title "Card"}
 
    :logseq.class/Journal {:title "Journal"
-                          :properties {:logseq.property/title-format "MMM do, yyyy"}}
+                          :properties {:logseq.property.journal/title-format "MMM do, yyyy"}}
 
    ;; TODO: Add more classes such as :book, :paper, :movie, :music, :project
    })

+ 1 - 1
deps/db/src/logseq/db/frontend/entity_plus.cljc

@@ -21,7 +21,7 @@
 (defn- get-journal-title
   [db e]
   (date-time-util/int->journal-title (:block/journal-day e)
-                                     (:logseq.property/title-format (d/entity db :logseq.class/Journal))))
+                                     (:logseq.property.journal/title-format (d/entity db :logseq.class/Journal))))
 
 (defn- get-block-title
   [^Entity e k default-value]

+ 5 - 6
deps/db/src/logseq/db/frontend/property.cljs

@@ -91,14 +91,13 @@
                                   :schema {:type :map
                                            :hide? true}}
 
-   :logseq.property/title-format {:title "Title format"
-                                  :schema
-                                  {:type :string
-                                   :public? false}}
-
    ;; Journal props
+   :logseq.property.journal/title-format {:title "Title format"
+                                          :schema
+                                          {:type :string
+                                           :public? false}}
 
-   ;; TODO:
+   ;; TODO: should we replace block/journal-day with those separate props?
    ;; :logseq.property.journal/year {:title "Journal year"
    ;;                                :schema
    ;;                                {:type :raw-number

+ 1 - 1
src/main/frontend/components/settings.cljs

@@ -446,7 +446,7 @@
                         (if (config/db-based-graph? repo)
                           (property-handler/set-block-property! repo
                                                                 :logseq.class/Journal
-                                                                :logseq.property/title-format
+                                                                :logseq.property.journal/title-format
                                                                 format)
                           (do
                             (config-handler/set-config! :journal/page-title-format format)

+ 1 - 1
src/main/frontend/state.cljs

@@ -597,7 +597,7 @@ should be done through this fn in order to get global config and config defaults
     (if (sqlite-util/db-based-graph? repo)
       (when-let [conn (db-conn-state/get-conn repo)]
         (get (d/entity @conn :logseq.class/Journal)
-           :logseq.property/title-format
+           :logseq.property.journal/title-format
            "MMM do, yyyy"))
       (common-config/get-date-formatter (get-config)))))
 

+ 1 - 1
src/main/frontend/worker/db/migrate.cljs

@@ -179,7 +179,7 @@
    [11 {:fix property-checkbox-type-non-ref}]
    [12 {:fix update-block-type-many->one}]
    [13 {:classes [:logseq.class/Journal]
-        :properties [:logseq.property/title-format]}]])
+        :properties [:logseq.property.journal/title-format]}]])
 
 (let [max-schema-version (apply max (map first schema-version->updates))]
   (assert (<= db-schema/version max-schema-version))

+ 1 - 1
src/main/frontend/worker/handler/page/db_based/page.cljs

@@ -71,7 +71,7 @@
            uuid                     nil
            persist-op?              true}
     :as options}]
-  (let [date-formatter (:logseq.property/title-format (d/entity @conn :logseq.class/Journal))
+  (let [date-formatter (:logseq.property.journal/title-format (d/entity @conn :logseq.class/Journal))
         [title page-name] (get-title-and-pagename title)
         type (cond class?
                    "class"