diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-01-20 18:39:51 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-01-20 18:39:51 +0100 |
| commit | da27cc2f457f362f11f65b4e06e3d9eca09d1344 (patch) | |
| tree | 2580b47c22ff1af68e4c98eb200869cb13eb0272 /ui/src/search.rs | |
| parent | 03f38fdc3bd45962be8555e50f18fd7761c17989 (diff) | |
| download | jellything-da27cc2f457f362f11f65b4e06e3d9eca09d1344.tar jellything-da27cc2f457f362f11f65b4e06e3d9eca09d1344.tar.bz2 jellything-da27cc2f457f362f11f65b4e06e3d9eca09d1344.tar.zst | |
nom nom nom
Diffstat (limited to 'ui/src/search.rs')
| -rw-r--r-- | ui/src/search.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/src/search.rs b/ui/src/search.rs index dd5aa0c..35ae82d 100644 --- a/ui/src/search.rs +++ b/ui/src/search.rs @@ -4,7 +4,7 @@ Copyright (C) 2026 metamuffin <metamuffin.org> */ -use crate::{Page, locale::tr, node_card::NodeCard}; +use crate::{Page, locale::tr, node_card::NodeCard, scaffold::RenderInfo}; use markup::DynRender; impl Page for SearchPage<'_> { @@ -20,15 +20,15 @@ impl Page for SearchPage<'_> { } markup::define! { - SearchPage<'a>(lang: &'a Language, r: Option<ApiSearchResponse>, query: &'a Option<String>) { - h1 { @trs(lang, "search.title") } + SearchPage<'a>(ri: &'a RenderInfo<'a>, r: Option<ApiSearchResponse>, query: &'a Option<String>) { + h1 { @tr(ri.lang, "search.title") } form[action="", method="GET"] { - input[type="text", name="query", placeholder=&*tr(**lang, "search.placeholder"), value=&query]; + input[type="text", name="query", placeholder=tr(ri.lang, "search.placeholder"), value=&query]; input[type="submit", value="Search"]; } @if let Some(r) = &r { - h2 { @trs(lang, "search.results.title") } - p.stats { @tr(**lang, "search.results.stats").replace("{count}", &r.count.to_string()).replace("{dur}", &format!("{:?}", r.duration)) } + h2 { @tr(ri.lang, "search.results.title") } + p.stats { @tr(ri.lang, "search.results.stats").replace("{count}", &r.count.to_string()).replace("{dur}", &format!("{:?}", r.duration)) } ul.children {@for (node, udata) in r.results.iter() { li { @NodeCard { node, udata, lang } } }} |