fix language/safe search gui
This commit is contained in:
parent
8fece91f75
commit
6b3373f7d6
13 changed files with 748 additions and 694 deletions
44
files.go
44
files.go
|
@ -59,27 +59,31 @@ func handleFileSearch(w http.ResponseWriter, settings UserSettings, query string
|
|||
}
|
||||
|
||||
data := struct {
|
||||
Results []TorrentResult
|
||||
Query string
|
||||
Fetched string
|
||||
Category string
|
||||
Sort string
|
||||
HasPrevPage bool
|
||||
HasNextPage bool
|
||||
Page int
|
||||
Settings Settings
|
||||
Theme string
|
||||
Results []TorrentResult
|
||||
Query string
|
||||
Fetched string
|
||||
Category string
|
||||
Sort string
|
||||
Page int
|
||||
HasPrevPage bool
|
||||
HasNextPage bool
|
||||
LanguageOptions []LanguageOption
|
||||
CurrentLang string
|
||||
Theme string
|
||||
Safe string
|
||||
}{
|
||||
Results: combinedResults,
|
||||
Query: query,
|
||||
Fetched: fmt.Sprintf("%.2f", elapsedTime.Seconds()),
|
||||
Category: "all",
|
||||
Sort: "seed",
|
||||
HasPrevPage: page > 1,
|
||||
HasNextPage: len(combinedResults) > 0,
|
||||
Page: page,
|
||||
Settings: Settings{UxLang: settings.Language, Safe: settings.SafeSearch}, // Now this is painful, are there two Settings variables??
|
||||
Theme: settings.Theme,
|
||||
Results: combinedResults,
|
||||
Query: query,
|
||||
Fetched: fmt.Sprintf("%.2f seconds", elapsedTime.Seconds()),
|
||||
Category: "all",
|
||||
Sort: "seed",
|
||||
Page: page,
|
||||
HasPrevPage: page > 1,
|
||||
HasNextPage: len(combinedResults) > 0,
|
||||
LanguageOptions: languageOptions,
|
||||
CurrentLang: settings.Language,
|
||||
Theme: settings.Theme,
|
||||
Safe: settings.SafeSearch,
|
||||
}
|
||||
|
||||
// // Debugging: Print results before rendering template
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue