Procházet zdrojové kódy

fix: tweak datetime label

DateTime is a lot more common than Datetime as it makes Time more
distinct and easier for users to visually parse
Gabriel Horner před 1 rokem
rodič
revize
6853acd0c9

+ 1 - 8
src/main/frontend/components/property.cljs

@@ -33,13 +33,6 @@
             [promesa.core :as p]
             [rum.core :as rum]))
 
-(defn- property-type-label
-  [property-type]
-  (case property-type
-    :default
-    "Text"
-    ((comp string/capitalize name) property-type)))
-
 (defn- <add-property-from-dropdown
   "Adds an existing or new property from dropdown. Used from a block or page context."
   [entity property-uuid-or-name schema {:keys [class-schema?]}]
@@ -83,7 +76,7 @@
                                   (when built-in?
                                     db-property-type/internal-built-in-property-types))
                           (map (fn [type]
-                                 {:label (property-type-label type)
+                                 {:label (property-config/property-type-label type)
                                   :value type})))]
     [:div {:class "flex items-center col-span-1"}
      (shui/select

+ 3 - 1
src/main/frontend/components/property/config.cljs

@@ -433,11 +433,13 @@
          (dropdown-editor-menuitem
           (assoc v :item-props item-props))))]))
 
-(defn- property-type-label
+(defn property-type-label
   [property-type]
   (case property-type
     :default
     "Text"
+    :datetime
+    "DateTime"
     ((comp string/capitalize name) property-type)))
 
 (defn- handle-delete-property!