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:
DrSmoothl committed 2026-05-30 16:56:34 +08:00
1 parent 3cfac51811
commit 71be3ae2e1
9 files changed
+369 -245

No files matched your search

@@ -56,7 +56,11 @@ export function ConfigPage() {
});
const [activeTab, setActiveTab] = useState<TabKey>('general');
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
// Default the account strip to its 56px avatar-only form on narrow screens
// (≤lg) so the editor pane isn't squeezed; the user can still expand it.
const [sidebarCollapsed, setSidebarCollapsed] = useState(
() => typeof window !== 'undefined' && window.matchMedia('(max-width: 1024px)').matches,
);
const [confirmSave, setConfirmSave] = useState(false);
// The edit dialog is modal and blocks every other click in the page,
// so `selectedUin` cannot change while it's open — no defensive close
@@ -244,7 +248,7 @@ function HeaderBar({ selectedUin, dirty, saveStatus, onSave, activeTab, onCreate
UIN {selectedUin}
</code>
</div>
<div className="flex items-center gap-2">
<div className="flex flex-wrap items-center gap-2">
{saveStatus && (
<span
className={cn(
@@ -288,7 +292,7 @@ interface TabStripProps {
function TabStrip({ activeTab, onChange, counts }: TabStripProps) {
return (
<div className="flex flex-wrap gap-1 border-b">
<div className="flex gap-1 overflow-x-auto border-b [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
{ALL_TABS.map((key) => {
const label = key === 'general' ? '通用设置' : NETWORK_TABS[key].title;
const count = key === 'general' ? null : counts[key];
@@ -299,7 +303,7 @@ function TabStrip({ activeTab, onChange, counts }: TabStripProps) {
type="button"
onClick={() => onChange(key)}
className={cn(
'group relative inline-flex items-center gap-1.5 px-3 py-2 text-sm transition-colors cursor-pointer',
'group relative inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap px-3 py-2 text-sm transition-colors cursor-pointer',
active ? 'text-foreground' : 'text-muted-foreground hover:text-foreground',
)}
>