feat: add export private key from address detail view #31

Merged
sneak merged 12 commits from feat/export-private-key into main 2026-02-28 21:10:17 +01:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 3daba279d2 - Show all commits

View File

@@ -319,7 +319,7 @@
>
<button
id="btn-export-privkey"
class="block w-full text-left px-4 py-1.5 text-sm hover:bg-hover cursor-pointer"
class="block w-full text-left px-4 py-1.5 text-xs font-light text-muted hover:bg-hover hover:text-fg cursor-pointer"
>
Export Private Key
</button>

View File

@@ -269,10 +269,13 @@ function init(_ctx) {
const moreDropdown = $("more-menu-dropdown");
moreBtn.addEventListener("click", (e) => {
e.stopPropagation();
moreDropdown.classList.toggle("hidden");
const isOpen = !moreDropdown.classList.toggle("hidden");
moreBtn.classList.toggle("bg-fg", isOpen);
moreBtn.classList.toggle("text-bg", isOpen);
});
document.addEventListener("click", () => {
moreDropdown.classList.add("hidden");
moreBtn.classList.remove("bg-fg", "text-bg");
});
moreDropdown.addEventListener("click", (e) => {
e.stopPropagation();
@@ -280,6 +283,7 @@ function init(_ctx) {
$("btn-export-privkey").addEventListener("click", () => {
moreDropdown.classList.add("hidden");
moreBtn.classList.remove("bg-fg", "text-bg");
const wallet = state.wallets[state.selectedWallet];
const addr = wallet.addresses[state.selectedAddress];
const title = addressTitle(addr.address, state.wallets);