From 398d64c53f84d80e0066d31a50a8024bc2d5626c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 16 Oct 2023 01:14:19 +0200 Subject: [PATCH] [Integrations UI] Added new `Integrations` panel. --- platypush/backend/http/webapp/src/Utils.vue | 4 +- .../backend/http/webapp/src/assets/icons.json | 3 + .../http/webapp/src/components/Nav.vue | 11 +- .../src/components/panels/Extensions/Doc.vue | 118 ++++++++++ .../panels/Extensions/Extension.vue | 91 ++++++++ .../components/panels/Extensions/Index.vue | 211 ++++++++++++++++++ .../src/components/panels/Settings/Index.vue | 4 +- .../panels/Settings/Integrations.vue | 62 ----- .../components/panels/Settings/sections.json | 7 - .../{Integrations.vue => Extensions.vue} | 2 +- .../backend/http/webapp/src/views/Panel.vue | 3 +- 11 files changed, 436 insertions(+), 80 deletions(-) create mode 100644 platypush/backend/http/webapp/src/components/panels/Extensions/Doc.vue create mode 100644 platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue create mode 100644 platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue delete mode 100644 platypush/backend/http/webapp/src/components/panels/Settings/Integrations.vue rename platypush/backend/http/webapp/src/utils/{Integrations.vue => Extensions.vue} (93%) diff --git a/platypush/backend/http/webapp/src/Utils.vue b/platypush/backend/http/webapp/src/Utils.vue index bafc3aa87..17069fbee 100644 --- a/platypush/backend/http/webapp/src/Utils.vue +++ b/platypush/backend/http/webapp/src/Utils.vue @@ -4,7 +4,7 @@ import Clipboard from "@/utils/Clipboard"; import Cookies from "@/utils/Cookies"; import DateTime from "@/utils/DateTime"; import Events from "@/utils/Events"; -import Integrations from "@/utils/Integrations"; +import Extensions from "@/utils/Extensions"; import Notification from "@/utils/Notification"; import Screen from "@/utils/Screen"; import Text from "@/utils/Text"; @@ -19,7 +19,7 @@ export default { DateTime, Events, Notification, - Integrations, + Extensions, Screen, Text, Types, diff --git a/platypush/backend/http/webapp/src/assets/icons.json b/platypush/backend/http/webapp/src/assets/icons.json index a0594746c..6b7d050ca 100644 --- a/platypush/backend/http/webapp/src/assets/icons.json +++ b/platypush/backend/http/webapp/src/assets/icons.json @@ -29,6 +29,9 @@ "execute": { "class": "fa fa-play" }, + "extensions": { + "class": "fas fa-puzzle-piece" + }, "light.hue": { "class": "fas fa-lightbulb" }, diff --git a/platypush/backend/http/webapp/src/components/Nav.vue b/platypush/backend/http/webapp/src/components/Nav.vue index 74ffa87f3..48d9447f8 100644 --- a/platypush/backend/http/webapp/src/components/Nav.vue +++ b/platypush/backend/http/webapp/src/components/Nav.vue @@ -101,10 +101,11 @@ export default { return names } - let panelNames = Object.keys(this.panels) + let panelNames = Object.keys(this.panels).sort() + panelNames = prepend(panelNames, 'extensions') panelNames = prepend(panelNames, 'execute') panelNames = prepend(panelNames, 'entities') - return panelNames.sort() + return panelNames }, collapsedDefault() { @@ -125,6 +126,8 @@ export default { return 'Home' if (name === 'execute') return 'Execute' + if (name === 'extensions') + return 'Extensions' return name }, @@ -252,12 +255,12 @@ nav { } .plugins { - height: calc(100% - #{$toggler-height} - #{$footer-expanded-height} - 1em); + height: calc(100% - #{$toggler-height} - #{$footer-expanded-height} - 1.5em); overflow: auto; } .footer { - height: $footer-expanded-height; + height: calc($footer-expanded-height + 0.4em); background: $nav-footer-bg; padding: 0; margin: 0; diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Doc.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Doc.vue new file mode 100644 index 000000000..dc8524930 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Doc.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue new file mode 100644 index 000000000..8a560edb1 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue new file mode 100644 index 000000000..1a45eeaf0 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue @@ -0,0 +1,211 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Settings/Index.vue b/platypush/backend/http/webapp/src/components/panels/Settings/Index.vue index 521689ad6..baabc173a 100644 --- a/platypush/backend/http/webapp/src/components/panels/Settings/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Settings/Index.vue @@ -5,7 +5,6 @@ v-if="selectedPanel === 'users' && currentUser" /> - @@ -13,12 +12,11 @@ - - diff --git a/platypush/backend/http/webapp/src/components/panels/Settings/sections.json b/platypush/backend/http/webapp/src/components/panels/Settings/sections.json index 7f8dfe768..fc6adc452 100644 --- a/platypush/backend/http/webapp/src/components/panels/Settings/sections.json +++ b/platypush/backend/http/webapp/src/components/panels/Settings/sections.json @@ -11,12 +11,5 @@ "icon": { "class": "fas fa-key" } - }, - - "integrations": { - "name": "Integrations", - "icon": { - "class": "fas fa-puzzle-piece" - } } } diff --git a/platypush/backend/http/webapp/src/utils/Integrations.vue b/platypush/backend/http/webapp/src/utils/Extensions.vue similarity index 93% rename from platypush/backend/http/webapp/src/utils/Integrations.vue rename to platypush/backend/http/webapp/src/utils/Extensions.vue index 0a55f9361..7bbf40ce8 100644 --- a/platypush/backend/http/webapp/src/utils/Integrations.vue +++ b/platypush/backend/http/webapp/src/utils/Extensions.vue @@ -1,6 +1,6 @@