mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 19:06:21 +00:00
enhance: update published-url to be property type of :url
This commit is contained in:
@@ -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 []
|
||||
|
||||
Reference in New Issue
Block a user