Browse Source

fix: asset display in property value

Tienson Qin 5 months ago
parent
commit
d14cfb07bc
2 changed files with 27 additions and 26 deletions
  1. 23 23
      src/main/frontend/components/block.css
  2. 4 3
      src/main/frontend/components/property.cljs

+ 23 - 23
src/main/frontend/components/block.css

@@ -25,29 +25,6 @@
     }
   }
 
-  .asset-container {
-    @apply relative inline-block mt-2 w-full;
-
-    .asset-action-bar {
-      @apply top-1 right-1 absolute flex items-center opacity-0 transition-opacity;
-
-      &[data-popup-active] {
-        @apply opacity-100;
-      }
-    }
-
-    .asset-action-btn {
-      @apply m-1 p-0.5 truncate flex items-center opacity-70 select-none
-      hover:opacity-90 active:opacity-60;
-    }
-
-    &:hover, &:active {
-      .asset-action-bar {
-        @apply opacity-100;
-      }
-    }
-  }
-
   .draw [aria-labelledby="shapes-title"] {
     position: absolute;
     left: 50%;
@@ -1160,3 +1137,26 @@ html.is-mac {
 .ls-dialog-block {
     @apply !w-[90dvw] !h-[75%] !max-w-4xl bg-gray-02 overflow-scroll;
 }
+
+.asset-container {
+    @apply relative inline-block mt-2 w-full;
+
+    .asset-action-bar {
+        @apply top-1 right-1 absolute flex items-center opacity-0 transition-opacity;
+
+        &[data-popup-active] {
+            @apply opacity-100;
+        }
+    }
+
+    .asset-action-btn {
+        @apply m-1 p-0.5 truncate flex items-center opacity-70 select-none
+        hover:opacity-90 active:opacity-60;
+    }
+
+    &:hover, &:active {
+        .asset-action-bar {
+            @apply opacity-100;
+        }
+    }
+}

+ 4 - 3
src/main/frontend/components/property.cljs

@@ -489,11 +489,12 @@
 
          (let [property-desc (when-not (= (:db/ident property) :logseq.property/description)
                                (:logseq.property/description property))]
-           [:div.ls-block.property-value-container.flex.flex-row.gap-1.items-center
+           [:div.ls-block.property-value-container.flex.flex-row.gap-1.items-start
 
             (when-not (or block? (and property-desc (:class-schema? opts)))
-              [:div {:class "pl-1.5 -mr-[3px] opacity-60"}
-               [:span.bullet-container [:span.bullet]]])
+              [:div.flex.h-6.items-center
+               [:div {:class "pl-1.5 -mr-[3px] opacity-60"}
+                [:span.bullet-container [:span.bullet]]]])
             [:div.flex.flex-1
              [:div.property-value.flex.flex-1
               (if (:class-schema? opts)