mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
fix(settings): one save model and one confirm per card
The Telegram, ntfy, webhook and email cards saved their enable switch on tap and the rest of the form on Save; the switch is now part of the form and the one Save sends it. The display selects confirm a change with a toast. Destructive confirmations in Settings go through ConfirmButton or ConfirmDialog with the destructive style. Two structural guards hold both rules: a card may not mix instant and explicit saves, and no settings file reaches for a raw AlertDialog without a written reason.
This commit is contained in:
1 parent
93198017d6
commit
3ebef19ac3
32 files changed
+830
-1135
No files matched your search
@@ -110,7 +110,7 @@ const REGISTRY: DestructiveEntry[] = [
|
||||
destroys:
|
||||
"every health record on the account, or the whole account including passkeys and audit history",
|
||||
recovery: "permanent",
|
||||
confirm: ["AlertDialog"],
|
||||
confirm: ["ConfirmDialog"],
|
||||
},
|
||||
{
|
||||
file: "components/settings/security-sessions-card.tsx",
|
||||
@@ -129,13 +129,13 @@ const REGISTRY: DestructiveEntry[] = [
|
||||
file: "components/settings/security-section/passkey-list-section.tsx",
|
||||
destroys: "a passkey — hard-deleted, the credential cannot be re-derived",
|
||||
recovery: "permanent",
|
||||
confirm: ["AlertDialog"],
|
||||
confirm: ["ConfirmButton"],
|
||||
},
|
||||
{
|
||||
file: "components/settings/security-section/security-keys-card.tsx",
|
||||
destroys: "a WebAuthn second factor",
|
||||
recovery: "permanent",
|
||||
confirm: ["AlertDialog"],
|
||||
confirm: ["ConfirmButton"],
|
||||
},
|
||||
{
|
||||
file: "components/settings/ai/remove-saved-key-button.tsx",
|
||||
@@ -156,7 +156,7 @@ const REGISTRY: DestructiveEntry[] = [
|
||||
file: "components/settings/api-section.tsx",
|
||||
destroys: "an API token — revoked, and the secret is never shown again",
|
||||
recovery: "permanent",
|
||||
confirm: ["AlertDialog"],
|
||||
confirm: ["ConfirmButton"],
|
||||
},
|
||||
{
|
||||
file: "components/settings/mcp-section.tsx",
|
||||
@@ -168,7 +168,7 @@ const REGISTRY: DestructiveEntry[] = [
|
||||
file: "components/settings/sharing-section.tsx",
|
||||
destroys: "a clinician share link — the URL stays dead once revoked",
|
||||
recovery: "permanent",
|
||||
confirm: ["AlertDialog"],
|
||||
confirm: ["ConfirmButton"],
|
||||
},
|
||||
{
|
||||
file: "components/settings/account-section/avatar-section.tsx",
|
||||
@@ -214,7 +214,7 @@ const REGISTRY: DestructiveEntry[] = [
|
||||
file: "components/settings/coach-memory-section.tsx",
|
||||
destroys: "every remembered Coach fact at once",
|
||||
recovery: "tombstoned-no-restore",
|
||||
confirm: ["AlertDialog"],
|
||||
confirm: ["ConfirmButton"],
|
||||
},
|
||||
{
|
||||
file: "components/insights/coach-panel/use-coach-facts.ts",
|
||||
|
||||
@@ -348,7 +348,6 @@ const PINNED_AFFORDANCES: Record<
|
||||
"src/components/settings/dashboard-layout-section.tsx": {
|
||||
"toast.success": 2,
|
||||
},
|
||||
"src/components/settings/email-card.tsx": { "text-success": 1 },
|
||||
"src/components/settings/environment-section.tsx": { "toast.success": 4 },
|
||||
"src/components/settings/insights-pill-order-section.tsx": {
|
||||
"toast.success": 1,
|
||||
@@ -389,7 +388,6 @@ const PINNED_AFFORDANCES: Record<
|
||||
CheckCircle2: 2,
|
||||
"text-success": 1,
|
||||
},
|
||||
"src/components/settings/ntfy-card.tsx": { "text-success": 1 },
|
||||
// The one that used to sit inside `account-section/index.tsx` — the card
|
||||
// moved to Settings → Security, the line moved with it.
|
||||
"src/components/settings/password-card.tsx": { "text-success": 1 },
|
||||
@@ -397,7 +395,6 @@ const PINNED_AFFORDANCES: Record<
|
||||
"src/components/settings/share-link-create-form.tsx": { "text-success": 3 },
|
||||
"src/components/settings/sharing-section.tsx": { "text-success": 1 },
|
||||
"src/components/settings/sources-section.tsx": { "toast.success": 2 },
|
||||
"src/components/settings/telegram-card.tsx": { "text-success": 1 },
|
||||
"src/components/settings/test-connection-button.tsx": {
|
||||
CheckCircle2: 2,
|
||||
"text-success": 1,
|
||||
@@ -407,7 +404,6 @@ const PINNED_AFFORDANCES: Record<
|
||||
},
|
||||
"src/components/settings/trusted-devices-card.tsx": { "text-success": 1 },
|
||||
"src/components/settings/web-push-card.tsx": { "text-success": 1 },
|
||||
"src/components/settings/webhook-card.tsx": { "text-success": 1 },
|
||||
"src/components/targets/target-edit-sheet.tsx": { "toast.success": 2 },
|
||||
"src/components/ui/password-strength.tsx": { "text-success": 2 },
|
||||
// The success tone of the grade chip (a high confidence, a score that went
|
||||
|
||||
Reference in new issue
Block a user