feat(ui): refine account pages
This commit is contained in:
@@ -17,21 +17,28 @@ export function AccountSidebar() {
|
||||
const pathname = usePathname()
|
||||
|
||||
return (
|
||||
<aside className="w-56 shrink-0 border-r bg-muted/30">
|
||||
<div className="flex h-14 items-center border-b px-4 font-semibold">账号设置</div>
|
||||
<nav className="p-2 space-y-1">
|
||||
<aside className="w-56 shrink-0 border-r border-border/60">
|
||||
<div className="flex h-14 items-center border-b border-border/60 px-6 font-semibold">
|
||||
账号设置
|
||||
</div>
|
||||
<nav className="p-3 space-y-1">
|
||||
{links.map((link) => {
|
||||
const Icon = link.icon
|
||||
const isActive = pathname === link.href
|
||||
return (
|
||||
<Button
|
||||
key={link.href}
|
||||
variant={isActive ? "secondary" : "ghost"}
|
||||
className={cn("w-full justify-start", !isActive && "text-muted-foreground")}
|
||||
variant="ghost"
|
||||
className={cn(
|
||||
"w-full justify-start rounded-md border-l-2 transition-colors h-10",
|
||||
isActive
|
||||
? "border-primary bg-primary/5 text-foreground font-medium"
|
||||
: "border-transparent text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
||||
)}
|
||||
asChild
|
||||
>
|
||||
<Link href={link.href}>
|
||||
<Icon className="h-4 w-4" />
|
||||
<Icon className="mr-2 h-4 w-4" />
|
||||
{link.label}
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user