Whalebird-desktop-client-ma.../src/renderer/store/index.ts

46 lines
1.2 KiB
TypeScript
Raw Normal View History

2018-03-07 14:28:48 +01:00
import Vue from 'vue'
import Vuex from 'vuex'
2018-03-08 09:41:39 +01:00
import createLogger from 'vuex/dist/logger'
2019-04-14 16:11:24 +02:00
import { Route } from 'vue-router'
2018-03-07 14:28:48 +01:00
import App, { AppState } from './App'
import GlobalHeader, { GlobalHeaderState } from './GlobalHeader'
import Login, { LoginState } from './Login'
import Authorize, { AuthorizeState } from './Authorize'
import TimelineSpace, { TimelineSpaceModuleState } from './TimelineSpace'
import Preferences, { PreferencesModuleState } from './Preferences'
import Settings, { SettingsModuleState } from './Settings'
import organisms, { OrganismsModuleState } from './organisms'
import { MyWindow } from '~/src/types/global'
2018-03-07 14:28:48 +01:00
Vue.use(Vuex)
const win = window as MyWindow
export interface RootState {
App: AppState
GlobalHeader: GlobalHeaderState
Login: LoginState
Authorize: AuthorizeState
TimelineSpace: TimelineSpaceModuleState
Preferences: PreferencesModuleState
Settings: SettingsModuleState
molecules: OrganismsModuleState
2019-04-14 16:11:24 +02:00
route: Route
}
2018-03-07 14:28:48 +01:00
export default new Vuex.Store({
strict: win.process.env.NODE_ENV !== 'production',
plugins: win.process.env.NODE_ENV !== 'production' ? [createLogger({})] : [],
2018-03-08 09:41:39 +01:00
modules: {
App,
2018-03-08 11:53:14 +01:00
GlobalHeader,
2018-03-08 09:41:39 +01:00
Login,
Authorize,
TimelineSpace,
Preferences,
Settings,
organisms
2018-03-08 09:41:39 +01:00
}
2018-03-07 14:28:48 +01:00
})