From 6b7e1c479a832056ad5596ba2bee6c7e220174ae Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Fri, 23 Feb 2024 10:14:42 +1000 Subject: [PATCH] Add-on Store: Add sub menu items & various improvements (#2381) Resolves #2047. - Installed addons are grouped by category in the main Add-on Store section. - Search in the main "Add-on Store" menu will search all types of addons. - Search in the corresponding section will only search for add-ons for that category. The subsections are implemented as routable tabs, so switching around the different sections is fast. --------- Also-by: Florian Hotze Signed-off-by: Jimmy Tanagra --- .../web/src/assets/addon-store.js | 39 ++- .../definitions/help/help-qstart-defs.json | 2 +- .../web/src/components/addons/addon-card.vue | 2 +- .../src/components/addons/addon-list-item.vue | 2 +- .../org.openhab.ui/web/src/components/app.vue | 36 ++- bundles/org.openhab.ui/web/src/js/routes.js | 42 +-- .../web/src/pages/addons/addons-store.vue | 251 ++++++++++-------- .../settings/things/add/choose-binding.vue | 4 +- 8 files changed, 231 insertions(+), 147 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/assets/addon-store.js b/bundles/org.openhab.ui/web/src/assets/addon-store.js index e8eb669a29..975071043c 100644 --- a/bundles/org.openhab.ui/web/src/assets/addon-store.js +++ b/bundles/org.openhab.ui/web/src/assets/addon-store.js @@ -1,13 +1,46 @@ export const AddonIcons = { - automation: 'wand_stars', binding: 'circle_grid_hex_fill', - persistence: 'download_circle', + automation: 'wand_stars', transformation: 'function', - misc: 'rectangle_3_offgrid', + persistence: 'download_circle', ui: 'play_rectangle', + misc: 'rectangle_3_offgrid', voice: 'chat_bubble_2_fill' } +export const AddonTitles = { + binding: 'Bindings', + automation: 'Automation', + transformation: 'Transformations', + persistence: 'Persistence', + ui: 'User Interfaces', + misc: 'System Integrations', + voice: 'Voice & Speech' +} + +export const AddonSuggestionLabels = { + binding: { + title: 'Suggested Bindings', + subtitle: 'Suggested bindings, identified from network scan' + }, + misc: { + title: 'Suggested System Integration Add-ons', + subtitle: 'Suggested system integrations, identified from network scan' + }, + persistence: { + title: 'Suggested Persistence Services', + subtitle: 'Suggested backend connectors to store historical data, identified from network scan' + }, + transformation: { + title: 'Suggested Transformation Add-ons', + subtitle: 'Suggested transformation add-ons to translate raw values into processed or human-readable representations, identified from network scan' + }, + voice: { + title: 'Suggested Voice & Speech Add-ons', + subtitle: 'Convert between text and speech, interpret human language queries' + } +} + export const ContentTypes = { 'application/java-archive': 'Java Archive', 'application/vnd.openhab.bundle': 'OSGi Bundle', diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/help/help-qstart-defs.json b/bundles/org.openhab.ui/web/src/assets/definitions/help/help-qstart-defs.json index 20a0d1e134..06c8eb7413 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/help/help-qstart-defs.json +++ b/bundles/org.openhab.ui/web/src/assets/definitions/help/help-qstart-defs.json @@ -4,7 +4,7 @@ "title": "1. Install a Binding (Add-on)", "steps": [ { - "link": "/addons/", + "link": "/addons/binding/", "title": "Add-on Store", "text": "Left panel > Settings > Add-on Store or click here arrow_right" }, diff --git a/bundles/org.openhab.ui/web/src/components/addons/addon-card.vue b/bundles/org.openhab.ui/web/src/components/addons/addon-card.vue index 8f0023017e..68439b1851 100644 --- a/bundles/org.openhab.ui/web/src/components/addons/addon-card.vue +++ b/bundles/org.openhab.ui/web/src/components/addons/addon-card.vue @@ -1,5 +1,5 @@