web: improve checkbox style on desktop

This commit is contained in:
Bill Thiede 2024-02-20 20:20:50 -08:00
parent b33a252698
commit cda99fc7a5

View File

@ -129,29 +129,28 @@ fn view_search_results(
tr![
IF!(unread_idx.is_some() => C!["unread"]),
td![label![
C!["checkbox"],
input![
attrs! {
At::Type=>"checkbox",
At::Checked=>selected_threads.contains(&tid).as_at_value(),
},
ev(Ev::Input, move |e| {
if let Some(input) = e
.target()
.as_ref()
.expect("failed to get reference to target")
.dyn_ref::<web_sys::HtmlInputElement>()
{
if input.checked() {
Msg::SelectionAddThread(check_tid)
} else {
Msg::SelectionRemoveThread(check_tid)
}
C!["b-checkbox", "checkbox"],
input![attrs! {
At::Type=>"checkbox",
At::Checked=>selected_threads.contains(&tid).as_at_value(),
}],
span![C!["check"]],
ev(Ev::Input, move |e| {
if let Some(input) = e
.target()
.as_ref()
.expect("failed to get reference to target")
.dyn_ref::<web_sys::HtmlInputElement>()
{
if input.checked() {
Msg::SelectionAddThread(check_tid)
} else {
Msg::Noop
Msg::SelectionRemoveThread(check_tid)
}
}),
]
} else {
Msg::Noop
}
}),
]],
td![
C!["from"],