aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/store/uiStore.ts
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/store/uiStore.ts')
-rw-r--r--viewer/src/store/uiStore.ts5
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
20import { createModule, mutation, action } from "vuex-class-component"; 20import { Config } from "@/@types/gallery";
21import ItemComparators, { ItemSort } from "@/services/itemComparators"; 21import ItemComparators, { ItemSort } from "@/services/itemComparators";
22import { action, createModule, mutation } from "vuex-class-component";
22 23
23const VuexModule = createModule({ 24const 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);