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
+6 -3
View File
@@ -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 {