web-ui: star button in the sidebar makes a wallet the default (moves it to the top of the order)
This commit is contained in:
parent
690959a983
commit
b46e202a17
2 changed files with 19 additions and 3 deletions
|
|
@ -112,8 +112,23 @@ export function WalletSidebar({
|
|||
<span className="side-wallet-dot" aria-hidden="true" />
|
||||
<span className="side-wallet-label">{w.label}</span>
|
||||
{isActive && <span className="side-wallet-tag">active</span>}
|
||||
{!isActive && i === 0 && <span className="side-wallet-tag muted">default</span>}
|
||||
{i === 0 && <span className="side-wallet-tag muted">default</span>}
|
||||
</button>
|
||||
{/* Make default — moves the wallet to the top of the
|
||||
order, which is the one auto-opened after unlock
|
||||
(same thing dragging it to the top does). */}
|
||||
{i > 0 && (
|
||||
<button
|
||||
className="side-wallet-default"
|
||||
onClick={() => move(i, 0)}
|
||||
aria-label={`Make ${w.label} the default wallet`}
|
||||
title="Make default (opens first after unlock)"
|
||||
>
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
||||
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" />
|
||||
</svg>
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
className="side-wallet-rename"
|
||||
onClick={() => startRename(w.label)}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ body:has(.shell-dashboard) {
|
|||
confirm and then deletes the encrypted seed. Same base sizing +
|
||||
fade-in behavior; the forget button hovers to the danger color and
|
||||
fades away entirely when it's disabled (the active-wallet row). */
|
||||
.side-wallet-rename, .side-wallet-forget {
|
||||
.side-wallet-rename, .side-wallet-forget, .side-wallet-default {
|
||||
width: 24px; height: 24px; flex-shrink: 0;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
border: 0; border-radius: 6px; background: transparent;
|
||||
|
|
@ -191,8 +191,9 @@ body:has(.shell-dashboard) {
|
|||
transition: opacity 0.12s, color 0.12s;
|
||||
}
|
||||
.side-wallet-row:hover .side-wallet-rename,
|
||||
.side-wallet-row:hover .side-wallet-default,
|
||||
.side-wallet-row:hover .side-wallet-forget:not(:disabled) { opacity: 0.8; }
|
||||
.side-wallet-rename:hover { color: var(--accent); opacity: 1; }
|
||||
.side-wallet-rename:hover, .side-wallet-default:hover { color: var(--accent); opacity: 1; }
|
||||
.side-wallet-forget:hover { color: var(--danger, #e05252); opacity: 1; }
|
||||
.side-wallet-forget:disabled { opacity: 0; cursor: default; pointer-events: none; }
|
||||
.side-wallet-edit { cursor: default; flex-wrap: wrap; }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue