don't reset tab to default when you search from a non default tab

This commit is contained in:
mat 2024-07-03 02:31:10 +00:00
parent c9e4e864c3
commit a0e8c47a6f
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,9 @@ api = false
# show_version_info = true
# stylesheet_url = "/themes/catppuccin-mocha.css"
[image_search]
# enabled = true
[engines]
# numbat = false
# fend = true

View File

@ -27,6 +27,9 @@ fn render_beginning_of_html(search: &SearchQuery) -> String {
let form_html = html! {
form."search-form" action="/search" method="get" {
input #"search-input" type="text" name="q" placeholder="Search" value=(search.query) autofocus onfocus="this.select()" autocomplete="off";
@if search.tab != SearchTab::default() {
input type="hidden" name="tab" value=(search.tab.to_string());
}
input type="submit" value="Search";
}
@if search.config.image_search.enabled {