| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // SHAMELESS THEFT: https://github.com/EvanAgee/vuejs-wordpress-theme-starter
-
- import Vuex from 'vuex'
-
- import * as actions from './actions'
- import * as getters from './getters'
-
- import page from './modules/page'
- import post from './modules/post'
- import artist from './modules/artist'
- import episode from './modules/episode'
-
-
- const debug = process.env.NODE_ENV !== 'production'
-
- // Vue.config.devtools = true
-
- // Current page state
- const state = {
- title: 'Test',
- hero: {
- url: 'http://sample-image-url/',
- text: 'sample hero text',
- playbutton: true
- },
- view: 'list'
- }
-
- const mutations = {
- SET_HERO(state, hero) {
- if (hero.url) {
- state.hero.text = state.hero.url = hero.url
- } else {
- state.hero.text = hero
- }
- },
- }
-
- const store = new Vuex.Store({
- actions,
- getters,
- mutations,
- state,
- modules: {
- post,
- page,
- artist,
- episode
- },
- strict: debug,
- })
-
- export default store
|