diff --git a/packages/webui/src/components/layout/main-layout.tsx b/packages/webui/src/components/layout/main-layout.tsx
index 6a39f70a..22e71261 100644
--- a/packages/webui/src/components/layout/main-layout.tsx
+++ b/packages/webui/src/components/layout/main-layout.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState, type ReactNode } from 'react';
import { motion, AnimatePresence } from 'motion/react';
import { useRouterState } from '@tanstack/react-router';
-import { Sheet, SheetContent } from '@/components/ui/sheet';
+import { Sheet, SheetContent, SheetDescription, SheetTitle } from '@/components/ui/sheet';
import { ScrollArea } from '@/components/ui/scroll-area';
import { Sidebar } from '@/components/layout/sidebar';
import { TopBar } from '@/components/layout/top-bar';
@@ -44,6 +44,11 @@ export function MainLayout({ status, onLogout, children }: MainLayoutProps) {
{isMobile && (
+ {/* Radix Dialog (the Sheet primitive) requires an accessible name +
+ description; the nav itself is the visible content, so these are
+ screen-reader-only. */}
+ 导航菜单
+ 切换 SnowLuma 控制台的页面。 setMobileOpen(false)} />
@@ -62,7 +67,7 @@ export function MainLayout({ status, onLogout, children }: MainLayoutProps) {
-
+
('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}
-
+
{saveStatus && (
+
{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',
)}
>
diff --git a/packages/webui/src/components/pages/logs-page.tsx b/packages/webui/src/components/pages/logs-page.tsx
index 6201bc06..05dbe644 100644
--- a/packages/webui/src/components/pages/logs-page.tsx
+++ b/packages/webui/src/components/pages/logs-page.tsx
@@ -21,6 +21,13 @@ const levelClass: Record = {
const LEVELS: LogLevel[] = ['debug', 'info', 'success', 'warn', 'error'];
+/** Show a locale time when the backend sends an ISO timestamp (it does);
+ * fall back to the raw string otherwise so we never render "Invalid Date". */
+function formatTime(t: string): string {
+ const d = new Date(t);
+ return Number.isNaN(d.getTime()) ? t : d.toLocaleTimeString();
+}
+
export function LogsPage() {
const api = useApi();
const [logs, setLogs] = useState([]);
@@ -205,16 +212,19 @@ export function LogsPage() {
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.12 }}
- className="flex gap-2 whitespace-pre-wrap px-3 py-0.5 leading-5 hover:bg-accent/30"
+ className="flex flex-col gap-0.5 px-3 py-1 leading-5 hover:bg-accent/30 sm:flex-row sm:gap-2 sm:py-0.5"
>
-
- {new Date(log.time).toLocaleTimeString()}
-
-
- {log.level.toUpperCase()}
-
- [{log.scope}]
- {log.message}
+ {/* Meta drops to its own line on phones so the message gets
+ the full width instead of a ~40px column that breaks
+ every few characters. On sm+ it's the dense single row. */}
+
+ {processList.map((proc, idx) => {
+ const op = statusOf(proc.pid);
+ const loading = op === 'load' || proc.status === 'loading';
+ const unloading = op === 'unload';
+ const refreshing = op === 'refresh';
+ const busy = op != null || proc.status === 'loading';
+ const isOnline = proc.status === 'online';
+ const canUnload = proc.injected;
+ // Refresh is meaningful whenever a hook may exist (so the user
+ // can re-check the pipe and trigger a reconnect on demand).
+ const showRefresh = proc.injected || proc.status === 'connecting' || proc.status === 'disconnected';
+ return (
+
+ {/* icon + info stay horizontal; on phones the actions drop to
+ a second row so name / PID / path get the full width
+ instead of collapsing to "Q..". */}
+