Remove all instances of inject, replace with VueX store

This commit is contained in:
Alicia Sykes
2021-10-09 19:24:51 +01:00
parent 8a8166bb47
commit b55f96c839
16 changed files with 97 additions and 75 deletions

View File

@@ -55,7 +55,11 @@ import { modalNames, serviceEndpoints } from '@/utils/defaults';
export default {
name: 'RebuildApp',
inject: ['config'],
computed: {
appConfig() {
return this.$store.getters.appConfig;
},
},
components: {
Button,
RebuildIcon,
@@ -112,12 +116,8 @@ export default {
},
},
mounted() {
if (this.config) {
if (this.config.appConfig) {
if (this.config.appConfig.allowConfigEdit === false) {
this.allowRebuild = false;
}
}
if (this.appConfig.allowConfigEdit === false) {
this.allowRebuild = false;
}
},
};