侧边栏添加图标样式
This commit is contained in:
@@ -218,7 +218,6 @@ function GatewayConfigContent() {
|
|||||||
setGatewayPairs(gatewayPairsList)
|
setGatewayPairs(gatewayPairsList)
|
||||||
setCurrentTotal(matrix.length)
|
setCurrentTotal(matrix.length)
|
||||||
setTotalCount(Object.values(macConfigMap).reduce((sum, configs) => sum + configs.length, 0))
|
setTotalCount(Object.values(macConfigMap).reduce((sum, configs) => sum + configs.length, 0))
|
||||||
console.log('矩阵构建完成:', { 表头列数: gatewayPairsList.length, 矩阵行数: matrix.length })
|
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
toast.error('构建矩阵数据失败')
|
toast.error('构建矩阵数据失败')
|
||||||
@@ -383,12 +382,8 @@ function GatewayConfigContent() {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Button type="submit" className="ml-2 mt-6 px-4 py-2 bg-blue-600 hover:bg-blue-700">
|
<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>
|
|
||||||
<Button type="button" variant="outline" className="ml-2 mt-6 px-4 py-2" onClick={() => form.reset()}>
|
|
||||||
重置
|
|
||||||
</Button>
|
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ import { logout } from '@/actions/auth'
|
|||||||
import { LogOutIcon } from 'lucide-react'
|
import { LogOutIcon } from 'lucide-react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { cn } from '@/lib/utils'
|
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({
|
export default function DashboardLayout({
|
||||||
children,
|
children,
|
||||||
@@ -64,13 +71,13 @@ export default function DashboardLayout({
|
|||||||
<div className="flex-auto overflow-hidden flex">
|
<div className="flex-auto overflow-hidden flex">
|
||||||
{/* 侧边栏 */}
|
{/* 侧边栏 */}
|
||||||
<nav className="flex-none basis-64 p-3 space-y-2 border-r flex flex-col">
|
<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="/gatewayinfo" active={isActive('/gatewayinfo')}><DoorClosedIcon size={20} />网关信息</NavbarItem>
|
||||||
<NavbarItem href="/gatewayConfig" active={isActive('/gatewayConfig')}>网关配置</NavbarItem>
|
<NavbarItem href="/gatewayConfig" active={isActive('/gatewayConfig')}><DoorClosedLockedIcon size={20} />网关配置</NavbarItem>
|
||||||
<NavbarItem href="/gatewayMonitor" active={isActive('/gatewayMonitor')}>网关查询</NavbarItem>
|
<NavbarItem href="/gatewayMonitor" active={isActive('/gatewayMonitor')}><DoorOpenIcon size={20} />配置总览</NavbarItem>
|
||||||
<NavbarItem href="/cityNodeStats" active={isActive('/cityNodeStats')}>城市信息</NavbarItem>
|
<NavbarItem href="/cityNodeStats" active={isActive('/cityNodeStats')}><MapPinnedIcon size={20} />城市信息</NavbarItem>
|
||||||
<NavbarItem href="/allocationStatus" active={isActive('/allocationStatus')}>分配状态</NavbarItem>
|
<NavbarItem href="/allocationStatus" active={isActive('/allocationStatus')}><ContainerIcon size={20} />分配状态</NavbarItem>
|
||||||
<NavbarItem href="/edge" active={isActive('/edge')}>节点信息</NavbarItem>
|
<NavbarItem href="/edge" active={isActive('/edge')}><GitForkIcon size={20} />节点信息</NavbarItem>
|
||||||
<NavbarItem href="/settings" active={isActive('/settings')}>设置</NavbarItem>
|
<NavbarItem href="/settings" active={isActive('/settings')}><SettingsIcon size={20} />设置</NavbarItem>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{/* 内容区域 */}
|
{/* 内容区域 */}
|
||||||
@@ -92,7 +99,7 @@ function NavbarItem(props: {
|
|||||||
href={props.href}
|
href={props.href}
|
||||||
className={cn(
|
className={cn(
|
||||||
'transition-colors duration-150 ease-in-out',
|
'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
|
props.active
|
||||||
? 'text-primary bg-primary/10'
|
? 'text-primary bg-primary/10'
|
||||||
: 'hover:bg-muted',
|
: 'hover:bg-muted',
|
||||||
|
|||||||
Reference in New Issue
Block a user