Files
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00

64 lines
1.3 KiB
Vue

<template>
<Modal ref="modal">
<h2 class="box__title">
{{ $t('deleteWebhookModal.title', { webhookName: webhook.name }) }}
</h2>
<Error :error="error"></Error>
<div>
<p>
{{ $t('deleteWebhookModal.body') }}
</p>
<div class="actions">
<div class="align-right">
<Button
type="danger"
size="large"
:loading="loading"
:disabled="loading"
@click="deleteWebhook()"
>
{{ $t('deleteWebhookModal.deleteButton') }}
</Button>
</div>
</div>
</div>
</Modal>
</template>
<script>
import modal from '@baserow/modules/core/mixins/modal'
import error from '@baserow/modules/core/mixins/error'
import WebhookService from '@baserow/modules/database/services/webhook'
export default {
name: 'DeleteViewModal',
mixins: [modal, error],
props: {
webhook: {
type: Object,
required: true,
},
},
emits: ['deleted'],
data() {
return {
loading: false,
}
},
methods: {
async deleteWebhook() {
this.loading = true
try {
await WebhookService(this.$client).delete(this.webhook.id)
this.$emit('deleted', this.webhook)
} catch (error) {
this.handleError(error)
}
this.loading = false
},
},
}
</script>