This commit is contained in:
Alicia Sykes
2022-08-19 10:04:38 +01:00
parent 8f893c36d7
commit cdf1bb9529
7 changed files with 41 additions and 66 deletions

View File

@@ -11,6 +11,8 @@ const getAppConfig = () => {
return config.appConfig || {};
};
// const appConfig = $store.getters.appConfig || {};
/**
* Called when the user is still using array for users, prints warning
* This was a breaking change, implemented in V 1.6.5

View File

@@ -16,7 +16,7 @@ import ErrorHandler from '@/utils/ErrorHandler';
import { applyItemId } from '@/utils/SectionHelpers';
import $store from '@/store';
import buildConf from '../../public/conf.yml';
// import buildConf from '../../public/conf.yml';
export default class ConfigAccumulator {
constructor() {
@@ -33,9 +33,10 @@ export default class ConfigAccumulator {
// Set app config from file
if (this.conf && this.conf.appConfig) {
appConfigFile = this.conf.appConfig;
} else if (buildConf && buildConf.appConfig) {
appConfigFile = buildConf.appConfig;
}
// else if (buildConf && buildConf.appConfig) {
// appConfigFile = buildConf.appConfig;
// }
// Fill in defaults if anything missing
let usersAppConfig = defaultAppConfig;
if (localStorage[localStorageKeys.APP_CONFIG]) {

View File

@@ -9,12 +9,12 @@
/* eslint-disable global-require */
import ConfigAccumulator from '@/utils/ConfigAccumalator';
import $store from '@/store';
import { sentryDsn } from '@/utils/defaults';
const ErrorReporting = (Vue, router) => {
// Fetch users config
const appConfig = new ConfigAccumulator().appConfig() || {};
const appConfig = $store.getters.appConfig || {};
// Check if error reporting is enabled. Only proceed if user has turned it on.
if (appConfig.enableErrorReporting) {
// Get current app version