π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
β‘ Removed config dependency from searchbar
Alicia Sykes8f893c36d7fb
diff --git a/src/components/Settings/SearchBar.vue b/src/components/Settings/SearchBar.vueindex 22654b2a..42d7cc77 100644--- a/src/components/Settings/SearchBar.vue+++ b/src/components/Settings/SearchBar.vue@@ -95,7 +95,8 @@ export default {},/* If configured, launch specific app when hotkey pressed */handleHotKey(key) {- const usersHotKeys = this.getCustomKeyShortcuts();+ const sections = this.$store.getters.sections || [];+ const usersHotKeys = this.getCustomKeyShortcuts(sections);usersHotKeys.forEach((hotkey) => {if (hotkey.hotkey === parseInt(key, 10)) {if (hotkey.url) window.open(hotkey.url, '_blank');diff --git a/src/utils/ConfigHelpers.js b/src/utils/ConfigHelpers.jsindex 544fd8e1..a2944bf1 100644--- a/src/utils/ConfigHelpers.js+++ b/src/utils/ConfigHelpers.js@@ -1,4 +1,5 @@import ConfigAccumulator from '@/utils/ConfigAccumalator';+// import $store from '@/store';import filterUserSections from '@/utils/CheckSectionVisibility';import { languages } from '@/utils/languages';import {@@ -77,9 +78,8 @@ export const componentVisibility = (appConfig) => {* Returns a list of items which the user has assigned a hotkey to* So that when the hotkey is pressed, the app/ service can be launched*/-export const getCustomKeyShortcuts = () => {+export const getCustomKeyShortcuts = (sections) => {const results = [];- const sections = config.sections || [];sections.forEach((section) => {const itemsWithHotKeys = section.items.filter(item => item.hotkey);results.push(itemsWithHotKeys.map(item => ({ hotkey: item.hotkey, url: item.url })));