Move layout store to ui
This commit is contained in:
parent
a620ee62c6
commit
420eac78dd
@ -20,10 +20,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$store.getters.layout.title;
|
||||
return this.$store.getters.ui.title;
|
||||
},
|
||||
backgroundColor() {
|
||||
return this.$store.getters.layout.backgroundColor;
|
||||
return this.$store.getters.ui.backgroundColor;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
@ -1,5 +1,6 @@
|
||||
// TODO: Shouldn't we use mapState/mapGetters?
|
||||
export default {
|
||||
product: state => state.product,
|
||||
isLoading: state => state.isLoading,
|
||||
layout: state => state.layout,
|
||||
ui: state => state.ui,
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ import * as types from './mutations-types';
|
||||
export const initialState = {
|
||||
product: null,
|
||||
isLoading: false,
|
||||
layout: {
|
||||
ui: {
|
||||
title: constants.APP_NAME,
|
||||
backgroundColor: constants.APP_DEFAULT_BACKGROUND_COLOR,
|
||||
},
|
||||
@ -19,9 +19,9 @@ export const mutations = {
|
||||
state.isLoading = true;
|
||||
},
|
||||
[types.SET_TITLE](state, { title }) {
|
||||
state.layout.title = title;
|
||||
state.ui.title = title;
|
||||
},
|
||||
[types.SET_BACKGROUND_COLOR](state, { backgroundColor }) {
|
||||
state.layout.backgroundColor = backgroundColor;
|
||||
state.ui.backgroundColor = backgroundColor;
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user