Browse Source

enhance(ui): polish the shui dialog details

charlie 1 year ago
parent
commit
1364e25714

+ 4 - 3
deps/shui/src/logseq/shui/dialog/core.cljs

@@ -122,9 +122,10 @@
                              (on-open-change {:value v :set-open! set-open!})
                              (set-open! v))))}
       (dialog-content props
-        (dialog-header
-          (when title (dialog-title title))
-          (when description (dialog-description description)))
+        (when title
+          (dialog-header
+            (when title (dialog-title title))
+            (when description (dialog-description description))))
         (when content
           [:div.ui__dialog-main-content content])
         (when footer

+ 1 - 1
src/main/frontend/components/container.css

@@ -534,7 +534,7 @@
   @apply w-auto md:max-w-4xl overflow-hidden;
 
   .settings-modal {
-    @apply -mx-6 -mt-10 -mb-6 rounded-xl;
+    @apply -mx-6 -mt-6 -mb-6 rounded-xl;
   }
 }
 

+ 3 - 2
src/main/frontend/components/header.cljs

@@ -178,13 +178,14 @@
 
                    (when login? {:hr true})
                    (when login?
-                     {:item [:span.flex.flex-col.relative.group.pt-1
+                     {:item [:span.flex.flex-col.relative.group.pt-1.w-full
                              [:b.leading-none (user-handler/username)]
                              [:small.opacity-70 (user-handler/email)]
                              [:i.absolute.opacity-0.group-hover:opacity-100.text-red-rx-09
                               {:class "right-1 top-3" :title (t :logout)}
                               (ui/icon "logout")]]
-                      :options {:on-click #(user-handler/logout)}})]
+                      :options {:on-click #(user-handler/logout)
+                                :class "w-full"}})]
                   (concat page-menu-and-hr)
                   (remove nil?)))]
     [:button.button.icon.toolbar-dots-btn

+ 2 - 2
src/main/frontend/components/plugins.cljs

@@ -1405,8 +1405,8 @@
 
 (defn open-waiting-updates-modal!
   []
-  (state/set-sub-modal!
-    (fn [_close!]
+  (shui/dialog-open!
+    (fn []
       (waiting-coming-updates))
     {:center? true}))
 

+ 3 - 8
src/main/frontend/components/plugins.css

@@ -451,21 +451,16 @@
   }
 
   &-waiting-updates {
-    margin: -15px;
-
     > ul {
       li {
-        user-select: none;
-        justify-content: space-between;
-        opacity: .9;
+        @apply select-none justify-between opacity-90;
 
         sup {
-          padding-left: 8px;
-          font-weight: 400;
+          @apply pl-2 font-medium;
         }
 
         &:hover, &.checked {
-          opacity: 1;
+          @apply opacity-100;
         }
       }
     }