From e59706e36fe1ff8a5c84b42e3afb55a6c526e63a Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 20 Nov 2022 12:29:17 +0100 Subject: [PATCH] client: delete webhooks Changelog: Added --- packages/client/src/pages/settings/webhook.edit.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/client/src/pages/settings/webhook.edit.vue b/packages/client/src/pages/settings/webhook.edit.vue index 5da588142..c35ceb114 100644 --- a/packages/client/src/pages/settings/webhook.edit.vue +++ b/packages/client/src/pages/settings/webhook.edit.vue @@ -29,6 +29,7 @@
{{ i18n.ts.save }} + {{ i18n.ts.delete }}
@@ -79,6 +80,17 @@ async function save(): Promise { }); } +async function del(): Promise { + const { canceled } = await os.confirm({ + type: 'warning', + text: i18n.ts.deleteConfirm, + }); + if (canceled) return; + await os.apiWithDialog('i/webhooks/delete', { + webhookId: webhook.id, + }); +} + definePageMetadata({ title: 'Edit webhook', icon: 'fas fa-bolt',