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