fix(data-wipe): say what undoing a wipe does not bring back

A restore of the copy a data wipe took replaces the record with that copy,
so anything added after the wipe is gone, and the wipe ended integration
connections, sharing in both directions, Guardian roles and share links,
none of which are in a copy. Neither the person's confirmation nor the
admin's restore dialog said so. Both do now, in every locale.
This commit is contained in:
Marc-André Bombeck committed 2026-10-25 17:32:33 +01:00
1 parent 2b79c01952
commit 69c5c65376
12 files changed
+107 -29

No files matched your search

+16 -7
View File
@@ -38,6 +38,21 @@ import { formatDate } from "@/lib/format";
* acknowledgment dialog, the endpoint behind it and the three user columns
* it stamped are gone. This page is the destructive controls.
*/
/**
* What deleting all data does. With a grace window it also says what a
* restore of the copy does not bring back: what arrives after the wipe is
* replaced, and connections, sharing, Guardian roles and share links are
* gone for good.
*/
export function wipeConfirmBody(
graceDays: number,
t: ReturnType<typeof useTranslations>["t"],
): string {
return graceDays > 0
? `${t("settings.dangerZoneConfirmDescriptionGrace", { days: graceDays })} ${t("settings.dangerZoneRestoreLimits")}`
: t("settings.dangerZoneConfirmDescription");
}
export function AdvancedSection() {
// v1.18.6 — the visible heading + subtitle now come from the shared
// `<SettingsSectionFrame>` in the route; this body is the advanced cards.
@@ -165,13 +180,7 @@ function DataResetCard() {
setConfirmOpen(open);
}}
title={t("settings.dangerZoneConfirm")}
body={
graceDays > 0
? t("settings.dangerZoneConfirmDescriptionGrace", {
days: graceDays,
})
: t("settings.dangerZoneConfirmDescription")
}
body={wipeConfirmBody(graceDays, t)}
confirmLabel={t("settings.finalDelete")}
onConfirm={() => void handleDeleteAllData()}
pending={deleting}