diff options
Diffstat (limited to 'viewer/src/store/uiStore.ts')
-rw-r--r-- | viewer/src/store/uiStore.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index f065cdd..f5bb898 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts | |||
@@ -17,8 +17,9 @@ | |||
17 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. | 17 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | import { createModule, mutation, action } from "vuex-class-component"; | 20 | import { Config } from "@/@types/gallery"; |
21 | import ItemComparators, { ItemSort } from "@/services/itemComparators"; | 21 | import ItemComparators, { ItemSort } from "@/services/itemComparators"; |
22 | import { action, createModule, mutation } from "vuex-class-component"; | ||
22 | 23 | ||
23 | const VuexModule = createModule({ | 24 | const VuexModule = createModule({ |
24 | namespaced: "uiStore", | 25 | namespaced: "uiStore", |
@@ -49,7 +50,7 @@ export default class UIStore extends VuexModule { | |||
49 | this.sort = sort; | 50 | this.sort = sort; |
50 | } | 51 | } |
51 | 52 | ||
52 | @action async initFromConfig(config: Gallery.Config) { | 53 | @action async initFromConfig(config: Config) { |
53 | if (config.initialItemSort) { | 54 | if (config.initialItemSort) { |
54 | const itemSort = ItemComparators.ITEM_SORTS[config.initialItemSort]; | 55 | const itemSort = ItemComparators.ITEM_SORTS[config.initialItemSort]; |
55 | if (itemSort) this.setSort(itemSort); | 56 | if (itemSort) this.setSort(itemSort); |