feat(wavelet): 侧栏新增安全性折叠组收纳 WAF 与 IP 组

移除 WAF / IP 组页面右上角交叉导航,改由侧栏统一入口。
This commit is contained in:
ryan
2026-06-18 19:59:36 +08:00
parent b56b4c93b6
commit 391823a915
4 changed files with 16 additions and 19 deletions
@@ -8,7 +8,7 @@ import {
Route,
ScrollText,
Server,
Shield,
ShieldCheck,
} from 'lucide-react';
export interface OpenFlareNavItem {
@@ -35,6 +35,16 @@ export type OpenFlareSidebarNavEntry =
| ({kind: 'item'} & OpenFlareNavItem)
| ({kind: 'group'} & OpenFlareNavGroup);
/** 安全性折叠组 */
export const openflareSecurityNavGroup: OpenFlareNavGroup = {
title: '安全性',
icon: ShieldCheck,
items: [
{title: 'WAF', url: '/waf'},
{title: 'IP 组', url: '/waf/ip-groups'},
],
};
/** 网站管理折叠组 */
export const openflareWebsiteNavGroup: OpenFlareNavGroup = {
title: '网站管理',
@@ -55,8 +65,8 @@ export const openflareSidebarNav: OpenFlareSidebarNavEntry[] = [
{kind: 'item', title: '数据看板', url: '/', icon: LayoutDashboard},
{kind: 'item', title: '节点管理', url: '/nodes', icon: Server, childUrls: ['/nodes/detail']},
{kind: 'item', title: '规则管理', url: '/proxy-routes', icon: Route, childUrls: ['/proxy-routes/detail']},
{kind: 'item', title: 'WAF', url: '/waf', icon: Shield, childUrls: ['/waf/ip-groups']},
{kind: 'group', ...openflareWebsiteNavGroup},
{kind: 'group', ...openflareSecurityNavGroup},
{kind: 'item', title: 'Pages', url: '/pages', icon: FileText, childUrls: ['/pages/detail']},
{kind: 'item', title: '版本发布', url: '/config-versions', icon: GitBranch},
{kind: 'item', title: '访问日志', url: '/access-logs', icon: ScrollText},
@@ -112,4 +122,4 @@ export function isOpenFlareConsoleRoute(pathname: string): boolean {
return matchesNavPath(pathname, entry.url, entry.childUrls);
});
}
}