From 3dbf88595195780c31f75cb070a9fb8557507812 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 25 Feb 2026 15:25:20 +0700 Subject: [PATCH] Consolidate to single Add Wallet button everywhere Welcome and main views now show one button: "Add wallet". Private key import is accessible as a small link at the bottom of the Add Wallet view ("Have a private key instead?"). --- src/popup/index.html | 37 ++++++++++++++++--------------------- src/popup/index.js | 3 +-- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index 3d3ba73..ecd7184 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -42,20 +42,12 @@ Welcome to AutistMask

To get started, add a wallet.

-
- - -
+ @@ -131,6 +123,15 @@ id="add-wallet-error" class="mt-2 border border-border border-dashed p-1 hidden" > +
+ Have a private key instead? + +
@@ -217,19 +218,13 @@
-
+
-
diff --git a/src/popup/index.js b/src/popup/index.js index 5dc7ecf..6c1ee7e 100644 --- a/src/popup/index.js +++ b/src/popup/index.js @@ -276,7 +276,6 @@ function init() { // -- Welcome -- $("btn-welcome-add").addEventListener("click", showAddWalletView); - $("btn-welcome-key").addEventListener("click", showImportKeyView); // -- Add wallet (unified create/import) -- $("btn-generate-phrase").addEventListener("click", () => { @@ -324,6 +323,7 @@ function init() { }); $("btn-add-wallet-back").addEventListener("click", backFromWalletAdd); + $("btn-add-wallet-import-key").addEventListener("click", showImportKeyView); // -- Import private key -- $("btn-import-key-confirm").addEventListener("click", () => { @@ -366,7 +366,6 @@ function init() { }); $("btn-main-add-wallet").addEventListener("click", showAddWalletView); - $("btn-main-import-key").addEventListener("click", showImportKeyView); // -- Address detail -- $("address-full").addEventListener("click", () => {