Sha256: 7df955d471e16d21fa1e856005f606fcd8cad661b2cbf4340fae55825d95fd79

Contents?: true

Size: 759 Bytes

Versions: 10

Compression:

Stored size: 759 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('setTheme', window.theme)
store.dispatch('setLocale', window.locale)

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

export default store

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
maglevcms-1.1.5 app/frontend/editor/store/index.js
maglevcms-1.1.4 app/frontend/editor/store/index.js
maglevcms-1.1.3 app/frontend/editor/store/index.js
maglevcms-1.1.2 app/frontend/editor/store/index.js
maglevcms-1.1.1 app/frontend/editor/store/index.js
maglevcms-1.1.0 app/frontend/editor/store/index.js
maglevcms-1.0.0 app/javascript/editor/store/index.js
maglevcms-1.0.0.rc3 app/javascript/editor/store/index.js
maglevcms-1.0.0.rc2 app/javascript/editor/store/index.js
maglevcms-1.0.0.rc1 app/javascript/editor/store/index.js