mirror of https://github.com/logseq/logseq
enhance(ux): improve checkbox interaction for the block property value
parent
c801175831
commit
0bcea11a40
|
@ -743,14 +743,14 @@
|
||||||
:checkbox
|
:checkbox
|
||||||
(let [add-property! (fn []
|
(let [add-property! (fn []
|
||||||
(<add-property! block (:db/ident property) (boolean (not value))))]
|
(<add-property! block (:db/ident property) (boolean (not value))))]
|
||||||
(shui/checkbox {:class "jtrigger flex flex-row items-center"
|
[:label.flex.w-full.as-scalar-value-wrap.cursor-pointer
|
||||||
:disabled config/publishing?
|
(shui/checkbox {:class "jtrigger flex flex-row items-center"
|
||||||
:checked value
|
:disabled config/publishing?
|
||||||
:auto-focus true
|
:checked value
|
||||||
:on-checked-change add-property!
|
:on-checked-change add-property!
|
||||||
:on-key-down (fn [e]
|
:on-key-down (fn [e]
|
||||||
(when (= (util/ekey e) "Enter")
|
(when (= (util/ekey e) "Enter")
|
||||||
(add-property!)))}))
|
(add-property!)))})])
|
||||||
;; :others
|
;; :others
|
||||||
[:div.flex.flex-1
|
[:div.flex.flex-1
|
||||||
(if editing?
|
(if editing?
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
.property-value-inner:hover {
|
.property-value-inner {
|
||||||
|
&:hover, .as-scalar-value-wrap:hover {
|
||||||
@apply bg-gray-02 rounded transition-[background-color] duration-300;
|
@apply bg-gray-02 rounded transition-[background-color] duration-300;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ls-property-dialog {
|
.ls-property-dialog {
|
||||||
.ls-property-key {
|
.ls-property-key {
|
||||||
@apply overflow-y-hidden;
|
@apply overflow-y-hidden;
|
||||||
height: 286px;
|
height: 286px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue