Преглед изворни кода

fix: update config ux to deprecate :journal/page-title-format

In #11491 we deprecated this config but didn't update config to let
users know. Also disable re-index warning which doesn't apply to db graphs
Gabriel Horner пре 1 година
родитељ
комит
c594f3c49a

+ 1 - 0
deps/common/resources/templates/config.edn

@@ -26,6 +26,7 @@
  {:journals ""}
 
  ;; Set a custom date format for the journal page title.
+ ;; This is _only_ for file graphs.
  ;; Default value: "MMM do, yyyy"
  ;; e.g., "Jan 19th, 2038"
  ;; Example usage e.g., "Tue 19th, Jan 2038"

+ 6 - 5
src/main/frontend/components/settings.cljs

@@ -430,11 +430,12 @@
    [:label.block.text-sm.font-medium.leading-5.opacity-70
     {:for "custom_date_format"}
     (t :settings-page/custom-date-format)
-    (ui/tippy {:html        (t :settings-page/custom-date-format-warning)
-               :class       "tippy-hover ml-2"
-               :interactive true
-               :disabled    false}
-              (svg/info))]
+    (when-not (config/db-based-graph? (state/get-current-repo))
+     (ui/tippy {:html        (t :settings-page/custom-date-format-warning)
+                :class       "tippy-hover ml-2"
+                :interactive true
+                :disabled    false}
+               (svg/info)))]
    [:div.mt-1.sm:mt-0.sm:col-span-2
     [:div.max-w-lg.rounded-md
      [:select.form-select.is-small

+ 3 - 1
src/main/frontend/handler/common/config_edn.cljs

@@ -111,7 +111,9 @@ nested keys or positional errors e.g. tuples"
    :feature/enable-block-timestamps?
    "is not used in DB graphs as it is always enabled"
    :favorites
-   "is not stored in config for DB graphs"})
+   "is not stored in config for DB graphs"
+   :journal/page-title-format
+   "is not used in DB graphs"})
 
 (defn detect-deprecations
   "Detects config keys that will or have been deprecated"