mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-12 18:46:40 +07:00
fix: collapsed-sidebar logo expands the menu; crypto nav icon matches the rest
Collapsed sidebar had no way to expand except the button at the bottom — the logo at the top was purely decorative. It's now a real button in that state (expanded state unchanged, still non-interactive there). Swapped the Crypto nav icon from Bitcoin (a filled coin-badge glyph) to Coins — same thin line-icon style as the rest of the sidebar (Layers, Target, Flag, ...), where Bitcoin's brand-logo shape stood out. Bitcoin stays as-is elsewhere (holdings table row fallback, Net Worth breakdown) — appropriate there as a specific-asset placeholder, this was only about the nav item. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01855PiW5Wd8n4aRW4n9kByY
This commit is contained in:
@@ -94,10 +94,24 @@ export function Sidebar({ collapsed, onToggleCollapsed, mobileOpen, onCloseMobil
|
||||
collapsed ? "w-[72px]" : "w-56"
|
||||
)}
|
||||
>
|
||||
<div className={cn("flex items-center gap-2 px-4 py-4", collapsed && "justify-center px-0")}>
|
||||
<Logo size={24} />
|
||||
{!collapsed && <span className="text-lg font-semibold tracking-tight text-text-primary">Aurum</span>}
|
||||
</div>
|
||||
{collapsed ? (
|
||||
// Collapsed: the logo doubles as an "expand" button — the sidebar
|
||||
// has no visible label to click in this state, so the icon itself
|
||||
// needs to be the way back to the full menu.
|
||||
<button
|
||||
type="button"
|
||||
onClick={onToggleCollapsed}
|
||||
title={t("sidebar.expandMenu")}
|
||||
className="flex items-center justify-center gap-2 px-0 py-4 hover:opacity-80"
|
||||
>
|
||||
<Logo size={24} />
|
||||
</button>
|
||||
) : (
|
||||
<div className="flex items-center gap-2 px-4 py-4">
|
||||
<Logo size={24} />
|
||||
<span className="text-lg font-semibold tracking-tight text-text-primary">Aurum</span>
|
||||
</div>
|
||||
)}
|
||||
<NavList collapsed={collapsed} />
|
||||
<div className="border-t border-border p-2.5">
|
||||
<button
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
Activity,
|
||||
ArrowLeftRight,
|
||||
Bitcoin,
|
||||
Calculator,
|
||||
Coins,
|
||||
Flag,
|
||||
Layers,
|
||||
Lightbulb,
|
||||
@@ -28,7 +28,7 @@ export interface NavItem {
|
||||
export const NAV_ITEMS: NavItem[] = [
|
||||
{ labelKey: "nav.dashboard", to: "/", icon: LayoutDashboard },
|
||||
{ labelKey: "nav.netWorth", to: "/net-worth", icon: TrendingUp },
|
||||
{ labelKey: "nav.crypto", to: "/crypto", icon: Bitcoin },
|
||||
{ labelKey: "nav.crypto", to: "/crypto", icon: Coins },
|
||||
{ labelKey: "nav.roi", to: "/roi", icon: Calculator },
|
||||
{ labelKey: "nav.transactions", to: "/transactions", icon: ArrowLeftRight },
|
||||
{ labelKey: "nav.accounts", to: "/accounts", icon: Layers },
|
||||
|
||||
Reference in New Issue
Block a user