From 91c3b4e394f9da50b0b375c5ffb83340cd4fec8f Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 04:27:56 -0800 Subject: [PATCH] refactor: move Export Private Key into overflow menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the muted text link at the bottom of AddressDetail with a 'ยทยทยท' overflow/more button in the action button row. Clicking it opens a dropdown with 'Export Private Key' as an option. Clicking outside closes the dropdown. The pattern is reusable for future secondary actions. --- src/popup/index.html | 27 ++++++++++++++++++++------- src/popup/views/addressDetail.js | 15 +++++++++++++++ 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index 2f4861f..c88a963 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -305,6 +305,26 @@ > + Token +
+ + +
@@ -316,13 +336,6 @@
Loading...
-
- Export private key -
diff --git a/src/popup/views/addressDetail.js b/src/popup/views/addressDetail.js index e2d1d18..71eb3d2 100644 --- a/src/popup/views/addressDetail.js +++ b/src/popup/views/addressDetail.js @@ -264,7 +264,22 @@ function init(_ctx) { $("btn-add-token").addEventListener("click", ctx.showAddTokenView); + // More menu dropdown + const moreBtn = $("btn-more-menu"); + const moreDropdown = $("more-menu-dropdown"); + moreBtn.addEventListener("click", (e) => { + e.stopPropagation(); + moreDropdown.classList.toggle("hidden"); + }); + document.addEventListener("click", () => { + moreDropdown.classList.add("hidden"); + }); + moreDropdown.addEventListener("click", (e) => { + e.stopPropagation(); + }); + $("btn-export-privkey").addEventListener("click", () => { + moreDropdown.classList.add("hidden"); const wallet = state.wallets[state.selectedWallet]; const addr = wallet.addresses[state.selectedAddress]; const title = addressTitle(addr.address, state.wallets);