Browse Source

enhance: move repeat settings to the right of datepicker

Tienson Qin 10 months ago
parent
commit
b194891cd8

+ 1 - 1
resources/css/shui.css

@@ -388,7 +388,7 @@ div[data-radix-popper-content-wrapper] {
   }
 
   .del-date-btn {
-    @apply absolute right-[13px] top-[21px] px-1 opacity-70 hover:opacity-100
+    @apply absolute right-[4px] top-[17px] px-1 opacity-70 hover:opacity-100
     active:opacity-80 hover:text-red-rx-09 rounded-md !h-6 !w-6;
   }
 

+ 5 - 5
src/main/frontend/components/property/value.cljs

@@ -318,10 +318,6 @@
                    (ui/hide-popups-until-preview-popup!)
                    (shui/dialog-close!)))))))]
     [:div.flex.flex-row.gap-2
-     (when datetime?
-       (repeat-setting block property value))
-     (when datetime?
-       (shui/separator {:orientation "vertical"}))
      [:div.flex.flex-col
       (ui/nlp-calendar
        (cond->
@@ -333,7 +329,11 @@
          :on-delete on-delete
          :on-day-click select-handler!}
          initial-month
-         (assoc :default-month initial-month)))]]))
+         (assoc :default-month initial-month)))]
+     (when datetime?
+       (shui/separator {:orientation "vertical"}))
+     (when datetime?
+       (repeat-setting block property value))]))
 
 (rum/defc date-picker
   [value {:keys [block property datetime? on-change on-delete del-btn? editing? multiple-values? other-position?]}]

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

@@ -1121,7 +1121,7 @@
                              (.setHours date h m 0))
                            (default-on-select date))))
                      default-on-select)]
-    [:div.flex.flex-col.gap-2
+    [:div.flex.flex-col.gap-2.relative
      (single-calendar (assoc opts :on-select on-select'))
      (when (:datetime? opts)
        (time-picker (cond->