refactor: move Export Private Key into overflow menu

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.
This commit is contained in:
user
2026-02-28 04:27:56 -08:00
parent 7a6bf3af9a
commit a095c2b74f
2 changed files with 35 additions and 7 deletions

View File

@@ -268,7 +268,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);