diff options
author | zeroinformatique | 2021-07-03 00:48:53 +0200 |
---|---|---|
committer | GitHub | 2021-07-03 00:48:53 +0200 |
commit | b6605e2c4ee73ac8b994624098344db5e44ac07d (patch) | |
tree | 5ed06cc5ecdabe070f6fdb9bc4f9a8a3b435cbe6 /viewer/src/store/uiStore.ts | |
parent | 08ac32103fb5f8cca1861267dfd07a7c0d2faf62 (diff) | |
parent | 1f0377c1b4c2959c73fe4e368673f057ef369917 (diff) | |
download | ldgallery-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.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); |