2020-10-02 07:13:14 +00:00
|
|
|
import { store } from 'quasar/wrappers';
|
2020-10-29 00:39:06 +00:00
|
|
|
import { SessionInterface } from 'src/plugins/user/store/session';
|
2020-10-02 07:13:14 +00:00
|
|
|
import Vuex from 'vuex';
|
2020-10-30 08:13:57 +00:00
|
|
|
import { UserStateInterface } from 'src/plugins/user/store/user';
|
2020-10-02 07:13:14 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If not building with SSR mode, you can
|
|
|
|
* directly export the Store instantiation
|
|
|
|
*/
|
|
|
|
export interface StateInterface {
|
2020-10-30 08:57:39 +00:00
|
|
|
user: UserStateInterface;
|
2020-11-04 22:53:10 +00:00
|
|
|
session: SessionInterface;
|
2020-11-15 13:18:28 +00:00
|
|
|
[key: string]: any;
|
2020-10-02 07:13:14 +00:00
|
|
|
}
|
|
|
|
|
2021-03-18 16:23:57 +00:00
|
|
|
export default store(function ({ Vue }) {
|
2020-10-02 07:13:14 +00:00
|
|
|
Vue.use(Vuex);
|
|
|
|
|
|
|
|
const Store = new Vuex.Store<StateInterface>({
|
2020-10-16 07:38:14 +00:00
|
|
|
modules: {},
|
2020-10-02 07:13:14 +00:00
|
|
|
|
|
|
|
// enable strict mode (adds overhead!)
|
|
|
|
// for dev mode only
|
2021-03-18 16:23:57 +00:00
|
|
|
strict: !!process.env.DEV,
|
2020-10-02 07:13:14 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
return Store;
|
|
|
|
});
|