* fix(settings): say on the Danger zone rows that a typed confirmation follows (#2214) A Discord user reported that the Danger zone button looked like it could be triggered by a stray swipe on a phone, and did not dare press it. Every action there already opens a dialog that requires the company name (or the account e-mail) typed in before anything happens, but nothing on the row said so, and the only way to learn it was to press the link. Both company rows (Starta om migrering, Radera företag) and the account deletion row now carry one line under the note: "Inget händer direkt: du bekräftar i nästa steg genom att skriva företagets namn" (e-mail for the account). Keys added to sv and en. Closes #2214 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VnConrmMCxJRQ5kfiPPWyy * chore: carry the DECISIONS.md line for this PR in #2247 instead (append-only log conflicts on every merge) --------- Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
Jakob Wennberg
parent
e66195e5bb
commit
0c82db88da
@@ -181,7 +181,12 @@ export function AccountDangerZone() {
|
||||
// lives behind the "?": the visible row stays one quiet line.
|
||||
help={<RetentionNotice variant="account" className="border-0 bg-transparent p-0" />}
|
||||
>
|
||||
<SettingsRowNote>{tRetention('account_title')}</SettingsRowNote>
|
||||
<div className="flex min-w-0 flex-col gap-0.5">
|
||||
<SettingsRowNote>{tRetention('account_title')}</SettingsRowNote>
|
||||
{/* Says up front that a typed confirmation follows (issue #2214,
|
||||
same as CompanyDangerZone). */}
|
||||
<SettingsRowNote>{t('confirm_hint')}</SettingsRowNote>
|
||||
</div>
|
||||
{/* Live region always mounted so the failure is announced when it
|
||||
appears, not merely inserted. */}
|
||||
<div id={errorId} role="status" aria-live="polite" className="min-w-0">
|
||||
|
||||
@@ -96,7 +96,14 @@ export function CompanyDangerZone() {
|
||||
|
||||
<SettingsDangerZone label={t('danger_heading')}>
|
||||
<SettingsRow label={t('reset_row_label')}>
|
||||
<SettingsRowNote>{t('reset_row_note')}</SettingsRowNote>
|
||||
{/* Both destructive rows say up front that a typed confirmation
|
||||
follows. A reader who does not dare press the link cannot find
|
||||
that out any other way, and on a phone the link sits where a
|
||||
stray tap while scrolling lands (issue #2214). */}
|
||||
<div className="flex min-w-0 flex-col gap-0.5">
|
||||
<SettingsRowNote>{t('reset_row_note')}</SettingsRowNote>
|
||||
<SettingsRowNote>{t('danger_confirm_hint')}</SettingsRowNote>
|
||||
</div>
|
||||
<SettingsRowEnd>
|
||||
<button
|
||||
type="button"
|
||||
@@ -114,7 +121,10 @@ export function CompanyDangerZone() {
|
||||
// the "?": the visible row stays one quiet line.
|
||||
help={<RetentionNotice variant="company" className="border-0 bg-transparent p-0" />}
|
||||
>
|
||||
<SettingsRowNote>{tRetention('company_title')}</SettingsRowNote>
|
||||
<div className="flex min-w-0 flex-col gap-0.5">
|
||||
<SettingsRowNote>{tRetention('company_title')}</SettingsRowNote>
|
||||
<SettingsRowNote>{t('danger_confirm_hint')}</SettingsRowNote>
|
||||
</div>
|
||||
<SettingsRowEnd>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -1756,6 +1756,7 @@
|
||||
"reset_archive_too_large_with_size": "The retained archive is about {size} MB. Turn off documents for a structured-data ZIP, then contact support for the complete document package.",
|
||||
"reset_archive_too_large": "Turn off documents for a structured-data ZIP, then contact support for the complete document package.",
|
||||
"danger_button": "Delete company",
|
||||
"danger_confirm_hint": "Nothing happens right away: you confirm in the next step by typing the company name.",
|
||||
"danger_dialog_title": "Delete {companyName}",
|
||||
"danger_dialog_description": "The company is hidden from {appName}. The bookkeeping is retained securely for 7 years per BFL. Type the company name exactly to confirm.",
|
||||
"danger_confirm_label": "Type <strong>{companyName}</strong> to confirm",
|
||||
@@ -1967,6 +1968,7 @@
|
||||
"fab_load_retry": "Try again"
|
||||
},
|
||||
"settings_account_danger": {
|
||||
"confirm_hint": "Nothing happens right away: you confirm in the next step by typing your email address.",
|
||||
"heading": "Delete account",
|
||||
"blockers_title": "Companies you own",
|
||||
"blockers_description": "The account can only be deleted once you have deleted or handed over every company you own.",
|
||||
|
||||
@@ -1756,6 +1756,7 @@
|
||||
"reset_archive_too_large_with_size": "Det bevarade arkivet är cirka {size} MB. Stäng av dokument för en ZIP med strukturerade uppgifter och kontakta sedan support för hela dokumentpaketet.",
|
||||
"reset_archive_too_large": "Stäng av dokument för en ZIP med strukturerade uppgifter och kontakta sedan support för hela dokumentpaketet.",
|
||||
"danger_button": "Radera företag",
|
||||
"danger_confirm_hint": "Inget händer direkt: du bekräftar i nästa steg genom att skriva företagets namn.",
|
||||
"danger_dialog_title": "Radera {companyName}",
|
||||
"danger_dialog_description": "Företaget döljs från {appName}. Bokföringen behålls säkert i 7 år enligt BFL. Skriv företagets namn exakt för att bekräfta.",
|
||||
"danger_confirm_label": "Skriv <strong>{companyName}</strong> för att bekräfta",
|
||||
@@ -1967,6 +1968,7 @@
|
||||
"fab_load_retry": "Försök igen"
|
||||
},
|
||||
"settings_account_danger": {
|
||||
"confirm_hint": "Inget händer direkt: du bekräftar i nästa steg genom att skriva din e-postadress.",
|
||||
"heading": "Radera konto",
|
||||
"blockers_title": "Företag du äger",
|
||||
"blockers_description": "Kontot kan raderas först när du har raderat eller överlåtit alla företag du äger.",
|
||||
|
||||
Reference in New Issue
Block a user