123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { createStore } from 'vuex'
- import * as getters from './getters'
- import * as actions from './actions'
- import mutations from './mutations'
- import createLogger from '../../../../src/plugins/logger'
- const state = {
- currentThreadID: null,
- threads: {
- /*
- id: {
- id,
- name,
- messages: [...ids],
- lastMessage
- }
- */
- },
- messages: {
- /*
- id: {
- id,
- threadId,
- threadName,
- authorName,
- text,
- timestamp,
- isRead
- }
- */
- }
- }
- export default createStore({
- state,
- getters,
- actions,
- mutations,
- plugins: process.env.NODE_ENV !== 'production'
- ? [createLogger()]
- : []
- })
|