π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:alien: Add getter to return specific item
Alicia Sykes36cea32ee59d
diff --git a/src/store.js b/src/store.jsindex 306c80ef..2b2ce518 100644--- a/src/store.js+++ b/src/store.js@@ -35,6 +35,14 @@ const store = new Vuex.Store({visibleComponents(state, getters) {return componentVisibility(getters.appConfig);},+ getItemById: (state, getters) => (id) => {+ let item;+ getters.sections.forEach(sec => {+ const foundItem = sec.items.find((itm) => itm.id === id);+ if (foundItem) item = foundItem;+ });+ return item;+ },},mutations: {[UPDATE_CONFIG](state, config) {