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.
75 lines
1.6 KiB
75 lines
1.6 KiB
// state
|
|
export const state = () => ({
|
|
pictureUpdate: false,
|
|
drawerIsActive: false,
|
|
searchDialogIsActive: false,
|
|
socialRegisterUpdate: false,
|
|
currency: "USD",
|
|
hidePrice:false,
|
|
});
|
|
|
|
// actions
|
|
export const actions = {
|
|
updatePicture({ commit }) {
|
|
commit("changePicture");
|
|
},
|
|
updateRegister({ commit }) {
|
|
commit("changeRegisterState");
|
|
},
|
|
toggleDrawer({ commit }, value) {
|
|
commit("toggleDrawerState",value);
|
|
},
|
|
toggleSearchDialog({ commit },value) {
|
|
commit("toggleSearchDialogState",value);
|
|
},
|
|
updateCurrency({ commit }, value) {
|
|
commit("updateCurrencyValue", (value = value));
|
|
},
|
|
hideSwitchPrice({ commit }, value) {
|
|
commit("hideSwitchPriceValue", value);
|
|
}
|
|
};
|
|
|
|
// mutations
|
|
export const mutations = {
|
|
changePicture(state) {
|
|
state.pictureUpdate = !state.pictureUpdate;
|
|
},
|
|
changeRegisterState(state) {
|
|
state.socialRegisterUpdate = !state.socialRegisterUpdate;
|
|
},
|
|
toggleDrawerState(state, payload) {
|
|
state.drawerIsActive = payload;
|
|
},
|
|
toggleSearchDialogState(state,payload) {
|
|
state.searchDialogIsActive = payload;
|
|
},
|
|
updateCurrencyValue(state, value) {
|
|
state.currency = value;
|
|
},
|
|
hideSwitchPriceValue(state,payload) {
|
|
state.hidePrice = payload
|
|
}
|
|
};
|
|
|
|
// getters
|
|
export const getters = {
|
|
getPictureStatus(state) {
|
|
return state.pictureUpdate;
|
|
},
|
|
getRegisterStatus(state) {
|
|
return state.socialRegisterUpdate;
|
|
},
|
|
getDrawerStatus(state) {
|
|
return state.drawerIsActive;
|
|
},
|
|
getSearchDialogStatus(state) {
|
|
return state.searchDialogIsActive;
|
|
},
|
|
getCurrency(state) {
|
|
return state.currency;
|
|
},
|
|
getHidePrice(state) {
|
|
return state.hidePrice;
|
|
},
|
|
};
|