web: label read/unread icons
This commit is contained in:
parent
9e3ae22827
commit
b33a252698
@ -213,19 +213,21 @@ fn search_toolbar(
|
||||
C!["level-left"],
|
||||
IF!(show_bulk_edit =>
|
||||
span![
|
||||
C!["level-item", "buttons"],
|
||||
C!["level-item", "buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
attrs!{At::Title => "Mark as read"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope-open"]]],
|
||||
ev(Ev::Click, |_| Msg::SelectionMarkAsRead),
|
||||
span!["Read"],
|
||||
ev(Ev::Click, |_| Msg::SelectionMarkAsRead)
|
||||
],
|
||||
button![
|
||||
C!["button"],
|
||||
attrs!{At::Title => "Mark as unread"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope"]]],
|
||||
ev(Ev::Click, |_| Msg::SelectionMarkAsUnread),
|
||||
],
|
||||
span!["Unread"],
|
||||
ev(Ev::Click, |_| Msg::SelectionMarkAsUnread)
|
||||
]
|
||||
]),
|
||||
],
|
||||
div![
|
||||
@ -345,8 +347,12 @@ fn read_message_render(msg: &ShowThreadQueryThreadMessages, open: bool) -> Node<
|
||||
St::Color => "gold"
|
||||
},
|
||||
C![
|
||||
if is_unread { "fa-regular" } else { "fa-solid" },
|
||||
"far",
|
||||
if is_unread {
|
||||
"fa-envelope"
|
||||
} else {
|
||||
"fa-envelope-open"
|
||||
},
|
||||
],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
@ -387,8 +393,12 @@ fn unread_message_render(msg: &ShowThreadQueryThreadMessages, open: bool) -> Nod
|
||||
St::Color => "gold"
|
||||
},
|
||||
C![
|
||||
if is_unread { "fa-regular" } else { "fa-solid" },
|
||||
"far",
|
||||
if is_unread {
|
||||
"fa-envelope"
|
||||
} else {
|
||||
"fa-envelope-open"
|
||||
},
|
||||
],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
@ -484,11 +494,12 @@ fn thread(thread: &ShowThreadQueryThread, open_messages: &HashSet<String>) -> No
|
||||
h3![C!["is-size-5"], &thread.subject,],
|
||||
tags_chiclet(&tags, false),
|
||||
span![
|
||||
C!["level-item", "buttons"],
|
||||
C!["level-item", "buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
attrs! {At::Title => "Mark as read"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope-open"]]],
|
||||
span!["Read"],
|
||||
ev(Ev::Click, move |_| Msg::SetUnread(
|
||||
format!("thread:{read_thread_id}"),
|
||||
false
|
||||
@ -498,6 +509,7 @@ fn thread(thread: &ShowThreadQueryThread, open_messages: &HashSet<String>) -> No
|
||||
C!["button"],
|
||||
attrs! {At::Title => "Mark as unread"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope"]]],
|
||||
span!["Unread"],
|
||||
ev(Ev::Click, move |_| Msg::SetUnread(
|
||||
format!("thread:{unread_thread_id}"),
|
||||
true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user