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