From 170d7a61f720ece9dc4b347b19f5a8213f1d8984 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 20 Jun 2020 16:50:49 +0200 Subject: viewer: prettier formatting based on eslint-prettier plugin --- viewer/src/store/galleryStore.ts | 8 +++----- viewer/src/store/index.ts | 16 ++++++++-------- viewer/src/store/uiStore.ts | 5 ++--- 3 files changed, 13 insertions(+), 16 deletions(-) (limited to 'viewer/src/store') diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts index a57122c..5458f20 100644 --- a/viewer/src/store/galleryStore.ts +++ b/viewer/src/store/galleryStore.ts @@ -23,11 +23,10 @@ import Navigation from "@/services/navigation"; const VuexModule = createModule({ namespaced: "galleryStore", - strict: true -}) + strict: true, +}); export default class GalleryStore extends VuexModule { - config: Gallery.Config | null = null; galleryIndex: Gallery.Index | null = null; tagsIndex: Tag.Index = {}; @@ -65,8 +64,7 @@ export default class GalleryStore extends VuexModule { get currentItemPath(): Gallery.Item[] { const root = this.galleryIndex?.tree; - if (root) - return Navigation.searchCurrentItemPath(root, this.currentPath); + if (root) return Navigation.searchCurrentItemPath(root, this.currentPath); return []; } diff --git a/viewer/src/store/index.ts b/viewer/src/store/index.ts index d5339e8..f86d66b 100644 --- a/viewer/src/store/index.ts +++ b/viewer/src/store/index.ts @@ -17,30 +17,30 @@ -- along with this program. If not, see . */ -import Vue from "vue" -import Vuex from "vuex" +import Vue from "vue"; +import Vuex from "vuex"; import { extractVuexModule } from "vuex-class-component"; import { createProxy } from "vuex-class-component"; import UIStore from "@/store/uiStore"; import GalleryStore from "@/store/galleryStore"; -Vue.use(Vuex) +Vue.use(Vuex); const store = new Vuex.Store({ modules: { ...extractVuexModule(UIStore), - ...extractVuexModule(GalleryStore) + ...extractVuexModule(GalleryStore), }, strict: process.env.NODE_ENV !== "production", }); -Vue.use((vue) => vue.prototype.$uiStore = createProxy(store, UIStore)); -Vue.use((vue) => vue.prototype.$galleryStore = createProxy(store, GalleryStore)); +Vue.use(vue => (vue.prototype.$uiStore = createProxy(store, UIStore))); +Vue.use(vue => (vue.prototype.$galleryStore = createProxy(store, GalleryStore))); declare module "vue/types/vue" { interface Vue { - $uiStore: UIStore, - $galleryStore: GalleryStore + $uiStore: UIStore; + $galleryStore: GalleryStore; } } diff --git a/viewer/src/store/uiStore.ts b/viewer/src/store/uiStore.ts index 892d35e..91ac338 100644 --- a/viewer/src/store/uiStore.ts +++ b/viewer/src/store/uiStore.ts @@ -21,11 +21,10 @@ import { createModule, mutation, action } from "vuex-class-component"; const VuexModule = createModule({ namespaced: "uiStore", - strict: true -}) + strict: true, +}); export default class UIStore extends VuexModule { - fullscreen: boolean = false; fullWidth: boolean = window.innerWidth < Number(process.env.VUE_APP_FULLWIDTH_LIMIT); searchMode: boolean = false; -- cgit v1.2.3