aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/plugins/modules/search.ts
blob: 9614b0be9d3bf7741515227b6e507a02684be21f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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();
        }
    }
  }