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
|
|
|
|
2019-04-10 13:58:11 +02: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'
|
2019-07-14 11:55:38 +02:00
|
|
|
import organisms, { OrganismsModuleState } from './organisms'
|
2019-05-09 16:54:53 +02:00
|
|
|
import { MyWindow } from '~/src/types/global'
|
2018-03-07 14:28:48 +01:00
|
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
|
|
2019-05-09 16:54:53 +02:00
|
|
|
const win = window as MyWindow
|
|
|
|
|
|
|
|
export interface RootState {
|
2019-06-06 16:44:50 +02:00
|
|
|
App: AppState
|
|
|
|
GlobalHeader: GlobalHeaderState
|
|
|
|
Login: LoginState
|
|
|
|
Authorize: AuthorizeState
|
|
|
|
TimelineSpace: TimelineSpaceModuleState
|
|
|
|
Preferences: PreferencesModuleState
|
|
|
|
Settings: SettingsModuleState
|
2019-07-14 11:55:38 +02:00
|
|
|
molecules: OrganismsModuleState
|
2019-04-14 16:11:24 +02:00
|
|
|
route: Route
|
2019-04-10 13:58:11 +02:00
|
|
|
}
|
|
|
|
|
2018-03-07 14:28:48 +01:00
|
|
|
export default new Vuex.Store({
|
2019-05-09 16:54:53 +02:00
|
|
|
strict: win.process.env.NODE_ENV !== 'production',
|
|
|
|
plugins: win.process.env.NODE_ENV !== 'production' ? [createLogger({})] : [],
|
2018-03-08 09:41:39 +01:00
|
|
|
modules: {
|
2018-04-01 05:00:58 +02:00
|
|
|
App,
|
2018-03-08 11:53:14 +01:00
|
|
|
GlobalHeader,
|
2018-03-08 09:41:39 +01:00
|
|
|
Login,
|
2018-03-08 10:36:09 +01:00
|
|
|
Authorize,
|
2018-04-01 05:00:58 +02:00
|
|
|
TimelineSpace,
|
2018-10-26 17:54:51 +02:00
|
|
|
Preferences,
|
2018-11-14 13:44:33 +01:00
|
|
|
Settings,
|
2019-07-14 11:55:38 +02:00
|
|
|
organisms
|
2018-03-08 09:41:39 +01:00
|
|
|
}
|
2018-03-07 14:28:48 +01:00
|
|
|
})
|