Add a mobile search page for Hosting.
Deploy Ladill Hosting / deploy (push) Successful in 27s

Return an HTML search screen from /search for browser visits and point the bottom nav Search tab at it instead of the dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-07 15:38:29 +00:00
co-authored by Cursor
parent cf9d7cc75d
commit b7b9e5ef05
6 changed files with 162 additions and 10 deletions
+9 -3
View File
@@ -136,14 +136,20 @@ Alpine.data('afia', (config = {}) => ({
}));
Alpine.data('topbarSearch', (config = {}) => ({
query: '',
results: [],
open: false,
query: config.initialQuery || '',
results: Array.isArray(config.initialResults) ? config.initialResults : [],
open: !!config.openOnInit,
loading: false,
active: 0,
_abort: null,
searchUrl: config.searchUrl || '/search',
init() {
if (config.autoFocus) {
this.$nextTick(() => this.$refs.input?.focus());
}
},
onFocus() {
if (this.results.length > 0 || this.query.trim().length >= 2) this.open = true;
},