From 44961f6ef19599f80906279bf8cefae056fae6b5 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sun, 1 Feb 2026 17:16:11 -0800 Subject: [PATCH] web: conditionally show spam button in catchup --- web/src/view/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/view/mod.rs b/web/src/view/mod.rs index 2a286e4..c6c8012 100644 --- a/web/src/view/mod.rs +++ b/web/src/view/mod.rs @@ -100,6 +100,7 @@ pub fn view(model: &Model) -> Node { &catchup.items, is_loading, model.read_completion_ratio, + true, // show spam button for email ) } else { normal_view( @@ -127,6 +128,7 @@ pub fn view(model: &Model) -> Node { &catchup.items, is_loading, model.read_completion_ratio, + false, // no spam button for news ) } else { normal_view( @@ -193,6 +195,7 @@ fn catchup_view( items: &[CatchupItem], is_loading: bool, read_completion_ratio: f64, + show_spam_button: bool, ) -> Node { div![ C!["w-full", "relative", "text-white"], @@ -268,14 +271,14 @@ fn catchup_view( Msg::GoToSearchResults ])) ], - button![ + IF!(show_spam_button => button![ tw_classes::button(), C!["text-red-500"], attrs! {At::Title => "Mark as spam"}, span![i![C!["far", "fa-hand"]]], span![C!["pl-2"], "Spam"], ev(Ev::Click, |_| Msg::CatchupMarkAsSpam) - ], + ]), button![ tw_classes::button_with_color("bg-green-800", "hover:bg-green-700"), span![i![C!["far", "fa-envelope-open"]]],