From 31a3ac66b6050ba41edde60d56387162038d90c1 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Mon, 8 Apr 2024 20:51:56 -0700 Subject: [PATCH] web: swap spam and read/unread buttons --- web/src/view/mod.rs | 66 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/web/src/view/mod.rs b/web/src/view/mod.rs index 0b925d8..7dcac92 100644 --- a/web/src/view/mod.rs +++ b/web/src/view/mod.rs @@ -312,23 +312,11 @@ fn search_toolbar( nav![ C!["level", "is-mobile"], IF!(show_bulk_edit => + div![ + C!["level-left"], div![ - C!["level-left"], - div![ - C!["level-item"], - div![C!["buttons", "has-addons"], - button![ - C!["button", "spam"], - attrs!{At::Title => "Mark as spam"}, - span![C!["icon", "is-small"], i![C!["far", "fa-hand"]]], - IF!(show_icon_text=>span!["Spam"]), - ev(Ev::Click, |_| Msg::SelectionAddTag("Spam".to_string())) - ], - ], - ], - div![ - C!["level-item"], - div![C!["buttons", "has-addons"], + C!["level-item"], + div![C!["buttons", "has-addons"], button![ C!["button", "mark-read"], attrs!{At::Title => "Mark as read"}, @@ -344,7 +332,19 @@ fn search_toolbar( ev(Ev::Click, |_| Msg::SelectionMarkAsUnread) ] ] - ] + ], + div![ + C!["level-item"], + div![C!["buttons", "has-addons"], + button![ + C!["button", "spam"], + attrs!{At::Title => "Mark as spam"}, + span![C!["icon", "is-small"], i![C!["far", "fa-hand"]]], + IF!(show_icon_text=>span!["Spam"]), + ev(Ev::Click, |_| Msg::SelectionAddTag("Spam".to_string())) + ], + ], + ] ]), div![ C!["level-right"], @@ -812,22 +812,6 @@ fn thread( ], div![ C!["level", "is-mobile"], - div![ - C!["level-item"], - div![ - C!["buttons", "has-addons"], - button![ - C!["button", "spam"], - attrs! {At::Title => "Spam"}, - span![C!["icon", "is-small"], i![C!["far", "fa-hand"]]], - IF!(show_icon_text=>span!["Spam"]), - ev(Ev::Click, move |_| Msg::AddTag( - format!("thread:{spam_thread_id}"), - "Spam".to_string() - )), - ], - ], - ], div![ C!["level-item"], div![ @@ -854,6 +838,22 @@ fn thread( ], ], ], + div![ + C!["level-item"], + div![ + C!["buttons", "has-addons"], + button![ + C!["button", "spam"], + attrs! {At::Title => "Spam"}, + span![C!["icon", "is-small"], i![C!["far", "fa-hand"]]], + IF!(show_icon_text=>span!["Spam"]), + ev(Ev::Click, move |_| Msg::AddTag( + format!("thread:{spam_thread_id}"), + "Spam".to_string() + )), + ], + ], + ], ], messages, /* TODO(wathiede): plumb in orignal id