From 1a42d766f8c48f45b0c24dffcaac623b6f350de3 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 5 Aug 2025 03:53:12 +0000 Subject: [PATCH 01/11] added a structure for widget searching --- src/mixins/HomeMixin.js | 7 ++- src/utils/Search.js | 5 ++ src/views/Home.vue | 3 +- user-data/conf.yml | 111 +++++++++++++++++++++++++--------------- 4 files changed, 83 insertions(+), 43 deletions(-) diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.js index 6f163f88..4da17474 100644 --- a/src/mixins/HomeMixin.js +++ b/src/mixins/HomeMixin.js @@ -4,7 +4,7 @@ import Defaults, { localStorageKeys, iconCdns } from '@/utils/defaults'; import Keys from '@/utils/StoreMutations'; -import { searchTiles } from '@/utils/Search'; +import { searchTiles, searchWidgets } from '@/utils/Search'; import { checkItemVisibility } from '@/utils/CheckItemVisibility'; const HomeMixin = { @@ -105,6 +105,11 @@ const HomeMixin = { const visibleTiles = allTiles.filter((tile) => checkItemVisibility(tile)); return searchTiles(visibleTiles, this.searchValue); }, + + filterWidgets(allWidgets) { + return searchWidgets(allWidgets); + }, + /* Checks if any sections or items use icons from a given CDN */ checkIfIconLibraryNeeded(prefix) { if (!this.sections) return false; diff --git a/src/utils/Search.js b/src/utils/Search.js index 99f32484..53a76417 100644 --- a/src/utils/Search.js +++ b/src/utils/Search.js @@ -51,6 +51,11 @@ export const searchTiles = (allTiles, searchTerm) => { }); }; +export const searchWidgets = (allWidgets, searchTerm) => { + if (!searchTerm) return allWidgets; + return allWidgets; +}; + /* From a list of search bangs, return the URL associated with it */ export const getSearchEngineFromBang = (searchQuery, bangList) => { const bangNames = Object.keys(bangList); diff --git a/src/views/Home.vue b/src/views/Home.vue index 004b181a..e2577258 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -29,7 +29,7 @@ :displayData="getDisplayData(section)" :groupId="makeSectionId(section)" :items="section.filteredItems" - :widgets="section.widgets" + :widgets="section.filteredWidgets" :searchTerm="searchValue" :itemSize="itemSizeBound" @itemClicked="finishedSearching()" @@ -102,6 +102,7 @@ export default { return sections.map((_section) => { const section = _section; section.filteredItems = this.filterTiles(section.items, this.searchValue); + section.filteredWidgets = this.filterWidgets(section.widgets, this.searchValue); return section; }); }, diff --git a/user-data/conf.yml b/user-data/conf.yml index 5f0b012a..ebab119e 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -1,47 +1,76 @@ ---- -# Page meta info, like heading, footer text and nav links pageInfo: title: Dashy description: Welcome to your new dashboard! navLinks: - - title: GitHub - path: https://github.com/Lissy93/dashy - - title: Documentation - path: https://dashy.to/docs - -# Optional app settings and configuration + - title: GitHub + path: https://github.com/Lissy93/dashy + - title: Documentation + path: https://dashy.to/docs appConfig: - theme: colorful - -# Main content - An array of sections, each containing an array of items + theme: dracula + layout: auto + iconSize: medium + auth: + users: + - user: shumitt + hash: 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 + type: admin + - user: shumitt2 + hash: 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 sections: -- name: Getting Started - icon: fas fa-rocket - items: - - title: Dashy Live - description: Development a project management links for Dashy - icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png - url: https://live.dashy.to/ - target: newtab - - title: GitHub - description: Source Code, Issues and Pull Requests - url: https://github.com/lissy93/dashy - icon: favicon - - title: Docs - description: Configuring & Usage Documentation - provider: Dashy.to - icon: far fa-book - url: https://dashy.to/docs - - title: Showcase - description: See how others are using Dashy - url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md - icon: far fa-grin-hearts - - title: Config Guide - description: See full list of configuration options - url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md - icon: fas fa-wrench - - title: Support - description: Get help with Dashy, raise a bug, or get in contact - url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md - icon: far fa-hands-helping - \ No newline at end of file + - name: Getting Started + icon: fas fa-rocket + items: + - title: Dashy Live + description: Development a project management links for Dashy + icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png + url: https://live.dashy.to/ + target: newtab + id: 0_1481_dashylive + - title: GitHub + description: Source Code, Issues and Pull Requests + url: https://github.com/lissy93/dashy + icon: favicon + id: 1_1481_github + - title: Docs + description: Configuring & Usage Documentation + provider: Dashy.to + icon: far fa-book + url: https://dashy.to/docs + id: 2_1481_docs + - title: Showcase + description: See how others are using Dashy + url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md + icon: far fa-grin-hearts + id: 3_1481_showcase + - title: Config Guide + description: See full list of configuration options + url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md + icon: fas fa-wrench + id: 4_1481_configguide + - title: Support + description: Get help with Dashy, raise a bug, or get in contact + url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md + icon: far fa-hands-helping + id: 5_1481_support + - name: Widgets + displayData: + sortBy: default + rows: 2 + cols: 1 + collapsed: false + hideForGuests: false + widgets: + - type: clock + options: + timeZone: Pacific/Auckland + format: en-NZ + hideDate: false + label: "Test Label" + - type: clock + options: + timeZone: Pacific/Auckland + format: en-NZ + hideDate: false + label: "Test Label 2" + From 600f00ea5e85a2ecad19b666131cea9d718f995f Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 5 Aug 2025 09:22:36 +0000 Subject: [PATCH 02/11] working category filter on widgets --- src/mixins/HomeMixin.js | 3 +-- src/utils/Search.js | 8 +++++++- src/views/Home.vue | 4 +++- user-data/conf.yml | 5 +++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.js index 4da17474..636b1a63 100644 --- a/src/mixins/HomeMixin.js +++ b/src/mixins/HomeMixin.js @@ -105,9 +105,8 @@ const HomeMixin = { const visibleTiles = allTiles.filter((tile) => checkItemVisibility(tile)); return searchTiles(visibleTiles, this.searchValue); }, - filterWidgets(allWidgets) { - return searchWidgets(allWidgets); + return searchWidgets(allWidgets, this.searchValue); }, /* Checks if any sections or items use icons from a given CDN */ diff --git a/src/utils/Search.js b/src/utils/Search.js index 53a76417..c600e372 100644 --- a/src/utils/Search.js +++ b/src/utils/Search.js @@ -53,7 +53,13 @@ export const searchTiles = (allTiles, searchTerm) => { export const searchWidgets = (allWidgets, searchTerm) => { if (!searchTerm) return allWidgets; - return allWidgets; + if (!allWidgets) return []; + return allWidgets.filter((tile) => { + const { + options, + } = tile; + return filterHelper(options.category, searchTerm); + }); }; /* From a list of search bangs, return the URL associated with it */ diff --git a/src/views/Home.vue b/src/views/Home.vue index e2577258..79817d0b 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -35,7 +35,9 @@ @itemClicked="finishedSearching()" @change-modal-visibility="updateModalVisibility" :isWide="!!singleSectionView || layoutOrientation === 'horizontal'" - :class="(searchValue && section.filteredItems.length === 0) ? 'no-results' : ''" + :class="(searchValue && + section.filteredItems.length === 0 && + (!section.widgets || section.widgets.length === 0)) ? 'no-results' : ''" /> diff --git a/user-data/conf.yml b/user-data/conf.yml index ebab119e..0aa432f1 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -66,11 +66,12 @@ sections: timeZone: Pacific/Auckland format: en-NZ hideDate: false - label: "Test Label" + label: Test Label - type: clock options: timeZone: Pacific/Auckland format: en-NZ hideDate: false - label: "Test Label 2" + label: Test Label 2 + category: timer From e34d1b58538674f8cc4e7dc7d54b68417a4ae082 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 5 Aug 2025 09:39:43 +0000 Subject: [PATCH 03/11] no-results logic fix --- src/views/Home.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 79817d0b..a3217221 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -36,8 +36,8 @@ @change-modal-visibility="updateModalVisibility" :isWide="!!singleSectionView || layoutOrientation === 'horizontal'" :class="(searchValue && - section.filteredItems.length === 0 && - (!section.widgets || section.widgets.length === 0)) ? 'no-results' : ''" + (section.filteredItems.length === 0 && + section.filteredWidgets.length === 0)) ? 'no-results' : ''" /> From 9080690c83aa9bba6056aaaaa42459817f59eb04 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 5 Aug 2025 09:47:06 +0000 Subject: [PATCH 04/11] consolidation into one set of functions --- src/mixins/HomeMixin.js | 11 ++++----- src/utils/Search.js | 51 ++++++++++++++++++++++++----------------- src/views/Home.vue | 2 +- 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.js index 636b1a63..e9871965 100644 --- a/src/mixins/HomeMixin.js +++ b/src/mixins/HomeMixin.js @@ -4,7 +4,7 @@ import Defaults, { localStorageKeys, iconCdns } from '@/utils/defaults'; import Keys from '@/utils/StoreMutations'; -import { searchTiles, searchWidgets } from '@/utils/Search'; +import { searchTiles } from '@/utils/Search'; import { checkItemVisibility } from '@/utils/CheckItemVisibility'; const HomeMixin = { @@ -103,12 +103,11 @@ const HomeMixin = { return []; } const visibleTiles = allTiles.filter((tile) => checkItemVisibility(tile)); - return searchTiles(visibleTiles, this.searchValue); + if ('title' in allTiles[0]) { + return searchTiles(visibleTiles, this.searchValue); + } + return searchTiles(visibleTiles, this.searchValue, true); }, - filterWidgets(allWidgets) { - return searchWidgets(allWidgets, this.searchValue); - }, - /* Checks if any sections or items use icons from a given CDN */ checkIfIconLibraryNeeded(prefix) { if (!this.sections) return false; diff --git a/src/utils/Search.js b/src/utils/Search.js index c600e372..b9d92378 100644 --- a/src/utils/Search.js +++ b/src/utils/Search.js @@ -36,31 +36,40 @@ const filterHelper = (compareStr, searchStr) => { * @param {string} searchTerm The users search term * @returns A filtered array of tiles */ -export const searchTiles = (allTiles, searchTerm) => { +export const searchTiles = (allTiles, searchTerm, isWidgets) => { if (!searchTerm) return allTiles; // If no search term, then return all if (!allTiles) return []; // If no data, then skip - return allTiles.filter((tile) => { - const { - title, description, provider, url, tags, - } = tile; - return filterHelper(title, searchTerm) - || filterHelper(provider, searchTerm) - || filterHelper(description, searchTerm) - || filterHelper(tags, searchTerm) - || filterHelper(getDomainFromUrl(url), searchTerm); - }); + if (!isWidgets) { + return allTiles.filter((tile) => { + const { + title, description, provider, url, tags, + } = tile; + return filterHelper(title, searchTerm) + || filterHelper(provider, searchTerm) + || filterHelper(description, searchTerm) + || filterHelper(tags, searchTerm) + || filterHelper(getDomainFromUrl(url), searchTerm); + }); + } else { + return allTiles.filter((tile) => { + const { + options, + } = tile; + return filterHelper(options.category, searchTerm); + }); + } }; -export const searchWidgets = (allWidgets, searchTerm) => { - if (!searchTerm) return allWidgets; - if (!allWidgets) return []; - return allWidgets.filter((tile) => { - const { - options, - } = tile; - return filterHelper(options.category, searchTerm); - }); -}; +// export const searchWidgets = (allWidgets, searchTerm) => { +// if (!searchTerm) return allWidgets; +// if (!allWidgets) return []; +// return allWidgets.filter((tile) => { +// const { +// options, +// } = tile; +// return filterHelper(options.category, searchTerm); +// }); +// }; /* From a list of search bangs, return the URL associated with it */ export const getSearchEngineFromBang = (searchQuery, bangList) => { diff --git a/src/views/Home.vue b/src/views/Home.vue index a3217221..724cdf97 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -104,7 +104,7 @@ export default { return sections.map((_section) => { const section = _section; section.filteredItems = this.filterTiles(section.items, this.searchValue); - section.filteredWidgets = this.filterWidgets(section.widgets, this.searchValue); + section.filteredWidgets = this.filterTiles(section.widgets, this.searchValue); return section; }); }, From 1aa4f2c0409c398710f0e0fff69542ad098eba1e Mon Sep 17 00:00:00 2001 From: Shumit Taher Date: Tue, 12 Aug 2025 05:19:33 +0000 Subject: [PATCH 05/11] removing extra code and consolidation. --- src/mixins/HomeMixin.js | 10 ++++++---- src/utils/Search.js | 13 +------------ user-data/conf.yml | 7 ------- 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.js index e9871965..4ff5c790 100644 --- a/src/mixins/HomeMixin.js +++ b/src/mixins/HomeMixin.js @@ -103,10 +103,12 @@ const HomeMixin = { return []; } const visibleTiles = allTiles.filter((tile) => checkItemVisibility(tile)); - if ('title' in allTiles[0]) { - return searchTiles(visibleTiles, this.searchValue); - } - return searchTiles(visibleTiles, this.searchValue, true); + + return searchTiles(visibleTiles, this.searchValue, this.areWidgets(allTiles)); + }, + /* Checks if titles are widgets */ + areWidgets(allTiles) { + return Array.isArray(allTiles) && allTiles.length > 0 && !('title' in allTiles[0]); }, /* Checks if any sections or items use icons from a given CDN */ checkIfIconLibraryNeeded(prefix) { diff --git a/src/utils/Search.js b/src/utils/Search.js index b9d92378..7b429f34 100644 --- a/src/utils/Search.js +++ b/src/utils/Search.js @@ -35,6 +35,7 @@ const filterHelper = (compareStr, searchStr) => { * @param {array} allTiles An array of tiles * @param {string} searchTerm The users search term * @returns A filtered array of tiles + * if widgets are sent as allTiles, then the search is done based on options.category */ export const searchTiles = (allTiles, searchTerm, isWidgets) => { if (!searchTerm) return allTiles; // If no search term, then return all @@ -59,18 +60,6 @@ export const searchTiles = (allTiles, searchTerm, isWidgets) => { }); } }; - -// export const searchWidgets = (allWidgets, searchTerm) => { -// if (!searchTerm) return allWidgets; -// if (!allWidgets) return []; -// return allWidgets.filter((tile) => { -// const { -// options, -// } = tile; -// return filterHelper(options.category, searchTerm); -// }); -// }; - /* From a list of search bangs, return the URL associated with it */ export const getSearchEngineFromBang = (searchQuery, bangList) => { const bangNames = Object.keys(bangList); diff --git a/user-data/conf.yml b/user-data/conf.yml index 0aa432f1..d0005e22 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -10,13 +10,6 @@ appConfig: theme: dracula layout: auto iconSize: medium - auth: - users: - - user: shumitt - hash: 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 - type: admin - - user: shumitt2 - hash: 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 sections: - name: Getting Started icon: fas fa-rocket From d1f13ca31c3064ae903a9f65d1e473d3cb4b24b4 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 12 Aug 2025 08:24:23 +0000 Subject: [PATCH 06/11] change in conf file for testing --- src/mixins/HomeMixin.js | 1 - user-data/conf.yml | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.js index 4ff5c790..a06da708 100644 --- a/src/mixins/HomeMixin.js +++ b/src/mixins/HomeMixin.js @@ -103,7 +103,6 @@ const HomeMixin = { return []; } const visibleTiles = allTiles.filter((tile) => checkItemVisibility(tile)); - return searchTiles(visibleTiles, this.searchValue, this.areWidgets(allTiles)); }, /* Checks if titles are widgets */ diff --git a/user-data/conf.yml b/user-data/conf.yml index d0005e22..78b35c00 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -49,17 +49,14 @@ sections: - name: Widgets displayData: sortBy: default - rows: 2 - cols: 1 + rows: 1 + cols: 3 collapsed: false hideForGuests: false widgets: - - type: clock + - type: crypto-watch-list options: - timeZone: Pacific/Auckland - format: en-NZ - hideDate: false - label: Test Label + limit: 10 - type: clock options: timeZone: Pacific/Auckland @@ -67,4 +64,9 @@ sections: hideDate: false label: Test Label 2 category: timer - + - type: weather + options: + apiKey: 622126b2099b1a7007af4b3aff676add + city: Hamilton, NZ + units: metric + hideDetails: true \ No newline at end of file From 5436e7a34f4878f157d8c765d3ccdca5596cfca4 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 12 Aug 2025 10:19:51 +0000 Subject: [PATCH 07/11] added front end for selecting widgetCategories in section options modal --- src/components/InteractiveEditor/EditSection.vue | 1 + src/utils/ConfigSchema.json | 10 ++++++++++ src/utils/Search.js | 4 ++-- user-data/conf.yml | 8 +++++--- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/components/InteractiveEditor/EditSection.vue b/src/components/InteractiveEditor/EditSection.vue index 7222a7a7..f5228c40 100644 --- a/src/components/InteractiveEditor/EditSection.vue +++ b/src/components/InteractiveEditor/EditSection.vue @@ -69,6 +69,7 @@ export default { cols: displayDataSchema.cols, collapsed: displayDataSchema.collapsed, hideForGuests: displayDataSchema.hideForGuests, + widgetCategories: displayDataSchema.widgetCategories, }, }, }, diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index 92039798..2f4b1531 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -825,6 +825,16 @@ "default": 1, "description": "The amount of space that the section spans horizontally" }, + "widgetCategories": { + "type": "array", + "title": "Widget Categories", + "description": "Tags for this section (add/remove text tags).", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [] + }, "sectionLayout": { "title": "Layout Type", "type": "string", diff --git a/src/utils/Search.js b/src/utils/Search.js index 7b429f34..0cdce3e5 100644 --- a/src/utils/Search.js +++ b/src/utils/Search.js @@ -54,9 +54,9 @@ export const searchTiles = (allTiles, searchTerm, isWidgets) => { } else { return allTiles.filter((tile) => { const { - options, + category, } = tile; - return filterHelper(options.category, searchTerm); + return filterHelper(category, searchTerm); }); } }; diff --git a/user-data/conf.yml b/user-data/conf.yml index 78b35c00..fdd4a80a 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -53,20 +53,22 @@ sections: cols: 3 collapsed: false hideForGuests: false + widgetCategories: [timer, weather] widgets: - type: crypto-watch-list options: limit: 10 - type: clock + category: timer options: timeZone: Pacific/Auckland format: en-NZ hideDate: false - label: Test Label 2 - category: timer + label: Test Label 2 - type: weather + category: weather options: apiKey: 622126b2099b1a7007af4b3aff676add city: Hamilton, NZ units: metric - hideDetails: true \ No newline at end of file + hideDetails: true \ No newline at end of file From a6c7697a94219122395e5d6e877888edabc06f77 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 12 Aug 2025 11:14:33 +0000 Subject: [PATCH 08/11] filtering added for widgets through config of section . --- src/views/Home.vue | 22 +++++++++++++++++++++- user-data/conf.yml | 6 ++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 724cdf97..8a960c80 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -104,7 +104,15 @@ export default { return sections.map((_section) => { const section = _section; section.filteredItems = this.filterTiles(section.items, this.searchValue); - section.filteredWidgets = this.filterTiles(section.widgets, this.searchValue); + + const searchedWidgets = this.filterTiles(section.widgets, this.searchValue); + const widgetCategoriesArray = this.normalizeWidgetCats( + this.getDisplayData(section).widgetCategories, + ); + section.filteredWidgets = this.filterWidgetsByCategories( + searchedWidgets, widgetCategoriesArray, + ); + return section; }); }, @@ -126,6 +134,18 @@ export default { }, }, methods: { + /* returns only widgets that have category that are present in + widgetCategories array in section config displayData */ + filterWidgetsByCategories(widgets, cats) { + if (!cats.length) return widgets || []; + return (widgets || []).filter(w => (typeof w.category === 'string' + && cats.includes(w.category.toLowerCase().trim()))); + }, + /* Normalization of widget categories text inputs by user */ + normalizeWidgetCats(cats) { + if (!Array.isArray(cats)) return []; + return cats.map(c => String(c).toLowerCase().trim()).filter(Boolean); + }, /* Clears input field, once a searched item is opened */ finishedSearching() { if (this.$refs.filterComp) this.$refs.filterComp.clearFilterInput(); diff --git a/user-data/conf.yml b/user-data/conf.yml index fdd4a80a..b48298d0 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -67,6 +67,12 @@ sections: label: Test Label 2 - type: weather category: weather + options: + apiKey: 622126b2099b1a7007af4b3aff676add + city: Hamilton, NZ + units: metric + hideDetails: true + - type: weather options: apiKey: 622126b2099b1a7007af4b3aff676add city: Hamilton, NZ From 72e80a1bcf78ff33948a313ee6c9cde002ff2673 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Tue, 12 Aug 2025 11:24:16 +0000 Subject: [PATCH 09/11] added category in widget schema --- src/utils/ConfigSchema.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index 2f4b1531..c59a5638 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -1180,6 +1180,11 @@ "title": "Widget Options", "type": "object", "description": "Configuration options for widget. Varies depending on widget type, see docs for all options" + }, + "category": { + "title": "Category", + "type": "string", + "description": "Single category tag." } } } From 3f721f273073e4f9fbd0f121288d39c1b1438e6e Mon Sep 17 00:00:00 2001 From: shumit taher Date: Mon, 29 Sep 2025 07:11:34 +0000 Subject: [PATCH 10/11] :sparkles: feature added for categorizing widgets, filtering then as per category in section and srearching widgets category wise from search box. #1882 --- src/utils/ConfigSchema.json | 2 +- user-data/conf.yml | 115 +++++++++++++----------------------- 2 files changed, 42 insertions(+), 75 deletions(-) diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index c59a5638..e463aed0 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -832,7 +832,7 @@ "items": { "type": "string" }, - "uniqueItems": true, + "uniqueItems": false, "default": [] }, "sectionLayout": { diff --git a/user-data/conf.yml b/user-data/conf.yml index b48298d0..5f0b012a 100644 --- a/user-data/conf.yml +++ b/user-data/conf.yml @@ -1,80 +1,47 @@ +--- +# Page meta info, like heading, footer text and nav links pageInfo: title: Dashy description: Welcome to your new dashboard! navLinks: - - title: GitHub - path: https://github.com/Lissy93/dashy - - title: Documentation - path: https://dashy.to/docs + - title: GitHub + path: https://github.com/Lissy93/dashy + - title: Documentation + path: https://dashy.to/docs + +# Optional app settings and configuration appConfig: - theme: dracula - layout: auto - iconSize: medium + theme: colorful + +# Main content - An array of sections, each containing an array of items sections: - - name: Getting Started - icon: fas fa-rocket - items: - - title: Dashy Live - description: Development a project management links for Dashy - icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png - url: https://live.dashy.to/ - target: newtab - id: 0_1481_dashylive - - title: GitHub - description: Source Code, Issues and Pull Requests - url: https://github.com/lissy93/dashy - icon: favicon - id: 1_1481_github - - title: Docs - description: Configuring & Usage Documentation - provider: Dashy.to - icon: far fa-book - url: https://dashy.to/docs - id: 2_1481_docs - - title: Showcase - description: See how others are using Dashy - url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md - icon: far fa-grin-hearts - id: 3_1481_showcase - - title: Config Guide - description: See full list of configuration options - url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md - icon: fas fa-wrench - id: 4_1481_configguide - - title: Support - description: Get help with Dashy, raise a bug, or get in contact - url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md - icon: far fa-hands-helping - id: 5_1481_support - - name: Widgets - displayData: - sortBy: default - rows: 1 - cols: 3 - collapsed: false - hideForGuests: false - widgetCategories: [timer, weather] - widgets: - - type: crypto-watch-list - options: - limit: 10 - - type: clock - category: timer - options: - timeZone: Pacific/Auckland - format: en-NZ - hideDate: false - label: Test Label 2 - - type: weather - category: weather - options: - apiKey: 622126b2099b1a7007af4b3aff676add - city: Hamilton, NZ - units: metric - hideDetails: true - - type: weather - options: - apiKey: 622126b2099b1a7007af4b3aff676add - city: Hamilton, NZ - units: metric - hideDetails: true \ No newline at end of file +- name: Getting Started + icon: fas fa-rocket + items: + - title: Dashy Live + description: Development a project management links for Dashy + icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png + url: https://live.dashy.to/ + target: newtab + - title: GitHub + description: Source Code, Issues and Pull Requests + url: https://github.com/lissy93/dashy + icon: favicon + - title: Docs + description: Configuring & Usage Documentation + provider: Dashy.to + icon: far fa-book + url: https://dashy.to/docs + - title: Showcase + description: See how others are using Dashy + url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md + icon: far fa-grin-hearts + - title: Config Guide + description: See full list of configuration options + url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md + icon: fas fa-wrench + - title: Support + description: Get help with Dashy, raise a bug, or get in contact + url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md + icon: far fa-hands-helping + \ No newline at end of file From c6a2dbd21ba61ea46ab254021bed71927ddf5840 Mon Sep 17 00:00:00 2001 From: shumit taher Date: Mon, 29 Sep 2025 07:45:11 +0000 Subject: [PATCH 11/11] :memo: updating documentation to include new config options --- docs/configuring.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/configuring.md b/docs/configuring.md index 62b876f7..46701305 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -294,6 +294,7 @@ For more info, see the **[Authentication Docs](/docs/authentication.md)** **`timeout`** | `number` | _Optional_ | Request timeout in milliseconds, defaults to ½ a second (`500`) **`ignoreErrors`** | `boolean` | _Optional_ | Prevent an error message being displayed, if a network request or something else fails. Useful for false-positives **`label`** | `string` | _Optional_ | Add custom label to a given widget. Useful for identification, if there are multiple of the same type of widget in a single section +**`category`** | string | _Optional_ | Free-text category for this widget (e.g., Monitoring, CI/CD). Used by category filtering/search. Up to the user whatever category they want to set for a widget. **[⬆️ Back to Top](#configuring)** @@ -317,6 +318,7 @@ For more info, see the **[Authentication Docs](/docs/authentication.md)** **`hideForGuests`** | `boolean` | _Optional_ | Current section will be visible for logged in users, but not for guests (see `appConfig.enableGuestAccess`). Defaults to `false` **`hideForKeycloakUsers`** | `object` | _Optional_ | Current section will be visible to all keycloak users, except for those configured via these groups and roles. See `hideForKeycloakUsers` **`showForKeycloakUsers`** | `object` | _Optional_ | Current section will be hidden from all keycloak users, except for those configured via these groups and roles. See `showForKeycloakUsers` +**`widgetCategories`** | string[] | _Optional_ | Free-text tags for this section, used for category filtering/search of widgets `section.widgets` from within the UI. Editable in the Edit Section modal. Example: ["DevOps", "Monitoring"]. This will work only if corrosponding widget category is setup in the widgets 'category' field. **[⬆️ Back to Top](#configuring)**