diff --git a/frontend/src/components/Navbar.tsx b/frontend/src/components/Navbar.tsx index 2b177dd..b1e9daf 100644 --- a/frontend/src/components/Navbar.tsx +++ b/frontend/src/components/Navbar.tsx @@ -73,93 +73,63 @@ const Navbar = () => { > {/* 移动端屏幕菜单栏 */} - - - - - - - - - - - {t("navbar.dashboard")} + { isAuthenticated ? ( + <> + + + + + - - - - - - - - {t("navbar.apiMonitors")} - - - - - - - - - - {t("navbar.agentMonitors")} - - - - - - - - - {t("navbar.statusPage")} - - - - - - - - - {t("navbar.notifications")} - - - - - - - + + + navigate("/dashboard")}> + + + {t("navbar.dashboard")} + + + navigate("/monitors")}> + + + + {t("navbar.apiMonitors")} + + + + navigate("/agents")}> + + + + {t("navbar.agentMonitors")} + + + + navigate("/status/config")}> + + + {t("navbar.statusPage")} + + + navigate("/notifications")}> + + + + {t("navbar.notifications")} + + + + + + + + + + ) : null } - {/* Logo 部分 */} - + @@ -321,7 +291,7 @@ const Navbar = () => { {/* 语言选择器 */} - + @@ -119,8 +119,8 @@ const CreateAgent = () => { {t("agent.add.generatingToken")} ) : ( <> - - {token} + + {token} - - + + {t("notifications.channels.description")} @@ -642,12 +642,12 @@ const NotificationsConfig = () => { {t("notifications.channels.noChannels")} ) : ( - + {channels.map((channel) => ( - + - - + + {channel.name} {channel.type === "telegram" && channel.config && @@ -715,8 +715,8 @@ const NotificationsConfig = () => { ))} )} - - + + ); @@ -742,8 +742,8 @@ const NotificationsConfig = () => { - - + + {t("notifications.templates.description")} @@ -755,7 +755,7 @@ const NotificationsConfig = () => { ) : ( {templates.map((template) => ( - + @@ -801,7 +801,7 @@ const NotificationsConfig = () => { )} - + ); @@ -823,9 +823,9 @@ const NotificationsConfig = () => { {t("notifications.settings.monitors")} - + - + @@ -844,7 +844,7 @@ const NotificationsConfig = () => { {settings.monitors.enabled && ( - + { {/* 全局客户端通知设置 */} - + {t("notifications.settings.agents")} - + - + @@ -1102,7 +1102,7 @@ const NotificationsConfig = () => { }; return ( - + @@ -1216,7 +1216,7 @@ const NotificationsConfig = () => { }; return ( - + @@ -1766,7 +1766,7 @@ const NotificationsConfig = () => { {loading ? ( {t("common.loading")}... ) : ( - + diff --git a/frontend/src/pages/status/StatusPageConfig.tsx b/frontend/src/pages/status/StatusPageConfig.tsx index 6047296..151bc11 100644 --- a/frontend/src/pages/status/StatusPageConfig.tsx +++ b/frontend/src/pages/status/StatusPageConfig.tsx @@ -250,7 +250,7 @@ const StatusPageConfig = () => { - + {t("statusPageConfig.general")}