web: add mark as spam buttons
This commit is contained in:
@@ -261,6 +261,13 @@ fn search_toolbar(
|
||||
span![
|
||||
// TODO(wathiede): add "Mark as spam"
|
||||
C!["level-item", "buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
attrs!{At::Title => "Mark as spam"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-hand"]]],
|
||||
span!["Spam"],
|
||||
ev(Ev::Click, |_| Msg::SelectionAddTag("Spam".to_string()))
|
||||
],
|
||||
button![
|
||||
C!["button"],
|
||||
attrs!{At::Title => "Mark as read"},
|
||||
@@ -721,13 +728,23 @@ fn thread(thread: &ShowThreadQueryThread, open_messages: &HashSet<String>) -> No
|
||||
});
|
||||
let read_thread_id = thread.thread_id.clone();
|
||||
let unread_thread_id = thread.thread_id.clone();
|
||||
let spam_thread_id = thread.thread_id.clone();
|
||||
div![
|
||||
C!["thread"],
|
||||
h3![C!["is-size-5"], subject],
|
||||
span![C!["tags"], tags_chiclet(&tags, false)],
|
||||
span![
|
||||
// TODO(wathiede): add "Mark as spam"
|
||||
C!["level-item", "buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
attrs! {At::Title => "Spam"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-hand"]]],
|
||||
span!["Spam"],
|
||||
ev(Ev::Click, move |_| Msg::AddTag(
|
||||
format!("thread:{spam_thread_id}"),
|
||||
"Spam".to_string()
|
||||
)),
|
||||
],
|
||||
button![
|
||||
C!["button"],
|
||||
attrs! {At::Title => "Mark as read"},
|
||||
|
||||
Reference in New Issue
Block a user