web: add mark read button on search result page
This commit is contained in:
parent
7ebe517a34
commit
4957b485a0
@ -76,6 +76,16 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.index .subject:hover .mark-read-button {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.index .subject .mark-read-button {
|
||||
display: none;
|
||||
font-size: .6rem;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.index .date {
|
||||
width: 10em;
|
||||
white-space: nowrap;
|
||||
|
||||
@ -137,6 +137,16 @@ fn view_search_results(
|
||||
At::Href => urls::thread(&tid)
|
||||
},
|
||||
&r.subject,
|
||||
button![
|
||||
C!["mark-read-button", "button", "is-dark", "is-small"],
|
||||
"Read",
|
||||
ev(Ev::Click, move |e| {
|
||||
info!("click happens");
|
||||
e.stop_propagation();
|
||||
e.prevent_default();
|
||||
Msg::SetUnread(format!("thread:{tid}"), false)
|
||||
}),
|
||||
]
|
||||
]
|
||||
],
|
||||
td![C!["date"], datetime]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user