aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/store/uiStore.ts
diff options
context:
space:
mode:
authorzeroinformatique2021-07-03 00:48:53 +0200
committerGitHub2021-07-03 00:48:53 +0200
commitb6605e2c4ee73ac8b994624098344db5e44ac07d (patch)
tree5ed06cc5ecdabe070f6fdb9bc4f9a8a3b435cbe6 /viewer/src/store/uiStore.ts
parent08ac32103fb5f8cca1861267dfd07a7c0d2faf62 (diff)
parent1f0377c1b4c2959c73fe4e368673f057ef369917 (diff)
downloadldgallery-b6605e2c4ee73ac8b994624098344db5e44ac07d.tar.gz
Merge pull request #302 from ldgallery/oz-types-normalization
viewer: types normalization
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);