π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:construction: Started working on itnitial state for widgets
Alicia Sykescd3a30474407
diff --git a/src/store.js b/src/store.jsindex 7f9aaaf9..2df242ec 100644--- a/src/store.js+++ b/src/store.js@@ -51,12 +51,15 @@ const store = new Vuex.Store({appConfig(state) {return state.config.appConfig || {};},- theme(state) {- return state.config.appConfig.theme;- },sections(state) {return filterUserSections(state.config.sections || []);},+ widgets(state) {+ return state.config.widgets || [];+ },+ theme(state) {+ return state.config.appConfig.theme;+ },webSearch(state, getters) {return getters.appConfig.webSearch || {};},diff --git a/src/utils/ConfigAccumalator.js b/src/utils/ConfigAccumalator.jsindex 041306e9..018c4f25 100644--- a/src/utils/ConfigAccumalator.js+++ b/src/utils/ConfigAccumalator.js@@ -78,12 +78,23 @@ export default class ConfigAccumulator {return sections;}+ /* Widgets */+ widgets() {+ const localWidgets = localStorage[localStorageKeys.CONF_WIDGETS];+ if (localWidgets) {+ const json = JSON.parse(localWidgets);+ if (json.length >= 1) return json;+ }+ return this.conf.widgets || [];+ }+/* Complete config */config() {return {appConfig: this.appConfig(),pageInfo: this.pageInfo(),sections: this.sections(),+ widgets: this.widgets(),};}}