fix: tab labels add (xprv) suffix, restyle tabs as underline view switcher
All checks were successful
check / check (push) Successful in 10s

- Rename 'From Extended Key' to 'From Extended Key (xprv)'
- Replace box-border tab style with underline indicator pattern
- Active tab: bold text + solid bottom border
- Inactive tabs: muted text + transparent bottom border with hover state
- Tabs now clearly read as mutually-exclusive view switchers, not buttons
This commit is contained in:
user
2026-02-28 13:00:09 -08:00
parent a10f1e3024
commit 395d5bff9a
2 changed files with 11 additions and 14 deletions

View File

@@ -58,27 +58,27 @@
<h2 class="font-bold mb-2">Add Wallet</h2>
<!-- Mode selector tabs -->
<div class="flex relative mb-3" id="add-wallet-tabs">
<div
class="absolute bottom-0 left-0 right-0 border-b border-border"
></div>
class="flex border-b border-border mb-3"
id="add-wallet-tabs"
>
<button
id="tab-mnemonic"
class="tab-active relative z-10 px-3 py-1.5 cursor-pointer text-xs font-bold border border-border border-b-bg bg-bg -mb-px"
class="tab-btn tab-active px-3 py-1.5 cursor-pointer text-xs font-bold border-b-2 border-b-fg -mb-px"
>
From Recovery Phrase
</button>
<button
id="tab-privkey"
class="tab-inactive relative z-10 px-3 py-1.5 cursor-pointer text-xs text-muted border border-transparent -mb-px hover:text-fg"
class="tab-btn tab-inactive px-3 py-1.5 cursor-pointer text-xs text-muted border-b-2 border-b-transparent -mb-px hover:text-fg hover:border-b-muted"
>
From Private Key
</button>
<button
id="tab-xprv"
class="tab-inactive relative z-10 px-3 py-1.5 cursor-pointer text-xs text-muted border border-transparent -mb-px hover:text-fg"
class="tab-btn tab-inactive px-3 py-1.5 cursor-pointer text-xs text-muted border-b-2 border-b-transparent -mb-px hover:text-fg hover:border-b-muted"
>
From Extended Key
From Extended Key (xprv)
</button>
</div>

View File

@@ -29,14 +29,11 @@ function switchMode(mode) {
$("add-wallet-section-" + m).classList.toggle("hidden", m !== mode);
const tab = $("tab-" + m);
const isActive = m === mode;
// Active tab: visible borders on top/left/right, bottom border matches bg to "connect" with content
tab.classList.toggle("border-border", isActive);
tab.classList.toggle("border-b-bg", isActive);
tab.classList.toggle("bg-bg", isActive);
// Active tab: bold text + solid bottom border indicator
tab.classList.toggle("font-bold", isActive);
tab.classList.toggle("border-b-fg", isActive);
tab.classList.toggle("text-muted", !isActive);
// Inactive tab: transparent borders
tab.classList.toggle("border-transparent", !isActive);
tab.classList.toggle("border-b-transparent", !isActive);
}
$("add-wallet-password-hint").textContent = PASSWORD_HINTS[mode];
}