Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

store.js: feat(store): add advancedSearch getter and mutation for field-based filtering

aspenab8f8545b443
diff --git a/src/store.js b/src/store.js
index b0a6551b..8bce7a82 100644
--- a/src/store.js
+++ b/src/store.js
@@ -93,6 +93,9 @@ const store = new Vuex.Store({
webSearch(state, getters) {
return getters.appConfig.webSearch || {};
},
+ advancedSearch(state, getters) {
+ return getters.appConfig.advancedSearch || {};
+ },
visibleComponents(state, getters) {
return componentVisibility(getters.appConfig);
},
@@ -246,6 +249,12 @@ const store = new Vuex.Store({
if (!state.config.appConfig) state.config.appConfig = {};
state.config.appConfig.goToLinkEnabled = value;
},
+ // Update advanced search settings (partial merge)
+ setAdvancedSearch(state, value) {
+ if (!state.config.appConfig) state.config.appConfig = {};
+ const current = state.config.appConfig.advancedSearch || {};
+ state.config.appConfig.advancedSearch = { ...current, ...value };
+ },
[UPDATE_SECTION](state, payload) {
const { sectionIndex, sectionData } = payload;
const newConfig = { ...state.config };