Add refresh button and mobile view.
This commit is contained in:
@@ -18,6 +18,10 @@ fn hello() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
||||
|
||||
#[get("/refresh")]
|
||||
async fn refresh(nm: &State<Notmuch>) -> Result<Json<String>, Debug<NotmuchError>> {
|
||||
Ok(Json(String::from_utf8_lossy(&nm.new()?).to_string()))
|
||||
}
|
||||
#[get("/search")]
|
||||
async fn search_all(nm: &State<Notmuch>) -> Result<Json<SearchSummary>, Debug<NotmuchError>> {
|
||||
search(nm, "*").await
|
||||
@@ -123,6 +127,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
original_part,
|
||||
original,
|
||||
hello,
|
||||
refresh,
|
||||
search_all,
|
||||
search,
|
||||
show_pretty,
|
||||
|
||||
Reference in New Issue
Block a user