web: separate spam button from read buttons and color red.
This commit is contained in:
parent
8abf9398e9
commit
b0305b7411
@ -42,7 +42,6 @@ pub fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
|
||||
context: Context::None,
|
||||
query: "".to_string(),
|
||||
refreshing_state: RefreshingState::None,
|
||||
ui_error: UIError::NoError,
|
||||
tags: None,
|
||||
}
|
||||
}
|
||||
@ -450,7 +449,6 @@ pub struct Model {
|
||||
pub query: String,
|
||||
pub context: Context,
|
||||
pub refreshing_state: RefreshingState,
|
||||
pub ui_error: UIError,
|
||||
pub tags: Option<Vec<Tag>>,
|
||||
}
|
||||
|
||||
|
||||
@ -255,35 +255,41 @@ fn search_toolbar(
|
||||
.unwrap_or(0);
|
||||
nav![
|
||||
C!["level"],
|
||||
IF!(show_bulk_edit =>
|
||||
div![
|
||||
C!["level-left"],
|
||||
IF!(show_bulk_edit =>
|
||||
span![
|
||||
// TODO(wathiede): add "Mark as spam"
|
||||
C!["level-item", "buttons", "has-addons"],
|
||||
div![
|
||||
C!["level-item"],
|
||||
div![C!["buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
C!["button","spam"],
|
||||
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()))
|
||||
],
|
||||
],
|
||||
],
|
||||
div![
|
||||
C!["level-item"],
|
||||
div![C!["buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
C!["button","mark-read"],
|
||||
attrs!{At::Title => "Mark as read"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope-open"]]],
|
||||
span!["Read"],
|
||||
ev(Ev::Click, |_| Msg::SelectionMarkAsRead)
|
||||
],
|
||||
button![
|
||||
C!["button"],
|
||||
C!["button","mark-unread"],
|
||||
attrs!{At::Title => "Mark as unread"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope"]]],
|
||||
span!["Unread"],
|
||||
ev(Ev::Click, |_| Msg::SelectionMarkAsUnread)
|
||||
]
|
||||
]
|
||||
]
|
||||
]),
|
||||
],
|
||||
div![
|
||||
C!["level-right"],
|
||||
nav![
|
||||
@ -733,10 +739,14 @@ fn thread(thread: &ShowThreadQueryThread, open_messages: &HashSet<String>) -> No
|
||||
C!["thread"],
|
||||
h3![C!["is-size-5"], subject],
|
||||
span![C!["tags"], tags_chiclet(&tags, false)],
|
||||
span![
|
||||
C!["level-item", "buttons", "has-addons"],
|
||||
div![
|
||||
C!["level"],
|
||||
div![
|
||||
C!["level-item"],
|
||||
div![
|
||||
C!["buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
C!["button", "spam"],
|
||||
attrs! {At::Title => "Spam"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-hand"]]],
|
||||
span!["Spam"],
|
||||
@ -745,8 +755,14 @@ fn thread(thread: &ShowThreadQueryThread, open_messages: &HashSet<String>) -> No
|
||||
"Spam".to_string()
|
||||
)),
|
||||
],
|
||||
],
|
||||
],
|
||||
div![
|
||||
C!["level-item"],
|
||||
div![
|
||||
C!["buttons", "has-addons"],
|
||||
button![
|
||||
C!["button"],
|
||||
C!["button", "mark-read"],
|
||||
attrs! {At::Title => "Mark as read"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope-open"]]],
|
||||
span!["Read"],
|
||||
@ -756,7 +772,7 @@ fn thread(thread: &ShowThreadQueryThread, open_messages: &HashSet<String>) -> No
|
||||
)),
|
||||
],
|
||||
button![
|
||||
C!["button"],
|
||||
C!["button", "mark-unread"],
|
||||
attrs! {At::Title => "Mark as unread"},
|
||||
span![C!["icon", "is-small"], i![C!["far", "fa-envelope"]]],
|
||||
span!["Unread"],
|
||||
@ -766,6 +782,8 @@ fn thread(thread: &ShowThreadQueryThread, open_messages: &HashSet<String>) -> No
|
||||
)),
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
messages,
|
||||
/* TODO(wathiede): plumb in orignal id
|
||||
a![
|
||||
|
||||
@ -282,3 +282,7 @@ display: none;
|
||||
.attachment .card-content {
|
||||
padding: 0.5rem 1.5rem;
|
||||
}
|
||||
|
||||
.button.spam {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user