Skip to content

Commit

Permalink
feat: Re-implement search logic
Browse files Browse the repository at this point in the history
  • Loading branch information
GeckoEidechse committed Jan 3, 2025
1 parent 29984f8 commit 154a61a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src-vue/src/plugins/modules/search.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
interface SearchStoreState {
searchValue: string
}

export const searchModule = {
state: () => ({
// This is the treated value of search input
searchValue: '',
// Selected mod categories
selectedCategories: [],
showDeprecatedMods: false,
showNsfwMods: false,
sortValue: {label: '', value: ''}
}),
getters: {
searchWords(state: SearchStoreState): string {
return state.searchValue.toLowerCase();
}
}
}

0 comments on commit 154a61a

Please sign in to comment.