From b33a252698db11db909a3478b848c65dc88d204c Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Tue, 20 Feb 2024 20:16:25 -0800 Subject: [PATCH] web: label read/unread icons --- web/src/view/mod.rs | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/web/src/view/mod.rs b/web/src/view/mod.rs index 6350cde..f7a2441 100644 --- a/web/src/view/mod.rs +++ b/web/src/view/mod.rs @@ -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![C!["icon", "is-small"], i![C!["far", "fa-envelope-open"]]], + 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![C!["icon", "is-small"], i![C!["far", "fa-envelope"]]], + 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" }, - "fa-envelope" + "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" }, - "fa-envelope" + "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) -> 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) -> 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