From e6f127c33f2919ffbe0b9767e74f90b407be6633 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 6 Sep 2022 10:37:49 +0100 Subject: [PATCH] update upload request to handle source correctly --- .../_components/DeletePluginModal.svelte | 8 ++++---- .../manage/plugins/_components/PluginRow.svelte | 17 ++++++++++------- .../builder/portal/manage/plugins/index.svelte | 13 +------------ packages/builder/src/stores/portal/plugins.js | 4 +++- packages/frontend-core/src/api/plugins.js | 4 ++-- packages/server/src/api/controllers/plugin.ts | 13 +++++++++---- packages/server/src/api/routes/plugin.ts | 2 +- 7 files changed, 30 insertions(+), 31 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte index 56dfc4ea17..3907c1a0a2 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte @@ -4,12 +4,12 @@ import { plugins } from "stores/portal" - export let removePlugin + export let plugin async function deletePlugin() { try { - await plugins.deletePlugin(removePlugin._id, removePlugin._rev) - notifications.success(`Plugin ${removePlugin?.name} deleted.`) + await plugins.deletePlugin(plugin._id, plugin._rev) + notifications.success(`Plugin ${plugin?.name} deleted.`) $goto("./") } catch (error) { notifications.error("Error deleting plugin") @@ -26,6 +26,6 @@ showCloseIcon={false} > - Are you sure you want to delete {removePlugin?.name} + Are you sure you want to delete {plugin?.name} 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 848611c248..4335749a90 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 @@ -8,16 +8,17 @@ Label, Input, } from "@budibase/bbui" + import DeletePluginModal from "../_components/DeletePluginModal.svelte" export let plugin - export let deletePlugin + + let detailsModal + let deleteModal let icon = plugin.schema.type === "component" ? plugin.schema.schema.icon || "Book" : plugin.schema.schema.icon || "Beaker" - - let detailsModal
@@ -69,7 +70,7 @@
- +
@@ -85,15 +86,17 @@
+ + + +