From 88ccae7768a50283373589f7936b72ed8552191d Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 5 Sep 2022 09:35:24 +0100 Subject: [PATCH] put plugin details in a modal --- .../plugins/_components/AddPluginModal.svelte | 18 +--- .../plugins/_components/PluginRow.svelte | 100 +++++++++++++----- 2 files changed, 81 insertions(+), 37 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte index 1fce6746ad..7149136dec 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte @@ -14,13 +14,11 @@ NPM: ["URL"], Github: ["Github Token", "URL"], URL: ["Headers", "URL"], - File: ["Path", "Headers"], - Upload: ["Upload"], + "File Upload": ["File Upload"], } let file let sourceValue = "NPM" let typeValue = "Datasource" - let nameValue let dynamicValues = {} let verificationSuccessful = false @@ -30,7 +28,7 @@ const url = dynamicValues["URL"] switch (source) { - case "upload": + case "file upload": if (file) { await plugins.uploadPlugin(file, sourceValue) } @@ -39,7 +37,6 @@ await plugins.createPlugin( typeValue, source, - nameValue, url, dynamicValues["Github Token"] ) @@ -48,13 +45,12 @@ await plugins.createPlugin( typeValue, source, - nameValue, url, dynamicValues["Headers"] ) break case "npm": - await plugins.createPlugin(typeValue, source, nameValue, url) + await plugins.createPlugin(typeValue, source, url) break } } @@ -86,16 +82,12 @@ - {#each authOptions[sourceValue] as option} - {#if option === "Upload"} + {#if option === "File Upload"}
diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte index 3a92a699e6..4b990ed831 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte @@ -1,14 +1,18 @@
@@ -25,36 +29,72 @@ > {plugin.name} - -
{plugin.schema.type}
-
-
{plugin.source || "-"}
-
{plugin.author || "-"}
{plugin.version}
+
+ {plugin.schema.type.charAt(0).toUpperCase() + plugin.schema.type.slice(1)} +
-
- - - - - plugins.deletePlugin(plugin._id, plugin._rev)} - icon="Delete">Delete - editGroup(plugin)} icon="Edit">Edit - -
+
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+
+