mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
enhance(ui): polish property dropdown editor
This commit is contained in:
@@ -354,10 +354,14 @@ a.control-link {
|
||||
}
|
||||
|
||||
.inner-wrap {
|
||||
@apply flex items-center w-full justify-between gap-1 flex-wrap;
|
||||
@apply flex items-center w-full justify-between gap-1 flex-nowrap;
|
||||
|
||||
> .property-setting-title {
|
||||
@apply flex items-center gap-1 font-normal opacity-90;
|
||||
@apply flex items-center gap-1 font-normal opacity-90 overflow-hidden;
|
||||
|
||||
> span {
|
||||
@apply whitespace-nowrap text-ellipsis overflow-hidden;
|
||||
}
|
||||
}
|
||||
|
||||
> label {
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
[:div.property-setting-title
|
||||
(some-> icon (name) (shui/tabler-icon {:size 14
|
||||
:style {:margin-top "-1"}}))
|
||||
[:span title]]
|
||||
[:span {:title title} title]]
|
||||
(cond
|
||||
(fn? desc)
|
||||
(desc)
|
||||
@@ -462,13 +462,14 @@
|
||||
[choices]
|
||||
(let [select-cp (fn [opts]
|
||||
(shui/select
|
||||
opts
|
||||
(shui/select-trigger
|
||||
(shui/select-value {:placeholder "Select a choice"}))
|
||||
(shui/select-content
|
||||
(map (fn [choice]
|
||||
(shui/select-item {:key (str (:db/id choice))
|
||||
:value (:db/id choice)} (:block/title choice))) choices))))
|
||||
opts
|
||||
(shui/select-trigger
|
||||
{:class "h-8"}
|
||||
(shui/select-value {:placeholder "Select a choice"}))
|
||||
(shui/select-content
|
||||
(map (fn [choice]
|
||||
(shui/select-item {:key (str (:db/id choice))
|
||||
:value (:db/id choice)} (:block/title choice))) choices))))
|
||||
checked-choice (some (fn [choice] (when (true? (:logseq.property/choice-checkbox-state choice)) choice)) choices)
|
||||
unchecked-choice (some (fn [choice] (when (false? (:logseq.property/choice-checkbox-state choice)) choice)) choices)]
|
||||
[:div.flex.flex-col.gap-4.text-sm.p-2
|
||||
|
||||
Reference in New Issue
Block a user