fix(web): search bar is now a form: enter to submit

This commit is contained in:
əlemi 2024-05-13 02:53:45 +02:00
parent 8ef6dca52b
commit 6bb9ee9570
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -8,6 +8,7 @@ pub fn Navigator() -> impl IntoView {
let auth = use_context::<Auth>().expect("missing auth context");
let (query, set_query) = create_signal("".to_string());
view! {
<form action={move|| format!("/web/search?q={}", query.get())}>
<table class="align">
<tr>
<td class="w-100">
@ -20,6 +21,7 @@ pub fn Navigator() -> impl IntoView {
</td>
</tr>
</table>
</form>
<table class="align w-100">
<tr><td colspan="2"><a href="/web/home"><input class="w-100" type="submit" class:hidden=move || !auth.present() value="home timeline" /></a></td></tr>
<tr><td colspan="2"><a href="/web/server"><input class="w-100" type="submit" value="server timeline" /></a></td></tr>