search in the shop bar is not duplicated anymore

This commit is contained in:
Priec
2026-06-25 13:59:51 +02:00
parent 8dd9a53ad8
commit 72babdf74f
2 changed files with 16 additions and 1 deletions

View File

@@ -340,6 +340,11 @@ async fn index(
let mut context = run_search(&ctx, user.as_ref(), &SearchParams::default(), &cur).await?;
let c = guard::chrome_from(&ctx, user.as_ref());
add_chrome(&mut context, &c, &current_lang(&jar));
// The shop page carries its own search box in the listing toolbar, so the
// header search bar is redundant here — flag it so base.html can hide it.
if let Some(map) = context.as_object_mut() {
map.insert("on_shop".into(), json!(true));
}
format::view(&v, "shop/index.html", context)
}
@@ -377,6 +382,11 @@ async fn search(
let c = guard::chrome_from(&ctx, user.as_ref());
add_chrome(&mut context, &c, &lang);
// The shop page carries its own search box in the listing toolbar, so the
// header search bar is redundant here — flag it so base.html can hide it.
if let Some(map) = context.as_object_mut() {
map.insert("on_shop".into(), json!(true));
}
format::view(&v, "shop/index.html", context)
}