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 new file mode 100644 index 0000000000..3907c1a0a2 --- /dev/null +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte @@ -0,0 +1,31 @@ + + + + + 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 3a92a699e6..9c166b8b1b 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,6 +1,8 @@
@@ -41,9 +51,7 @@ - plugins.deletePlugin(plugin._id, plugin._rev)} - icon="Delete">Delete remove(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 61227786b0..489333b095 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte @@ -13,9 +13,12 @@ import { plugins } from "stores/portal" import PluginRow from "./_components/PluginRow.svelte" import AddPluginModal from "./_components/AddPluginModal.svelte" + import DeletePluginModal from "./_components/DeletePluginModal.svelte" let modal + let deleteModal let searchTerm = "" + let removePlugin let filterOptions = [ { label: "All Plugins", value: "all" }, @@ -31,6 +34,14 @@ .filter(plugin => plugin?.name?.toLowerCase().includes(searchTerm.toLowerCase()) ) + + const deletePlugin = evt => { + const { detail } = evt + + deleteModal.show() + removePlugin = detail + } + onMount(async () => { await plugins.load() }) @@ -66,7 +77,7 @@ {#if $plugins} {#each filteredPlugins as plugin} - + {/each} {/if} @@ -75,6 +86,9 @@ + + +