You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
import {createStore} from 'vuex'
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
import getSeason from "@/tools/getSeason";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default createStore({
|
|
|
|
|
state: {
|
|
|
|
|
player: null,
|
|
|
|
|
time: {
|
|
|
|
|
stamp: null,
|
|
|
|
|
week: null,
|
|
|
|
|
season: null,
|
|
|
|
|
weekday: null,
|
|
|
|
|
weekdayNr: null
|
|
|
|
|
},
|
|
|
|
|
inventory: []
|
|
|
|
|
},
|
|
|
|
|
getters: {},
|
|
|
|
|
mutations: {
|
|
|
|
|
initialize(state) {
|
|
|
|
|
state.time.week = moment().week();
|
|
|
|
|
state.time.season = getSeason(state.time.week);
|
|
|
|
|
state.time.weekday = moment().weekday();
|
|
|
|
|
state.time.weekdayNr = moment().format('dddd');
|
|
|
|
|
},
|
|
|
|
|
updateTimestamp(state) {
|
|
|
|
|
state.time.stamp = moment().format('H:mm:ss')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
actions: {},
|
|
|
|
|
modules: {}
|
|
|
|
|
});
|