client: delete webhooks

Changelog: Added
This commit is contained in:
Johann150 2022-11-20 12:29:17 +01:00
parent 0e0411f9e0
commit e59706e36f
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -29,6 +29,7 @@
<div class="_formBlock" style="display: flex; gap: var(--margin); flex-wrap: wrap;">
<FormButton primary inline @click="save"><i class="fas fa-check"></i> {{ i18n.ts.save }}</FormButton>
<FormButton danger inline @click="del"><i class="fas fa-trash-alt"></i> {{ i18n.ts.delete }}</FormButton>
</div>
</div>
</template>
@ -79,6 +80,17 @@ async function save(): Promise<void> {
});
}
async function del(): Promise<void> {
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',