Sha256: 667e98eff15a6cd7eac2e2ab24aaf0460862e2ac1346b53a28195c50e3e85427

Contents?: true

Size: 798 Bytes

Versions: 13

Compression:

Stored size: 798 Bytes

Contents

import Vue from 'vue'
import Vuex from 'vuex'
import defaultState from './default-state'
import buildActions from './actions'
import buildMutations from './mutations'
import buildGetters from './getters'
import services from '@/services'

Vue.use(Vuex)

const store = new Vuex.Store({
  strict: process.env.NODE_ENV !== 'production',
  state: { ...defaultState },
  mutations: buildMutations(services),
  actions: buildActions(services),
  getters: buildGetters(services),
  modules: {},
})

store.dispatch('fetchEditorSettings')
store.dispatch('fetchSite', true)
store.dispatch('setPage', window.page)
store.dispatch('setTheme', window.theme)
store.dispatch('setLocale', window.locale)

if (store.state.editorSettings.sitePublishable)
  store.dispatch('pollLastPublication')

export default store

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
maglevcms-1.7.2 app/frontend/editor/store/index.js
maglevcms-1.7.1 app/frontend/editor/store/index.js
maglevcms-1.7.0 app/frontend/editor/store/index.js
maglevcms-1.6.1 app/frontend/editor/store/index.js
maglevcms-1.6.0 app/frontend/editor/store/index.js
maglevcms-1.5.1 app/frontend/editor/store/index.js
maglevcms-1.4.0 app/frontend/editor/store/index.js
maglevcms-1.3.0 app/frontend/editor/store/index.js
maglevcms-1.2.2 app/frontend/editor/store/index.js
maglevcms-1.2.1 app/frontend/editor/store/index.js
maglevcms-1.2.0 app/frontend/editor/store/index.js
maglevcms-1.1.7 app/frontend/editor/store/index.js
maglevcms-1.1.6 app/frontend/editor/store/index.js