From c6bd297e97ef628973b4ecece88433275d5a1a15 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Wed, 14 Oct 2026 13:26:35 +0000 Subject: [PATCH] BR-002: warn at each key card the setup page builds --- static/setup.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/static/setup.js b/static/setup.js index 6f407b4..342e412 100644 --- a/static/setup.js +++ b/static/setup.js @@ -14,6 +14,19 @@ const KEY_COUNT = 3; const MIN_KEY_COUNT = 2; const MAX_KEY_COUNT = 15; +// The reminder that belongs with every free-text field (sections 2 and 15). +const SECRET_WARNING = "Never paste a seed phrase or a private key here."; + +function secretWarning() { + // A short reminder that sits with a free-text field. The server refuses a value + // that looks like a wallet secret and stores nothing, so the field says so + // before the user types (sections 2 and 15). + const warning = document.createElement("span"); + warning.className = "field-help secret-warning"; + warning.textContent = SECRET_WARNING; + return warning; +} + function slot(number) { return { name: form.querySelector(`[name="key_${number}_name"]`), @@ -110,7 +123,7 @@ function buildFieldset(number) { pathInput.required = true; pathLabel.append(pathSpan, pathInput); - fieldset.append(grid, modelLabel, pathLabel); + fieldset.append(grid, modelLabel, pathLabel, secretWarning()); return fieldset; }