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 3907c1a0a2..56dfc4ea17 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 plugin + export let removePlugin async function deletePlugin() { try { - await plugins.deletePlugin(plugin._id, plugin._rev) - notifications.success(`Plugin ${plugin?.name} deleted.`) + await plugins.deletePlugin(removePlugin._id, removePlugin._rev) + notifications.success(`Plugin ${removePlugin?.name} deleted.`) $goto("./") } catch (error) { notifications.error("Error deleting plugin") @@ -26,6 +26,6 @@ showCloseIcon={false} > - Are you sure you want to delete {plugin?.name} + Are you sure you want to delete {removePlugin?.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 9c166b8b1b..46f17ac166 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,24 +1,14 @@
@@ -51,7 +41,8 @@ - remove(plugin)} icon="Delete">Delete deletePlugin(plugin)} icon="Delete" + >Delete editGroup(plugin)} icon="Edit">Edit diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte index 489333b095..04f8ffaf69 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte @@ -35,11 +35,9 @@ plugin?.name?.toLowerCase().includes(searchTerm.toLowerCase()) ) - const deletePlugin = evt => { - const { detail } = evt - + const deletePlugin = plugin => { deleteModal.show() - removePlugin = detail + removePlugin = plugin } onMount(async () => { @@ -77,7 +75,7 @@ {#if $plugins} {#each filteredPlugins as plugin} - + {/each} {/if} @@ -87,7 +85,7 @@ - +