Browse Source

enhance(assets): improve external URL property visibility and styling

charlie 2 days ago
parent
commit
741e7db1f2

+ 3 - 3
deps/db/src/logseq/db/frontend/property.cljs

@@ -487,10 +487,10 @@
                                            :hide? true
                                            :public? false}
                                   :queryable? true}
-     :logseq.property.asset/external-src {:title "External Source URL"
+     :logseq.property.asset/external-src {:title "External URL"
                                           :schema {:type :string
-                                                   :hide? true
-                                                   :public? false}
+                                                   :hide? false
+                                                   :public? true}
                                           :queryable? true}
      :logseq.property.asset/size {:title "File Size"
                                   :schema {:type :raw-number

+ 2 - 1
src/main/frontend/components/block.cljs

@@ -2385,7 +2385,8 @@
      (let [area? (= :area (keyword (pu/lookup block :logseq.property.pdf/hl-type)))
            hl-ref #(when (not (#{:default :whiteboard-shape} block-type))
                      [:div.prefix-link
-                      {:on-pointer-down
+                      {:class (when (and (not db-based?) area?) "as-block")
+                       :on-pointer-down
                        (fn [^js e]
                          (let [^js target (.-target e)]
                            (case block-type

+ 4 - 0
src/main/frontend/extensions/pdf/pdf.css

@@ -803,6 +803,10 @@ html[data-theme=dark] {
       &:before {
         content: "📌 ";
       }
+
+      &.as-block {
+        @apply inline-block;
+      }
     }
 
     [data-hl-type=area] {