From db1b5c1c69623aa3d08334eb59212aa04f5d66b1 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 13:41:33 -0800 Subject: [PATCH] fix: standardize error display to use showError/hideError helpers Replace inconsistent error display patterns across views: - addWallet.js: replace showFlash() with showError('add-wallet-error', ...) - importKey.js: replace showFlash() with showError('import-key-error', ...) - addressDetail.js: replace direct DOM manipulation of export-privkey-flash with showError/hideError('export-privkey-error', ...) - deleteWallet.js: replace direct DOM manipulation of delete-wallet-flash with showError/hideError('delete-wallet-error', ...) - index.html: add dedicated error divs with min-h-[1.25rem] for add-wallet, import-key views; rename flash divs to error divs for export-privkey and delete-wallet views with consistent styling All password/validation errors now use the showError()/hideError() helper pattern with min-h-[1.25rem] error divs to prevent layout shift. Status/success messages (scanning, wallet deleted) remain as showFlash(). Closes #87 --- src/popup/index.html | 16 ++++++++++++---- src/popup/views/addWallet.js | 27 +++++++++++++++++++-------- src/popup/views/addressDetail.js | 13 ++++++------- src/popup/views/deleteWallet.js | 19 ++++++++----------- src/popup/views/importKey.js | 17 +++++++++++------ 5 files changed, 56 insertions(+), 36 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index 5c9d444..eb06cc6 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -104,6 +104,10 @@ class="border border-border p-1 w-full font-mono text-sm bg-bg text-fg" /> +