enhance: update published-url to be property type of :url

This commit is contained in:
Tienson Qin
2025-12-30 11:07:47 +08:00
parent f8d4942857
commit d53ea4a38c
2 changed files with 17 additions and 14 deletions

View File

@@ -1238,25 +1238,28 @@
{:on-click #(<create-new-block! block property "")}
"Set default value"]
(= (:db/ident property) :logseq.property.publish/published-url)
[:div.flex.items-center.gap-2.w-full
[:a {:href (:block/title value)
:target "_blank"}
(:block/title value)]
(when-not config/publishing?
(shui/button
{:variant :text
:size :sm
:class "text-xs"
:on-click (fn [e]
(util/stop e)
(publish-handler/unpublish-page! block))}
"Unpublish"))]
text-ref-type?
(property-block-value value block property page-cp opts)
:else
(let [content (inline-text {} :markdown (macro-util/expand-value-if-macro (str value) (state/get-macros)))]
(cond
(= (:db/ident property) :logseq.property.publish/published-url)
[:div.flex.items-center.gap-2.w-full
content
(when-not config/publishing?
(shui/button
{:variant :text
:size :sm
:class "text-xs"
:on-click (fn [e]
(util/stop e)
(publish-handler/unpublish-page! block))}
"Unpublish"))]
(contains? (set (keys string-value-on-click))
(:db/ident property))
[:div.w-full {:on-click (fn []