search v1
All checks were successful
Deploy App / build (push) Successful in 1m5s
Deploy App / deploy (push) Successful in 14s

This commit is contained in:
valere
2025-10-16 01:45:28 +02:00
parent 3ad8cb8795
commit 0aa1a57b78
6 changed files with 265 additions and 2 deletions

View File

@@ -5,9 +5,26 @@ import type { Box } from '~/../types/types'
export const useUiStore = defineStore('ui', {
state: () => ({
// UI-only state can live here later
showSearch: false,
searchQuery: ''
}),
actions: {
openSearch() {
this.showSearch = true
// reset query on open to avoid stale state
this.searchQuery = ''
},
closeSearch() {
this.showSearch = false
this.searchQuery = ''
},
setSearchQuery(q: string) {
this.searchQuery = q
},
selectBox(id: string) {
const dataStore = useDataStore()
dataStore.boxes.forEach((box) => {