fix(ui): let ConfirmButton's dialog wear the destructive style

ConfirmButton took a `destructive` prop and dropped it on the way to its
dialog, so every delete, revoke and remove built on it confirmed with a
neutral primary button while ConfirmDialog confirmed the same kind of act
in red. The prop is forwarded now, and the call sites whose act takes
something away pass it. A guard holds every confirmation whose slot names
a destroying act to the destructive style; resets stay neutral.
This commit is contained in:
Marc-André Bombeck committed 2026-10-21 12:02:13 +02:00
1 parent dc704b5e63
commit 9a8b95cfd0
21 files changed
+181

No files matched your search

@@ -194,6 +194,7 @@ export function AboutMeNoteManager() {
{hasNote && (
<ConfirmButton
slot="settings-about-me-clear"
destructive
label={t("settings.ai.aboutMe.clear")}
icon={<Trash2 className="size-4" aria-hidden />}
variant="outline"
+2
View File
@@ -176,6 +176,7 @@ export function AuditCPanel({
className="text-destructive size-11 shrink-0 sm:size-9"
icon={<Trash2 className="size-4" aria-hidden />}
slot={`audit-c-remove-${entry.id}`}
destructive
/>
</li>
))}
@@ -214,6 +215,7 @@ export function AuditCPanel({
className="text-destructive size-11 shrink-0 sm:size-9"
icon={<Trash2 className="size-4" aria-hidden />}
slot="audit-c-legacy-remove"
destructive
/>
</div>
) : null}