@sleep2agi/agent-network-dashboard 0.5.7-preview.4 → 0.5.7-preview.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +0 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -0
- package/.next/cache/.rscinfo +1 -0
- package/.next/diagnostics/route-bundle-stats.json +51 -51
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +0 -6
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +3 -3
- package/.next/server/app/_not-found.rsc +15 -15
- package/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin.html +3 -3
- package/.next/server/app/admin.rsc +17 -17
- package/.next/server/app/admin.segments/_full.segment.rsc +17 -17
- package/.next/server/app/admin.segments/_head.segment.rsc +4 -4
- package/.next/server/app/admin.segments/_index.segment.rsc +8 -8
- package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/admin.segments/admin.segment.rsc +3 -3
- package/.next/server/app/index.html +3 -3
- package/.next/server/app/index.rsc +17 -17
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +17 -17
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- package/.next/server/app/login.rsc +17 -17
- package/.next/server/app/login.segments/_full.segment.rsc +17 -17
- package/.next/server/app/login.segments/_head.segment.rsc +4 -4
- package/.next/server/app/login.segments/_index.segment.rsc +8 -8
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/login.segments/login.segment.rsc +3 -3
- package/.next/server/app/logs/page.js.nft.json +1 -1
- package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/logs.html +3 -3
- package/.next/server/app/logs.rsc +17 -17
- package/.next/server/app/logs.segments/_full.segment.rsc +17 -17
- package/.next/server/app/logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/logs.segments/_index.segment.rsc +8 -8
- package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/logs.segments/logs.segment.rsc +3 -3
- package/.next/server/app/messages/page.js.nft.json +1 -1
- package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
- package/.next/server/app/messages.html +3 -3
- package/.next/server/app/messages.rsc +17 -17
- package/.next/server/app/messages.segments/_full.segment.rsc +17 -17
- package/.next/server/app/messages.segments/_head.segment.rsc +4 -4
- package/.next/server/app/messages.segments/_index.segment.rsc +8 -8
- package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/messages.segments/messages.segment.rsc +3 -3
- package/.next/server/app/node/page.js.nft.json +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +3 -3
- package/.next/server/app/node.rsc +17 -17
- package/.next/server/app/node.segments/_full.segment.rsc +17 -17
- package/.next/server/app/node.segments/_head.segment.rsc +4 -4
- package/.next/server/app/node.segments/_index.segment.rsc +8 -8
- package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/node.segments/node.segment.rsc +3 -3
- package/.next/server/app/nodes/page.js.nft.json +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +3 -3
- package/.next/server/app/nodes.rsc +17 -17
- package/.next/server/app/nodes.segments/_full.segment.rsc +17 -17
- package/.next/server/app/nodes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/_index.segment.rsc +8 -8
- package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/nodes.segments/nodes.segment.rsc +3 -3
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs/page.js.nft.json +1 -1
- package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +3 -3
- package/.next/server/app/server-logs.rsc +17 -17
- package/.next/server/app/server-logs.segments/_full.segment.rsc +17 -17
- package/.next/server/app/server-logs.segments/_head.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/_index.segment.rsc +8 -8
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +3 -3
- package/.next/server/app/servers/page.js.nft.json +1 -1
- package/.next/server/app/servers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/servers.html +3 -3
- package/.next/server/app/servers.rsc +17 -17
- package/.next/server/app/servers.segments/_full.segment.rsc +17 -17
- package/.next/server/app/servers.segments/_head.segment.rsc +4 -4
- package/.next/server/app/servers.segments/_index.segment.rsc +8 -8
- package/.next/server/app/servers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/servers.segments/servers/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/servers.segments/servers.segment.rsc +3 -3
- package/.next/server/app/settings/networks/page.js.nft.json +1 -1
- package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +3 -3
- package/.next/server/app/settings/networks.rsc +17 -17
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +17 -17
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +3 -3
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens/page.js.nft.json +1 -1
- package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +3 -3
- package/.next/server/app/settings/tokens.rsc +17 -17
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +17 -17
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +3 -3
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +3 -3
- package/.next/server/app/settings.html +3 -3
- package/.next/server/app/settings.rsc +17 -17
- package/.next/server/app/settings.segments/_full.segment.rsc +17 -17
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks/page.js.nft.json +1 -1
- package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tasks.html +3 -3
- package/.next/server/app/tasks.rsc +17 -17
- package/.next/server/app/tasks.segments/_full.segment.rsc +17 -17
- package/.next/server/app/tasks.segments/_head.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/_index.segment.rsc +8 -8
- package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/tasks.segments/tasks.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__030vg4n._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fhoq8i._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0lu1wok._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0sv~g.o._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0torghd._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0torghd._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +3 -3
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0fjlnh~._.js +3 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0fjlnh~._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0gd.4pc._.js +9 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0gd.4pc._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0i3759l._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_0xgney8._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_10hjgv4._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_12l4oto._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0r7kb.o._.js +9 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0r7kb.o._.js.map +1 -0
- package/.next/server/chunks/ssr/agent-network-dashboard_app_tasks_page_tsx_0mwxy4z._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_tasks_page_tsx_0mwxy4z._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{181u38qblp8lz.js → 00b-ysl~m~dr~.js} +1 -1
- package/.next/static/chunks/{0jp~cs9-zkmqa.js → 00b4y77vxfabl.js} +1 -1
- package/.next/static/chunks/00d~isei247an.js +1 -0
- package/.next/static/chunks/{15qxef.ilfysw.js → 02i~-uz0v~7ke.js} +3 -3
- package/.next/static/chunks/03rfxivuawnc8.css +1 -0
- package/.next/static/chunks/0_m0zx8f~zx54.js +7 -0
- package/.next/static/chunks/{0a.9~-nf0gpec.js → 0gp-mz_4aqk3r.js} +1 -1
- package/.next/static/chunks/{0im751o4n61c7.js → 0h7bfxybxqwm7.js} +1 -1
- package/.next/static/chunks/0miet1u_5tj06.js +7 -0
- package/.next/static/chunks/0q~ko.knz4cq8.js +1 -0
- package/.next/static/chunks/{05uk96gc~9mni.js → 0ti3v67ixu43p.js} +1 -1
- package/.next/static/chunks/0urrkhru4u8d2.js +1 -0
- package/.next/static/chunks/{0wtp_nw--hl5t.js → 0yxm49gpjsfl5.js} +1 -1
- package/.next/static/chunks/120~r8iab8l~1.js +1 -0
- package/.next/static/chunks/132yi-q_9~-q8.js +1 -0
- package/.next/static/chunks/161etkmg~z~-d.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/.next/types/routes.d.ts +1 -2
- package/.next/types/validator.ts +0 -9
- package/app/admin/page.tsx +6 -2
- package/app/components/AgentCard.tsx +19 -9
- package/app/components/AppShell.tsx +7 -1
- package/app/components/ChatPopover.tsx +1 -1
- package/app/components/CollapsibleSearch.tsx +127 -0
- package/app/components/CommandCenter.tsx +12 -2
- package/app/components/CommandPalette.tsx +1 -1
- package/app/components/DispatchPanel.tsx +7 -4
- package/app/components/HealthBanner.tsx +10 -2
- package/app/components/HelpOverlay.tsx +0 -3
- package/app/components/MobileNav.tsx +26 -19
- package/app/components/Sidebar.tsx +19 -12
- package/app/components/StatsBar.tsx +8 -1
- package/app/components/TaskChatPanel.tsx +19 -5
- package/app/components/TaskDrawer.tsx +3 -1
- package/app/components/ThemeSwitcher.tsx +10 -79
- package/app/components/TopoGraph.tsx +11 -1
- package/app/components/UserBar.tsx +3 -3
- package/app/globals.css +76 -707
- package/app/layout.tsx +27 -1
- package/app/lib/hooks.ts +0 -5
- package/app/login/page.tsx +3 -3
- package/app/logs/page.tsx +10 -4
- package/app/messages/page.tsx +72 -48
- package/app/node/page.tsx +13 -3
- package/app/nodes/page.tsx +52 -22
- package/app/page.tsx +12 -29
- package/app/server-logs/page.tsx +39 -11
- package/app/settings/networks/page.tsx +3 -3
- package/app/settings/page.tsx +28 -81
- package/app/settings/tokens/page.tsx +1 -1
- package/app/tasks/page.tsx +36 -14
- package/package.json +1 -1
- package/public/manifest.webmanifest +24 -0
- package/public/robots.txt +7 -0
- package/.next/server/app/api/hub/license/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/hub/license/route/build-manifest.json +0 -9
- package/.next/server/app/api/hub/license/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/hub/license/route.js +0 -7
- package/.next/server/app/api/hub/license/route.js.map +0 -5
- package/.next/server/app/api/hub/license/route.js.nft.json +0 -1
- package/.next/server/app/api/hub/license/route_client-reference-manifest.js +0 -3
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js +0 -3
- package/.next/server/chunks/0ykm__next-internal_server_app_api_hub_license_route_actions_0a4.fuh.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0rovr5-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0rovr5-._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0nw~zhp._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js +0 -9
- package/.next/server/chunks/ssr/agent-network-dashboard_app_1153xeb._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js +0 -9
- package/.next/server/chunks/ssr/agent-network-dashboard_app_components_0s5uqlp._.js.map +0 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_server-logs_page_tsx_0dg.l_8._.js +0 -3
- package/.next/server/chunks/ssr/agent-network-dashboard_app_server-logs_page_tsx_0dg.l_8._.js.map +0 -1
- package/.next/static/chunks/0.66f3.rtcybb.js +0 -1
- package/.next/static/chunks/03~5pxwbxxw-b.js +0 -1
- package/.next/static/chunks/0561vp5-q5.zp.js +0 -1
- package/.next/static/chunks/09p_4a62~yi52.js +0 -1
- package/.next/static/chunks/0cjz0r1v8sx_f.js +0 -1
- package/.next/static/chunks/0h_gdeiy~s92j.css +0 -1
- package/.next/static/chunks/0inql3s9ldyx5.js +0 -1
- package/.next/static/chunks/0nqm.7w9_inwd.js +0 -7
- package/.next/static/chunks/15-ltfhot3b4n.js +0 -7
- package/app/api/hub/license/route.ts +0 -33
- package/app/components/BroadcastBar.tsx +0 -84
- package/app/components/InboxPanel.tsx +0 -36
- /package/.next/static/{77VfHxRKplwAYs09P-QWj → ZTMl9nwIhD2JFX-jfYkql}/_buildManifest.js +0 -0
- /package/.next/static/{77VfHxRKplwAYs09P-QWj → ZTMl9nwIhD2JFX-jfYkql}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{77VfHxRKplwAYs09P-QWj → ZTMl9nwIhD2JFX-jfYkql}/_ssgManifest.js +0 -0
|
@@ -3,23 +3,41 @@
|
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { usePathname } from 'next/navigation';
|
|
5
5
|
|
|
6
|
+
// #209 R25 (Vincent msg 529 "command 留着干嘛" / 530 "Agents 放到最前面?"
|
|
7
|
+
// / 531 "设置放到最后面" / 533+534 "A / 加一个设置啊"):
|
|
8
|
+
// - drop the synthetic-Cmd+K Command tap (no Cmd/Ctrl key on phone — the
|
|
9
|
+
// palette functions it surfaced are reachable from Settings on touch:
|
|
10
|
+
// theme switch, sign-out, navigation to Messages/Logs are all there)
|
|
11
|
+
// - reorder so Agents is the first-thumb tap (Vincent's primary surface)
|
|
12
|
+
// - put Settings rightmost as the consolidated secondary-destinations hub
|
|
13
|
+
// (R16 absorbed Messages / Audit Log / Server Logs into the Resources
|
|
14
|
+
// card grid there, so /settings is the legitimate "everything else"
|
|
15
|
+
// leaf on mobile)
|
|
16
|
+
// Stays at 4 cells (R24's grid-cols-4) — same width per tab.
|
|
17
|
+
// Settings icon path is copied from app/components/Sidebar.tsx:22 so the
|
|
18
|
+
// icon shape matches the desktop sidebar entry.
|
|
6
19
|
const MOBILE_NAV_ITEMS = [
|
|
20
|
+
{ href: '/nodes', label: 'Agents', icon: 'M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01' },
|
|
7
21
|
{ href: '/', label: 'Overview', icon: 'M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6' },
|
|
8
22
|
{ href: '/tasks', label: 'Tasks', icon: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4' },
|
|
9
|
-
{ href: '/
|
|
10
|
-
{ href: '/messages', label: 'Chats', icon: 'M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z' },
|
|
23
|
+
{ href: '/settings', label: 'Settings', icon: 'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z' },
|
|
11
24
|
];
|
|
12
25
|
|
|
13
26
|
export function MobileNav() {
|
|
14
27
|
const pathname = usePathname();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
28
|
+
// Match Sidebar.tsx isActive — /settings must be exact-match because
|
|
29
|
+
// Settings subpages (/settings/tokens, /settings/networks) have their
|
|
30
|
+
// own headers; startsWith would keep the bottom-nav highlighted there
|
|
31
|
+
// and steal back-affordance from the user.
|
|
32
|
+
const isActive = (href: string) => {
|
|
33
|
+
if (href === '/') return pathname === '/';
|
|
34
|
+
if (href === '/settings') return pathname === '/settings';
|
|
35
|
+
return pathname.startsWith(href);
|
|
18
36
|
};
|
|
19
37
|
|
|
20
38
|
return (
|
|
21
39
|
<nav className="fixed inset-x-0 bottom-0 z-40 border-t border-[#2a2a4a] bg-[#0d0d1a]/95 px-1 pb-[calc(env(safe-area-inset-bottom)+0.35rem)] pt-1.5 backdrop-blur lg:hidden">
|
|
22
|
-
<div className="mx-auto grid max-w-md grid-cols-
|
|
40
|
+
<div className="mx-auto grid max-w-md grid-cols-4 gap-1">
|
|
23
41
|
{MOBILE_NAV_ITEMS.map(item => {
|
|
24
42
|
const active = isActive(item.href);
|
|
25
43
|
return (
|
|
@@ -28,9 +46,9 @@ export function MobileNav() {
|
|
|
28
46
|
href={item.href}
|
|
29
47
|
prefetch={false}
|
|
30
48
|
aria-current={active ? 'page' : undefined}
|
|
31
|
-
className={`flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${
|
|
49
|
+
className={`relative flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] transition-colors ${
|
|
32
50
|
active
|
|
33
|
-
? 'bg-cyan-500/12 text-cyan-300'
|
|
51
|
+
? 'bg-cyan-500/12 text-cyan-300 before:absolute before:top-0 before:left-3 before:right-3 before:h-0.5 before:rounded-full before:bg-cyan-400'
|
|
34
52
|
: 'text-gray-500 active:bg-[#1a1a3a] active:text-gray-200'
|
|
35
53
|
}`}
|
|
36
54
|
>
|
|
@@ -41,17 +59,6 @@ export function MobileNav() {
|
|
|
41
59
|
</Link>
|
|
42
60
|
);
|
|
43
61
|
})}
|
|
44
|
-
<button
|
|
45
|
-
type="button"
|
|
46
|
-
onClick={openCommand}
|
|
47
|
-
className="flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[10px] text-gray-500 transition-colors active:bg-[#1a1a3a] active:text-gray-200"
|
|
48
|
-
aria-label="Open command palette"
|
|
49
|
-
>
|
|
50
|
-
<svg className="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.6}>
|
|
51
|
-
<path strokeLinecap="round" strokeLinejoin="round" d="M12 3v3m0 12v3m9-9h-3M6 12H3m15.364-6.364l-2.121 2.121M7.757 16.243l-2.121 2.121m12.728 0l-2.121-2.121M7.757 7.757L5.636 5.636M12 8.5A3.5 3.5 0 1112 15.5 3.5 3.5 0 0112 8.5z" />
|
|
52
|
-
</svg>
|
|
53
|
-
<span className="max-w-full truncate">Command</span>
|
|
54
|
-
</button>
|
|
55
62
|
</div>
|
|
56
63
|
</nav>
|
|
57
64
|
);
|
|
@@ -5,19 +5,19 @@ import { usePathname } from 'next/navigation';
|
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import useSWR from 'swr';
|
|
7
7
|
import { useNetworkId } from '../lib/network-context';
|
|
8
|
-
import { ThemeSwitcher } from './ThemeSwitcher';
|
|
9
8
|
|
|
10
9
|
const networkFetcher = (url: string) => fetch(url).then(r => r.ok ? r.json() : { networks: [] });
|
|
11
10
|
|
|
11
|
+
// Cleanup (issue #4): sidebar collapsed to the 6 core destinations. The
|
|
12
|
+
// low-frequency / unverified entries (Messages, Networks, Audit Log,
|
|
13
|
+
// Server Logs) were removed from primary nav — those pages still exist
|
|
14
|
+
// and stay reachable via direct URL and the command palette (⌘K); they
|
|
15
|
+
// were just cluttering the main rail. Restore here if usage warrants.
|
|
12
16
|
const NAV_ITEMS = [
|
|
13
17
|
{ href: '/', label: 'Overview', icon: 'M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6' },
|
|
14
18
|
{ href: '/tasks', label: 'Tasks', icon: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4' },
|
|
15
19
|
{ href: '/nodes', label: 'Nodes', icon: 'M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01' },
|
|
16
20
|
{ href: '/servers', label: 'Servers', icon: 'M4 6.5A2.5 2.5 0 016.5 4h11A2.5 2.5 0 0120 6.5v1A2.5 2.5 0 0117.5 10h-11A2.5 2.5 0 014 7.5v-1zM4 16.5A2.5 2.5 0 016.5 14h11a2.5 2.5 0 012.5 2.5v1a2.5 2.5 0 01-2.5 2.5h-11A2.5 2.5 0 014 17.5v-1zM7 7h.01M7 17h.01' },
|
|
17
|
-
{ href: '/messages', label: 'Messages', icon: 'M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z' },
|
|
18
|
-
{ href: '/settings/networks', label: 'Networks', icon: 'M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9' },
|
|
19
|
-
{ href: '/logs', label: 'Audit Log', icon: 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z' },
|
|
20
|
-
{ href: '/server-logs', label: 'Server Logs', icon: 'M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z' },
|
|
21
21
|
{ href: '/admin', label: 'Admin', icon: 'M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z' },
|
|
22
22
|
{ href: '/settings', label: 'Settings', icon: 'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z' },
|
|
23
23
|
];
|
|
@@ -91,10 +91,12 @@ export function Sidebar() {
|
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
93
|
<>
|
|
94
|
-
{/* Mobile hamburger
|
|
94
|
+
{/* Mobile hamburger — R13 of #190: was p-2.5 = ~40px tap target,
|
|
95
|
+
just below the iOS 44px guideline. Bump padding and add an
|
|
96
|
+
explicit min-w/min-h so it can never be miss-tapped. */}
|
|
95
97
|
<button
|
|
96
98
|
onClick={() => setMobileOpen(!mobileOpen)}
|
|
97
|
-
className="fixed top-
|
|
99
|
+
className="fixed top-3 left-3 z-50 lg:hidden bg-[#111128] border border-[#2a2a4a] rounded-lg p-3 min-h-[44px] min-w-[44px] inline-flex items-center justify-center text-gray-400 hover:text-white active:bg-[#1a1a3a]"
|
|
98
100
|
aria-label="Toggle menu"
|
|
99
101
|
>
|
|
100
102
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
@@ -143,7 +145,7 @@ export function Sidebar() {
|
|
|
143
145
|
key={n.network_id}
|
|
144
146
|
onClick={() => { setNetworkId(n.network_id); setMobileOpen(false); }}
|
|
145
147
|
title={n.network_id}
|
|
146
|
-
className={`w-full flex items-center gap-2 px-3 py-1.5 rounded-md text-xs transition-colors text-left ${
|
|
148
|
+
className={`w-full flex items-center gap-2 px-3 py-2.5 lg:py-1.5 rounded-md text-xs transition-colors text-left ${
|
|
147
149
|
networkId === n.network_id
|
|
148
150
|
? 'bg-cyan-500/10 text-cyan-300'
|
|
149
151
|
: 'text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]'
|
|
@@ -164,7 +166,13 @@ export function Sidebar() {
|
|
|
164
166
|
</div>
|
|
165
167
|
)}
|
|
166
168
|
|
|
167
|
-
|
|
169
|
+
{/* #209 R26 (Vincent msg 540 screenshot — "设置页面没展示全"): the
|
|
170
|
+
absolute-bottom footer below stacks 3 rows (Quick search /
|
|
171
|
+
Sign out / collapse) ≈ 92-100px tall, but this spacer was
|
|
172
|
+
pb-20 (80px), so the last nav entry (Settings on /settings)
|
|
173
|
+
was being eaten by the footer overlay. Bump to pb-28 (112px)
|
|
174
|
+
to clear the actual footer height. */}
|
|
175
|
+
<div className="pb-28">
|
|
168
176
|
{nav}
|
|
169
177
|
</div>
|
|
170
178
|
|
|
@@ -178,7 +186,7 @@ export function Sidebar() {
|
|
|
178
186
|
}}
|
|
179
187
|
title={collapsed ? 'Quick search (⌘K)' : undefined}
|
|
180
188
|
className={`w-full flex items-center text-[11px] text-gray-600 hover:text-gray-400 hover:bg-[#1a1a2a] transition-colors ${
|
|
181
|
-
collapsed ? 'justify-center px-0 py-2.5' : 'justify-between gap-2 px-5 py-2'
|
|
189
|
+
collapsed ? 'justify-center px-0 py-2.5' : 'justify-between gap-2 px-5 py-3 lg:py-2'
|
|
182
190
|
}`}
|
|
183
191
|
aria-label="Open command palette"
|
|
184
192
|
>
|
|
@@ -206,8 +214,7 @@ export function Sidebar() {
|
|
|
206
214
|
</svg>
|
|
207
215
|
{!collapsed && 'Sign out'}
|
|
208
216
|
</button>
|
|
209
|
-
<div className={`flex items-center
|
|
210
|
-
<ThemeSwitcher compact={collapsed} />
|
|
217
|
+
<div className={`flex items-center ${collapsed ? 'flex-col px-0 py-2' : 'px-3 py-2 justify-end'}`}>
|
|
211
218
|
<button
|
|
212
219
|
onClick={() => setCollapsed(!collapsed)}
|
|
213
220
|
title={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}
|
|
@@ -12,8 +12,15 @@ export function StatsBar({ online, working, total, version, uptime }: StatsBarPr
|
|
|
12
12
|
const onlinePercent = total > 0 ? Math.round((online / total) * 100) : 0;
|
|
13
13
|
const fleetEmpty = total === 0;
|
|
14
14
|
|
|
15
|
+
// #209 R29 (mobile vertical rhythm — goal "大幅提升移动端体验"):
|
|
16
|
+
// populated branch previously left mb-8 (32 px) below the 4-card grid,
|
|
17
|
+
// the single biggest gap on the Overview page. Drop to mb-4 (16 px)
|
|
18
|
+
// on phones, restore mb-8 from sm: up. Pairs with R28's section-gap
|
|
19
|
+
// tighten — together they reclaim ~48 px of pure scroll waste before
|
|
20
|
+
// the agent grid. The empty-fleet branch already used mb-4 since R72,
|
|
21
|
+
// so this only touches the populated case.
|
|
15
22
|
return (
|
|
16
|
-
<div className={fleetEmpty ? 'mb-4' : 'mb-8'}>
|
|
23
|
+
<div className={fleetEmpty ? 'mb-4' : 'mb-4 sm:mb-8'}>
|
|
17
24
|
{/* Title row */}
|
|
18
25
|
<div className="flex flex-wrap items-center gap-3 mb-4">
|
|
19
26
|
<h1 className="text-2xl font-bold text-white tracking-tight">Agent Network</h1>
|
|
@@ -483,7 +483,14 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
483
483
|
const chatContent = (
|
|
484
484
|
<>
|
|
485
485
|
{/* Messages area */}
|
|
486
|
-
|
|
486
|
+
{/* R12 of #190 mobile polish: the chat scroll surface used
|
|
487
|
+
space-y-3 between task+reply pairs at mobile = 12 px, which
|
|
488
|
+
in a long thread (the panel's bread-and-butter use case)
|
|
489
|
+
adds up to a significant scroll length. Drop to space-y-2 at
|
|
490
|
+
mobile and the per-pair grouping (line 540) from space-y-2
|
|
491
|
+
to space-y-1.5 so messages read denser without losing the
|
|
492
|
+
speaker-turn rhythm. Desktop unchanged at sm: and up. */}
|
|
493
|
+
<div className="flex-1 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4 space-y-2 sm:space-y-4">
|
|
487
494
|
{!historyLoaded && (
|
|
488
495
|
<div className="flex justify-center py-8">
|
|
489
496
|
<div className="w-5 h-5 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin" />
|
|
@@ -537,7 +544,7 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
537
544
|
);
|
|
538
545
|
}
|
|
539
546
|
return (
|
|
540
|
-
<div key={`${m.task_id}:task`} className="space-y-2">
|
|
547
|
+
<div key={`${m.task_id}:task`} className="space-y-1.5 sm:space-y-2">
|
|
541
548
|
{/* Outgoing task — labeled with origin so peer-forwarded tasks are obvious */}
|
|
542
549
|
<div className="flex justify-end">
|
|
543
550
|
<div className="max-w-[92%] sm:max-w-[85%] bg-cyan-500/8 border border-cyan-500/15 rounded-2xl rounded-br-md px-3 py-2.5 sm:px-4 shadow-sm">
|
|
@@ -626,8 +633,11 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
626
633
|
</select>
|
|
627
634
|
</div>
|
|
628
635
|
</div>
|
|
629
|
-
|
|
630
|
-
|
|
636
|
+
{/* R17 of #190: send button was p-2.5 + w-5 icon = ~40 x 40
|
|
637
|
+
hit zone, 4 px short of the iOS 44 px guideline on
|
|
638
|
+
the short axis. Bump to inline-flex + min-h/w 44. */}
|
|
639
|
+
<button onClick={send} aria-label="Send message" disabled={sending || (!input.trim() && attachedFiles.length === 0)}
|
|
640
|
+
className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center bg-cyan-600 hover:bg-cyan-500 disabled:bg-[var(--border)] disabled:text-[var(--fg-dim)] text-[var(--fg)] rounded-xl transition-all shrink-0 active:scale-95">
|
|
631
641
|
{sending ? (
|
|
632
642
|
<div className="w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin" />
|
|
633
643
|
) : (
|
|
@@ -673,7 +683,11 @@ export function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskCh
|
|
|
673
683
|
<div className="text-[10px] text-[var(--fg-muted)]">{pollingIds.size > 0 ? 'Processing...' : 'Ready'}</div>
|
|
674
684
|
</div>
|
|
675
685
|
</div>
|
|
676
|
-
|
|
686
|
+
{/* R16 of #190: was p-1.5 + w-5 h-5 svg = ~32 px tap target.
|
|
687
|
+
The chat panel close is high-frequency on mobile (user
|
|
688
|
+
dismisses to scroll the underlying page); bump to a
|
|
689
|
+
uniform 44 x 44 hit zone via inline-flex + min-h/w. */}
|
|
690
|
+
<button onClick={onClose} aria-label="Close chat" className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center text-[var(--fg-muted)] hover:text-[var(--fg)] rounded-lg hover:bg-[var(--bg-elevated)]">
|
|
677
691
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
678
692
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
679
693
|
</svg>
|
|
@@ -88,7 +88,9 @@ export function TaskDrawer({ taskId, onClose }: TaskDrawerProps) {
|
|
|
88
88
|
<div className="text-sm font-semibold text-white">Task Detail</div>
|
|
89
89
|
<div className="text-[10px] text-gray-500 mt-0.5">{taskId.slice(0, 16)}...</div>
|
|
90
90
|
</div>
|
|
91
|
-
|
|
91
|
+
{/* R16 of #190: same chat-panel close pattern — was ~32 px
|
|
92
|
+
tap target; lift to a uniform 44 x 44 hit zone. */}
|
|
93
|
+
<button onClick={onClose} aria-label="Close task drawer" className="inline-flex min-h-[44px] min-w-[44px] items-center justify-center text-gray-500 hover:text-white rounded-lg hover:bg-[#1a1a2a]">
|
|
92
94
|
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
93
95
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
94
96
|
</svg>
|
|
@@ -1,89 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useEffect
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
] as const;
|
|
5
|
+
// Cleanup (issue #4) — less is more. The dashboard is designed dark/cyber;
|
|
6
|
+
// the light / mint / sunset themes were never verified and the picker just
|
|
7
|
+
// added a knob nobody validated. We lock to the single cyber theme and drop
|
|
8
|
+
// the switcher control. (The unused [data-theme] CSS branches in globals.css
|
|
9
|
+
// are now dead but harmless — left for a later dedicated CSS sweep.)
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
const THEME_KEY = 'anet-theme';
|
|
14
|
-
|
|
15
|
-
function applyTheme(theme: ThemeId) {
|
|
16
|
-
if (typeof document !== 'undefined') {
|
|
17
|
-
document.documentElement.setAttribute('data-theme', theme);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
11
|
+
const THEME = 'cyber';
|
|
20
12
|
|
|
21
13
|
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
22
|
-
// Apply persisted theme on first render so we don't flash dark before
|
|
23
|
-
// user-selected light. Initial value comes from cookie/localStorage.
|
|
24
14
|
useEffect(() => {
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
if (typeof document !== 'undefined') {
|
|
16
|
+
document.documentElement.setAttribute('data-theme', THEME);
|
|
17
|
+
}
|
|
27
18
|
}, []);
|
|
28
19
|
return <>{children}</>;
|
|
29
20
|
}
|
|
30
|
-
|
|
31
|
-
export function ThemeSwitcher({ compact = false }: { compact?: boolean }) {
|
|
32
|
-
const [theme, setTheme] = useState<ThemeId>('cyber');
|
|
33
|
-
const [open, setOpen] = useState(false);
|
|
34
|
-
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
const stored = (localStorage.getItem(THEME_KEY) as ThemeId) || 'cyber';
|
|
37
|
-
setTheme(stored);
|
|
38
|
-
applyTheme(stored);
|
|
39
|
-
}, []);
|
|
40
|
-
|
|
41
|
-
function pick(next: ThemeId) {
|
|
42
|
-
setTheme(next);
|
|
43
|
-
localStorage.setItem(THEME_KEY, next);
|
|
44
|
-
applyTheme(next);
|
|
45
|
-
setOpen(false);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const current = THEMES.find(t => t.id === theme) || THEMES[0];
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<div className="relative">
|
|
52
|
-
<button
|
|
53
|
-
aria-label="切换主题"
|
|
54
|
-
onClick={() => setOpen(!open)}
|
|
55
|
-
className="px-2.5 py-1.5 rounded-md text-xs flex items-center gap-1.5 hover:opacity-80 transition-opacity"
|
|
56
|
-
style={{ background: 'var(--bg-elevated)', color: 'var(--fg)', border: '1px solid var(--border)' }}
|
|
57
|
-
>
|
|
58
|
-
<span aria-hidden>{current.emoji}</span>
|
|
59
|
-
{!compact && <span>{current.label}</span>}
|
|
60
|
-
</button>
|
|
61
|
-
{open && (
|
|
62
|
-
<>
|
|
63
|
-
<div className="fixed inset-0 z-40" onClick={() => setOpen(false)} />
|
|
64
|
-
<div
|
|
65
|
-
className="absolute right-0 top-full mt-1 z-50 rounded-md min-w-[160px] py-1 shadow-lg"
|
|
66
|
-
style={{ background: 'var(--bg-secondary)', border: '1px solid var(--border)' }}
|
|
67
|
-
>
|
|
68
|
-
{THEMES.map(t => (
|
|
69
|
-
<button
|
|
70
|
-
key={t.id}
|
|
71
|
-
onClick={() => pick(t.id)}
|
|
72
|
-
className="w-full px-3 py-2 text-left text-xs flex items-center gap-2 hover:opacity-80"
|
|
73
|
-
style={{
|
|
74
|
-
background: t.id === theme ? 'var(--bg-elevated)' : 'transparent',
|
|
75
|
-
color: 'var(--fg)',
|
|
76
|
-
}}
|
|
77
|
-
>
|
|
78
|
-
<span aria-hidden>{t.emoji}</span>
|
|
79
|
-
<span className="flex-1">{t.label}</span>
|
|
80
|
-
<span style={{ color: 'var(--fg-dim)' }} className="text-[10px]">{t.desc}</span>
|
|
81
|
-
{t.id === theme && <span style={{ color: 'var(--accent)' }}>•</span>}
|
|
82
|
-
</button>
|
|
83
|
-
))}
|
|
84
|
-
</div>
|
|
85
|
-
</>
|
|
86
|
-
)}
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
@@ -2059,8 +2059,18 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
2059
2059
|
}
|
|
2060
2060
|
};
|
|
2061
2061
|
|
|
2062
|
+
// #209 R27 (Vincent msg 545+547 — TopoGraph "中间太小,往左右扩"):
|
|
2063
|
+
// drop the unique `max-w-6xl mx-auto` cap. Every other section on
|
|
2064
|
+
// the Overview page (KPI cards, agent grid, Recent Activity, etc.)
|
|
2065
|
+
// is full-width; only TopoGraph was self-limiting to 1152 px,
|
|
2066
|
+
// leaving ~70 px slack on each side of the typical (~1290 px main
|
|
2067
|
+
// area) viewport. Now matches the rest of the page — the inner SVG
|
|
2068
|
+
// layout is already resize-aware (ring/grid/tree all re-fit on
|
|
2069
|
+
// container width change), so widening the card naturally spreads
|
|
2070
|
+
// the node cluster. Less is more: one fewer arbitrary constraint.
|
|
2071
|
+
// Picked option A over a 1536 px cap (option B) per Vincent msg 547.
|
|
2062
2072
|
return (
|
|
2063
|
-
<section className="w-full
|
|
2073
|
+
<section className="w-full mb-8">
|
|
2064
2074
|
{/* Round 299 / Loop: title block bottom margin mb-3 (12px) →
|
|
2065
2075
|
mb-4 (16px). After R298 tightened the title-block internal
|
|
2066
2076
|
gap (12→10px) packing brand-logo + kicker + h2 into a more
|
|
@@ -133,7 +133,7 @@ export function UserBar() {
|
|
|
133
133
|
setNetworkId(e.target.value);
|
|
134
134
|
sessionStorage.setItem('anet_v3_auth', JSON.stringify(updated));
|
|
135
135
|
}}
|
|
136
|
-
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white focus:outline-none"
|
|
136
|
+
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-base sm:text-xs text-white focus:outline-none"
|
|
137
137
|
>
|
|
138
138
|
{auth.networks.map(n => (
|
|
139
139
|
<option key={n.network_id} value={n.network_id}>{n.network_name}</option>
|
|
@@ -160,9 +160,9 @@ export function UserBar() {
|
|
|
160
160
|
{editing && (
|
|
161
161
|
<div className="flex flex-wrap items-center gap-2 mt-2 pt-2 border-t border-[#2a2a4a]">
|
|
162
162
|
<input type="text" value={editName} onChange={e => setEditName(e.target.value)} placeholder="Display name"
|
|
163
|
-
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-32" />
|
|
163
|
+
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-base sm:text-xs text-white placeholder-gray-600 focus:outline-none w-32" />
|
|
164
164
|
<input type="email" value={editEmail} onChange={e => setEditEmail(e.target.value)} placeholder="Email"
|
|
165
|
-
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-xs text-white placeholder-gray-600 focus:outline-none w-40" />
|
|
165
|
+
className="bg-[#0a0a15] border border-[#2a2a4a] rounded px-2 py-1 text-base sm:text-xs text-white placeholder-gray-600 focus:outline-none w-40" />
|
|
166
166
|
<button onClick={updateProfile} className="px-2 py-1 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded">Save</button>
|
|
167
167
|
</div>
|
|
168
168
|
)}
|