mirror of https://github.com/Lissy93/dashy.git
Import conf at build time
This commit is contained in:
parent
f87e2fcd78
commit
38337ed693
|
@ -16,6 +16,8 @@ import ErrorHandler from '@/utils/ErrorHandler';
|
||||||
import { applyItemId } from '@/utils/SectionHelpers';
|
import { applyItemId } from '@/utils/SectionHelpers';
|
||||||
import $store from '@/store';
|
import $store from '@/store';
|
||||||
|
|
||||||
|
import buildConf from '../../public/conf.yml';
|
||||||
|
|
||||||
export default class ConfigAccumulator {
|
export default class ConfigAccumulator {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.conf = $store.state.remoteConfig;
|
this.conf = $store.state.remoteConfig;
|
||||||
|
@ -25,7 +27,7 @@ export default class ConfigAccumulator {
|
||||||
appConfig() {
|
appConfig() {
|
||||||
let appConfigFile = {};
|
let appConfigFile = {};
|
||||||
// Set app config from file
|
// Set app config from file
|
||||||
if (this.conf) appConfigFile = this.conf.appConfig || {};
|
if (this.conf) appConfigFile = this.conf.appConfig || buildConf.appConfig || {};
|
||||||
// Fill in defaults if anything missing
|
// Fill in defaults if anything missing
|
||||||
let usersAppConfig = defaultAppConfig;
|
let usersAppConfig = defaultAppConfig;
|
||||||
if (localStorage[localStorageKeys.APP_CONFIG]) {
|
if (localStorage[localStorageKeys.APP_CONFIG]) {
|
||||||
|
|
Loading…
Reference in New Issue