feat(console): confirm member and webhook removal

Removing a member, revoking an invite link and disabling a group's
webhook endpoint took effect on the first click. They now ask first;
disabling the webhook explains that senders still using the secret will
be rejected, and its button is styled as destructive.
This commit is contained in:
翅膀 committed 2026-10-17 00:29:51 +08:00
1 parent 24f5d0477c
commit 85f8cb74bc
5 files changed
+31 -3

No files matched your search

+8
View File
@@ -41,6 +41,7 @@
v-if="info.hasSecret"
type="button"
variant="ghost"
color="error"
size="sm"
:disabled="busy"
@click="onDisable"
@@ -67,6 +68,7 @@ import { ref, watch } from "vue";
import { useWebhookApi, type GroupWebhookInfo } from "~/composables/useWebhook";
const { t } = useI18n();
const { confirm } = useConfirm();
const props = defineProps<{ groupId: string; canEdit: boolean }>();
@@ -123,6 +125,12 @@ async function onRegenerate(): Promise<void> {
}
async function onDisable(): Promise<void> {
const confirmed = await confirm({
title: t("confirm.disableWebhook"),
description: t("confirm.disableWebhookDetail"),
confirmText: t("webhook.disable"),
});
if (!confirmed) return;
busy.value = true;
error.value = "";
try {