Use compact [ ] select button and show active address above actions
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
Replace [select] with [ ] to avoid wrapping the full address line. ACTIVE label stays as-is for discoverability. Show the currently active address (full, untruncated, with color dot) above the Send and Receive buttons on the home screen.
This commit is contained in:
@@ -21,12 +21,24 @@ function renderTotalValue() {
|
||||
el.textContent = formatUsd(getTotalValueUsd(state.wallets));
|
||||
}
|
||||
|
||||
function renderActiveAddress() {
|
||||
const el = $("active-address-display");
|
||||
if (!el) return;
|
||||
if (state.activeAddress) {
|
||||
const dot = addressDotHtml(state.activeAddress);
|
||||
el.innerHTML = dot + state.activeAddress;
|
||||
} else {
|
||||
el.textContent = "";
|
||||
}
|
||||
}
|
||||
|
||||
function render(ctx) {
|
||||
const container = $("wallet-list");
|
||||
if (state.wallets.length === 0) {
|
||||
container.innerHTML =
|
||||
'<p class="text-muted py-2">No wallets yet. Add one to get started.</p>';
|
||||
renderTotalValue();
|
||||
renderActiveAddress();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +57,7 @@ function render(ctx) {
|
||||
const isActive = state.activeAddress === addr.address;
|
||||
const activeHtml = isActive
|
||||
? `<span class="font-bold text-xs">ACTIVE</span>`
|
||||
: `<span class="btn-select-active text-xs font-normal cursor-pointer" data-addr="${addr.address}">[<span class="underline decoration-dashed">select</span>]</span>`;
|
||||
: `<span class="btn-select-active text-xs cursor-pointer" data-addr="${addr.address}">[ ]</span>`;
|
||||
const dot = addressDotHtml(addr.address);
|
||||
html += `<div class="text-xs font-bold">Address ${wi + 1}.${ai + 1}</div>`;
|
||||
if (addr.ensName) {
|
||||
@@ -146,6 +158,7 @@ function render(ctx) {
|
||||
});
|
||||
|
||||
renderTotalValue();
|
||||
renderActiveAddress();
|
||||
}
|
||||
|
||||
function selectActiveAddress() {
|
||||
|
||||
Reference in New Issue
Block a user