feat(webui): split overview into a processes page + mobile/ultrawide pass
The homepage was doing double duty — monitoring + injection control. Split it:
- New /processes page ("进程注入", sidebar #2) owns the QQ-process control
surface (load / unload / refresh / probe-login + its dialogs). Overview is
now a read-only dashboard: stats, host metrics, online accounts, plus a
read-only injection-summary tile (online / loadable, links to /processes)
and a first-run CTA that points at /processes while nothing is online.
Route + AppPath + nav item wired; state/polling stay layout-owned.
Responsive + a11y pass:
- Mobile sidebar Sheet gets an sr-only title + description, fixing the Radix
"DialogContent requires a DialogTitle" accessibility error.
- Log rows stack on phones (meta line + full-width message) instead of a
~40px column that broke every few chars; time parses defensively so a
non-ISO value never renders "Invalid Date".
- Process cards stack on phones (info row + actions row) so name / PID / path
stop collapsing to "Q.."; the status badge no longer wraps.
- Config tab strip scrolls horizontally on phones instead of wrapping to
three rows; account strip defaults collapsed ≤lg; header buttons wrap.
- Dialogs keep a 1rem gutter on tiny screens via w-[calc(100vw-2rem)].
- Content widens to 1600px on ≥2xl; account/process grids gain a column at
2xl so >1700px screens aren't mostly empty gutter.
This commit is contained in:
9 files changed
+369
-245
No files matched your search
@@ -37,6 +37,15 @@ const overviewRoute = createRoute({
|
||||
),
|
||||
});
|
||||
|
||||
const processesRoute = createRoute({
|
||||
path: '/processes',
|
||||
getParentRoute: () => appLayoutRoute,
|
||||
component: lazyRouteComponent(
|
||||
() => import('@/components/pages/processes-page'),
|
||||
'ProcessesPage',
|
||||
),
|
||||
});
|
||||
|
||||
const configRoute = createRoute({
|
||||
path: '/config',
|
||||
getParentRoute: () => appLayoutRoute,
|
||||
@@ -65,7 +74,7 @@ const settingsRoute = createRoute({
|
||||
});
|
||||
|
||||
const routeTree = rootRoute.addChildren([
|
||||
appLayoutRoute.addChildren([overviewRoute, configRoute, logsRoute, settingsRoute]),
|
||||
appLayoutRoute.addChildren([overviewRoute, processesRoute, configRoute, logsRoute, settingsRoute]),
|
||||
]);
|
||||
|
||||
export const appRouter = createRouter({
|
||||
@@ -82,4 +91,4 @@ declare module '@tanstack/react-router' {
|
||||
}
|
||||
|
||||
/** Paths registered on the layout — single source of truth for nav metadata. */
|
||||
export type AppPath = '/' | '/config' | '/logs' | '/settings';
|
||||
export type AppPath = '/' | '/processes' | '/config' | '/logs' | '/settings';
|
||||
Reference in new issue
Block a user