侧边栏添加图标样式

This commit is contained in:
wmp
2025-10-21 11:21:15 +08:00
parent 9fff300a22
commit 15d5dc93c0
2 changed files with 17 additions and 15 deletions

View File

@@ -218,7 +218,6 @@ function GatewayConfigContent() {
setGatewayPairs(gatewayPairsList)
setCurrentTotal(matrix.length)
setTotalCount(Object.values(macConfigMap).reduce((sum, configs) => sum + configs.length, 0))
console.log('矩阵构建完成:', { 表头列数: gatewayPairsList.length, 矩阵行数: matrix.length })
}
catch (error) {
toast.error('构建矩阵数据失败')
@@ -383,12 +382,8 @@ function GatewayConfigContent() {
</FormItem>
)}
/>
<Button type="submit" className="ml-2 mt-6 px-4 py-2 bg-blue-600 hover:bg-blue-700">
</Button>
<Button type="button" variant="outline" className="ml-2 mt-6 px-4 py-2" onClick={() => form.reset()}>
</Button>
<Button type="submit" className="ml-2 mt-6 px-4 py-2 bg-blue-600 hover:bg-blue-700"></Button>
<Button type="button" variant="outline" className="ml-2 mt-6 px-4 py-2" onClick={() => form.reset()}></Button>
</form>
</Form>

View File

@@ -6,6 +6,13 @@ import { logout } from '@/actions/auth'
import { LogOutIcon } from 'lucide-react'
import Link from 'next/link'
import { cn } from '@/lib/utils'
import { DoorClosedIcon } from 'lucide-react'
import { DoorClosedLockedIcon } from 'lucide-react'
import { DoorOpenIcon } from 'lucide-react'
import { MapPinnedIcon } from 'lucide-react'
import { ContainerIcon } from 'lucide-react'
import { GitForkIcon } from 'lucide-react'
import { SettingsIcon } from 'lucide-react'
export default function DashboardLayout({
children,
@@ -64,13 +71,13 @@ export default function DashboardLayout({
<div className="flex-auto overflow-hidden flex">
{/* 侧边栏 */}
<nav className="flex-none basis-64 p-3 space-y-2 border-r flex flex-col">
<NavbarItem href="/gatewayinfo" active={isActive('/gatewayinfo')}></NavbarItem>
<NavbarItem href="/gatewayConfig" active={isActive('/gatewayConfig')}></NavbarItem>
<NavbarItem href="/gatewayMonitor" active={isActive('/gatewayMonitor')}></NavbarItem>
<NavbarItem href="/cityNodeStats" active={isActive('/cityNodeStats')}></NavbarItem>
<NavbarItem href="/allocationStatus" active={isActive('/allocationStatus')}></NavbarItem>
<NavbarItem href="/edge" active={isActive('/edge')}></NavbarItem>
<NavbarItem href="/settings" active={isActive('/settings')}></NavbarItem>
<NavbarItem href="/gatewayinfo" active={isActive('/gatewayinfo')}><DoorClosedIcon size={20} /></NavbarItem>
<NavbarItem href="/gatewayConfig" active={isActive('/gatewayConfig')}><DoorClosedLockedIcon size={20} /></NavbarItem>
<NavbarItem href="/gatewayMonitor" active={isActive('/gatewayMonitor')}><DoorOpenIcon size={20} /></NavbarItem>
<NavbarItem href="/cityNodeStats" active={isActive('/cityNodeStats')}><MapPinnedIcon size={20} /></NavbarItem>
<NavbarItem href="/allocationStatus" active={isActive('/allocationStatus')}><ContainerIcon size={20} /></NavbarItem>
<NavbarItem href="/edge" active={isActive('/edge')}><GitForkIcon size={20} /></NavbarItem>
<NavbarItem href="/settings" active={isActive('/settings')}><SettingsIcon size={20} /></NavbarItem>
</nav>
{/* 内容区域 */}
@@ -92,7 +99,7 @@ function NavbarItem(props: {
href={props.href}
className={cn(
'transition-colors duration-150 ease-in-out',
'p-2 rounded-md text-sm flex items-center',
'p-2 gap-2 rounded-md text-sm flex items-center',
props.active
? 'text-primary bg-primary/10'
: 'hover:bg-muted',