forked from FoundKeyGang/FoundKey
client: delete webhooks
Changelog: Added
This commit is contained in:
parent
0e0411f9e0
commit
e59706e36f
1 changed files with 12 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
<div class="_formBlock" style="display: flex; gap: var(--margin); flex-wrap: wrap;">
|
<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 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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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({
|
definePageMetadata({
|
||||||
title: 'Edit webhook',
|
title: 'Edit webhook',
|
||||||
icon: 'fas fa-bolt',
|
icon: 'fas fa-bolt',
|
||||||
|
|
Loading…
Reference in a new issue