diff --git a/src-vue/src/plugins/modules/search.ts b/src-vue/src/plugins/modules/search.ts new file mode 100644 index 000000000..9614b0be9 --- /dev/null +++ b/src-vue/src/plugins/modules/search.ts @@ -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(); + } + } + }