⚡ Remove all instances of inject, replace with VueX store
This commit is contained in:
@@ -36,7 +36,11 @@ import ErrorHandler from '@/utils/ErrorHandler';
|
||||
|
||||
export default {
|
||||
name: 'AppInfoModal',
|
||||
inject: ['config'],
|
||||
computed: {
|
||||
appConfig() {
|
||||
return this.$store.getters.appConfig;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
appVersion: process.env.VUE_APP_VERSION, // Current version, from package.json
|
||||
@@ -50,8 +54,7 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const appConfig = this.config.appConfig || {};
|
||||
if (!this.appVersion || (appConfig && appConfig.disableUpdateChecks)) {
|
||||
if (!this.appVersion || (this.appConfig && this.appConfig.disableUpdateChecks)) {
|
||||
// Either current version isn't found, or user disabled checks
|
||||
this.checksEnabled = false;
|
||||
} else {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user