From 2806e943c334ec1aff4ea18bf919281b0fba598a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 17 Oct 2023 02:12:12 +0200 Subject: [PATCH] [Extensions UI] Added `Install` tab. --- .../src/components/elements/CopyButton.vue | 49 ++++++++++++ .../components/panels/Extensions/Config.vue | 33 ++------ .../panels/Extensions/Extension.vue | 3 + .../components/panels/Extensions/Install.vue | 75 +++++++++++++++++++ .../components/panels/Extensions/common.scss | 8 ++ 5 files changed, 142 insertions(+), 26 deletions(-) create mode 100644 platypush/backend/http/webapp/src/components/elements/CopyButton.vue create mode 100644 platypush/backend/http/webapp/src/components/panels/Extensions/Install.vue create mode 100644 platypush/backend/http/webapp/src/components/panels/Extensions/common.scss diff --git a/platypush/backend/http/webapp/src/components/elements/CopyButton.vue b/platypush/backend/http/webapp/src/components/elements/CopyButton.vue new file mode 100644 index 000000000..f8f260924 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/elements/CopyButton.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue index 1d37bc663..d67b8596f 100644 --- a/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue @@ -1,12 +1,6 @@ @@ -15,11 +9,15 @@ import 'highlight.js/lib/common' import 'highlight.js/styles/stackoverflow-dark.min.css' import hljs from "highlight.js" +import CopyButton from "@/components/elements/CopyButton" import Utils from "@/Utils"; export default { name: "Extension", mixins: [Utils], + components: { + CopyButton, + }, props: { extension: { type: Object, @@ -39,29 +37,12 @@ export default { diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue index cb8a85717..2e7e1e5ac 100644 --- a/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue @@ -27,6 +27,7 @@
+
@@ -36,12 +37,14 @@ import Tab from "@/components/elements/Tab" import Tabs from "@/components/elements/Tabs" import Config from "./Config" import Doc from "./Doc" +import Install from "./Install" export default { name: "Extension", components: { Config, Doc, + Install, Tab, Tabs, }, diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Install.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Install.vue new file mode 100644 index 000000000..3d92de3cc --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Install.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/common.scss b/platypush/backend/http/webapp/src/components/panels/Extensions/common.scss new file mode 100644 index 000000000..22073c157 --- /dev/null +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/common.scss @@ -0,0 +1,8 @@ +pre { + width: 100%; + margin: 0; + background: $code-dark-bg; + color: $code-dark-fg; + padding: 0.5em; + overflow: auto; +}