Commit Graph
255 Commits
Author SHA1 Message Date
stla 41bad7f24c feat: make #sl status command trigger configurable (exact match, max 32 char) (#138)
* feat: make #sl status command trigger configurable (exact match, max 32 char)

The trigger word for the built-in #sl status command is now configurable
via statusCommand.trigger, with exact case-insensitive matching preserved.

* chore: reject control chars in trigger + add sync assertion
2026-06-25 01:02:17 +08:00
DrSmoothl 84cdd99868 fix(webui): dropped-frame reconcile + split systemInfo cadence + diff-loop unref
Three findings from the adversarial review, all in the WebUI integration:

D: SSE {kind:'dropped'} now triggers a one-shot REST refresh of
   qq-list/processes/connections instead of being silently ignored.
   Reasoning: when createFramePusher drops frames under backpressure, the
   NEXT delivered frame is per-resource (only the resource whose debounce
   timer next fires) — NOT a refresh of all 3. If the dropped frame was
   the only update for a slow-changing resource (e.g. connections stable
   afterwards), the WebUI stays stale until the 30s reconcile. The
   refresh is fire-and-forget; each refresh helper already swallows errors.

E: systemInfo gets its own fast useEffect on the user's pollInterval
   (default 3s). The earlier commit slowed it to 30s claiming the data was
   'daily cadence', but SystemInfo carries live values (uptime,
   cpu.loadAvg, memory.usagePercent, runtime.heapUsed) that the overview
   widget animates — 30s is a visible regression. The other 3 resources
   stay on the 30s SSE-reconcile fallback.

F: connection-diff-loop's setInterval is now .unref()'d (mirrors the
   tokenJanitor pattern at server.ts:462). The discarded handle is now
   commented as intentional — initWebUI has no shutdown path, so the
   handle has no consumer; unref is the right cleanup primitive.

WebUI typecheck clean. 437/437 core suite (no behavior change in core
tests — only the diff-loop file's timer.unref?.() call is new and is
optional-chained so vitest's fake timers don't crash).
2026-06-24 23:05:25 +08:00
DrSmoothl de3bb4817d feat(webui): subscribe to /api/state/stream — push-driven dashboard state
Phase 4 of the SSE migration. The dashboard's three live resources now
update the moment the backend sees a change instead of within 0-3000ms of
the next polling tick.

- New api.stateStream({ onEvent, onStatus }) in lib/api/client.ts mirrors
  the existing openLogStream / openDebugStream EventSource pattern: token in
  the query string (EventSource can't set headers), single onerror →
  'reconnecting' status, source.close() on dispose, JSON.parse with skip-
  malformed isolation. Browser-native EventSource auto-reconnect covers
  transport drops with no manual retry timer.

- StateStreamEvent union covers the three resource frames plus the two
  control frames ('ready' on connect, 'dropped' on backpressure). The
  resource frames carry typed HookProcessInfo[] / QQInfo[] /
  AccountConnections[] payloads.

- AppLayout now subscribes on mount, applies pushed snapshots to the same
  setProcessList / setQqList / setConnections React state slots the polling
  tick used to drive. The REST polling tick is RETAINED but slowed to
  max(pollInterval × 10, 10s) (default 3s → 30s) so it acts as a silent-
  drop reconcile rather than the primary update path. systemInfo isn't on
  the SSE feed — it stays on the slow REST loop.

Resolves the two reported bugs:
  1. new QQ.exe not showing in WebUI until manual refresh → process-
     discovered now publishes 'processes' through the StateBus → frame
     arrives within 50ms.
  2. injection panel stuck at "waiting for connection" after a successful
     hook (group messages arriving) → HookSession 'status-changed' now
     publishes 'processes' → 'online' status frame arrives within 50ms.

WebUI typecheck clean. No unit tests in packages/webui (consistent with the
existing openLogStream/openDebugStream which also have no client tests).
2026-06-24 21:51:35 +08:00
DrSmoothl 1bd126562f chore(release): v1.10.2 2026-06-22 21:31:06 +08:00
DrSmoothl 8b87f80951 chore(release): v1.10.1 2026-06-22 01:45:25 +08:00
stla 907cfddfa3 fix:docker容器正确获取宿主机系统信息 (#119)
* Add function to detect operating system distribution

* Add 'distro' property to system types

* Update subtext in StatTile to show distro instead of platform

* Add Linux distribution detection and architecture normalization

* Add archLabel to SystemInfo interface

* Update subtext to use archLabel instead of arch

* Add distro summarization function and update StatTile

* Refactor distro summary to use tooltip for details

* Refactor host system info detection functions

* Enhance Linux distribution detection logic

* Improve Linux distro detection and version parsing

Enhanced Linux distribution detection logic by adding kernel version parsing and improved source handling for OS release information.

* Enhance kernel and distro version detection on Linux

Refactor kernel version extraction and improve distro version parsing logic.

* Enhance RHEL family detection and error handling

* Enhance distro name formatting in overview-page

* Extend RHEL family detection and supported distros

* Add support for additional Linux distributions

* Enhance OS detection for Armbian and DietPi

Added support for detecting Armbian and DietPi distributions from kernel release strings.

* Add support for Raspbian and DietPi in OS name formatting
2026-06-22 01:39:11 +08:00
DrSmoothl 9efe16237d chore(release): v1.10.0 2026-06-21 20:22:46 +08:00
stla e2415210cd Enhance OS detection and update StatTile for distribution display (#115)
* Add function to detect operating system distribution

* Add 'distro' property to system types

* Update subtext in StatTile to show distro instead of platform

* Add Linux distribution detection and architecture normalization

* Add archLabel to SystemInfo interface

* Update subtext to use archLabel instead of arch

* Add distro summarization function and update StatTile

* Refactor distro summary to use tooltip for details

* Refactor host system info detection functions
2026-06-21 19:45:23 +08:00
DrSmoothl ebadfb968b feat(webui): replace 「侧栏默认折叠」 with 「钉住侧栏展开」 pin option
The old default-collapsed pref went inert once the sidebar became a
hover-expand rail with no collapse button. Repurpose it as an explicit
opt-out: when 「钉住侧栏展开」 is on, the sidebar stays permanently expanded
and no longer collapses to the rail or reacts to hover.

Renamed the appearance field sidebarDefaultCollapsed -> sidebarPinned across
the webui types/defaults/settings UI and the core ui-config interface,
defaults and validator (kept in lock-step so persistence round-trips). Wired
into main-layout: effectiveCollapsed = !editing && !sidebarPinned.
2026-06-20 23:37:21 +08:00
DrSmoothl bba9b82ce9 feat(webui): hover-expand sidebar rail + borderless nested-canvas chrome
Reshape the desktop shell to feel less "boxed-in", keeping the original
visual design — boundaries now read via depth/tone, not hard borders.

- Sidebar rests as a 64px icon rail and auto-expands on hover (or keyboard
  focus-visible), pushing the content rather than overlaying it. Removes the
  explicit collapse button; resting state is the rail (`effectiveCollapsed =
  !editing`), so it always auto-collapses on mouse-leave.
- Drop hard region borders: sidebar border-r and topbar border-b/divider are
  gone; the rail blends into a sidebar-toned chrome.
- Sidebar internal cleanup: brand border, the footer Separator, the update
  card / edit-item / 完成 button borders removed; active nav indicator is now
  a soft pill + sliding 2px primary left bar (layoutId).
- Content is a nested canvas with a rounded top-left corner at the
  sidebar/topbar junction, lifted via a soft shadow; the corner slides with
  the rail since the canvas is its flex sibling.

Note: the 「侧栏默认折叠」 appearance toggle (settings-page) is now inert for
the main nav sidebar — to be repurposed as "pin open" or removed in a follow-up.
2026-06-20 23:30:08 +08:00
DrSmoothl d0498de966 fix(webui): make the consent agree-checkbox clearly visible
The 16px faint-bordered box + muted label read as nearly invisible. Make it a
full-width bordered row: a larger (20px) border-2 checkbox with a white unchecked
fill, a checked primary tint on the whole row, and the primary label in
foreground weight (English subtitle stays muted).
2026-06-19 02:32:10 +08:00
DrSmoothl 67c99e1e32 feat(webui): EULA/PRIVACY consent gate — frontend
ConsentPage shown after login, before the forced password change: tabbed
EULA/PRIVACY rendered by an in-house, dependency-free markdown renderer
(React elements only, XSS-safe; single-pass bounded-class inline parser to
avoid ReDoS on large docs). App gate order is login -> consent -> password ->
app; api client gains agreements.get / recordConsent with a 409 stale-version
re-prompt that refetches the new text.
2026-06-19 02:27:04 +08:00
DrSmoothl f71ed2e4db chore(license): source-available non-commercial license
Switch from open-source to a NapCat-style source-available, NON-commercial
license so the free software cannot be resold / paid-deployed — which an OSI
license (AGPL included) cannot prevent. Source stays public for study and
non-commercial self-hosting; commercial use and public release of modifications
require written permission; the native addon (snowluma-*.node) is carved out as
proprietary. Explicitly NOT OSI open source.

- LICENSE: SnowLuma Source-Available Non-Commercial License v1.0 (bilingual)
- all 14 package.json: "license": "SEE LICENSE IN LICENSE"
- README license section; CONTRIBUTING contribution-licensing note + a grant
  letting the project relicense contributions under commercial terms
  (contributors keep copyright)
2026-06-19 02:26:33 +08:00
DrSmoothl dfb6aa54c7 chore(release): v1.9.13 2026-06-18 17:16:15 +08:00
渡辺鳩P 06c8954881 feat(notifications): default body template → Server酱 JSON (title/desp) (#108)
- Change DEFAULT_BODY_TEMPLATE from plaintext to Server酱-style JSON
- Add JSON-safe escaping in renderTemplate for backslashes and quotes
- Update frontend DEFAULT_TEMPLATE to match backend
- Add tests for JSON escaping behavior

Fixes #106 (targets dev branch)
2026-06-18 16:10:09 +08:00
DrSmoothl c637329884 fix(webui): a11y for debug page controls (match project standard)
Adversarial pass (MINOR): the new Segmented/IconBtn regressed a11y vs the
project's existing Segmented. Add role=radiogroup/radio + aria-checked to the
segmented control, type="button" to all buttons (segmented, icon, execute,
row toggle), aria-label to icon buttons, aria-expanded to the row toggle.
2026-06-18 15:48:21 +08:00
DrSmoothl f153781208 feat(webui): promote debug to a standalone page, Apple-style redesign
Move the debug console out of the Settings 调试 subtab into a dedicated
top-level /debug page (sidebar nav + route + AppPath), and redesign it in an
Apple-HIG flavour: translucent sticky header with title block + connection
pill, soft layered cards (rounded-2xl, hairline borders, blurred backdrop),
an iOS-style segmented control with a sliding active pill (params form/JSON,
stream all/event/action filter), refined timeline rows + empty state, calm
type hierarchy with tabular-nums. Logic (tester + live SSE) carried over
verbatim. Remove the old settings/debug-panel + the Settings 'debug' subtab.
2026-06-18 15:44:05 +08:00
DrSmoothl fae2f75525 feat(webui): debug panel — action tester + live stream (Wave A3)
New Settings → 调试 tab (DebugPanel): an action tester (account picker +
schema-driven form from /api/debug/actions, with a raw-JSON escape hatch for
legacy actions, real-side-effect warning) and a live merged SSE view of OneBot
events + action calls (pause / clear / kind filter, expandable JSON, drop
marker). Typed debug API client domain (actions/invoke/stream over EventSource
with ?token=). View layer — verified by tsc + vite build.
2026-06-18 15:25:34 +08:00
DrSmoothl 0c20d58a8c feat(webui): backup/restore UI in system settings (Wave A2)
A '配置备份 / 恢复' card in the 服务 tab: export downloads the JSON bundle
(with an 包含登录凭据 toggle + red warning), restore picks a .json file and
calls importBackup with a 一并恢复登录凭据 toggle (default off). Shows
restored/skipped counts + restart-to-apply. Typed systemSettings.exportBackup/
importBackup client methods. View layer — verified by tsc + vite build.
2026-06-18 15:01:17 +08:00
DrSmoothl a38b33c8aa feat(webui): Select/Textarea UI components + hide installed TLS cert
Add reusable Select (styled native select + chevron) and Textarea components
matching Input's design language, and replace every native <select>/<textarea>
across the app (system-panel, node-edit-dialog, notification-channel-dialog,
settings customCss, widget note) with them.

TLS cert UX: once a cert is installed, the sensitive PEM is no longer rendered
on revisit — show an '已安装(未改变)' summary with 更改/删除 buttons; 更改
reveals the inputs again (with a 取消). Private key is never sent back to the
client. Verified by tsc + vite build.
2026-06-18 14:53:43 +08:00
DrSmoothl 82d5f782a3 feat(webui): system settings panel (port/host/TLS/trust-proxy)
New Settings → 服务 tab (SystemPanel) over the /api/system/settings + TLS cert
API: edit port / bind host / trust-proxy, paste cert+key PEM to enable HTTPS,
delete cert. Flags env-overridden fields ('被环境变量覆盖') and shows a
restart-to-apply banner (no self-restart). Typed systemSettings API client
domain. View layer — verified by tsc + vite build (webui has no component-test
infra).
2026-06-18 14:39:35 +08:00
DrSmoothl 16920b4444 chore(release): v1.9.12 2026-06-16 21:59:31 +08:00
DrSmoothl f014defd54 feat(notifications): node-config-style channel manager + lock disabled-channel opt-in
Settings → 通知 now mirrors the node-config UX: info-only channel cards
(name / id / url / template + an inline enable toggle), create + edit via a
dialog, and all changes debounced-auto-save (no save button). The save path
is generation-guarded so a superseded in-flight save can't clobber a newer
edit; the test action flushes the pending save first so it never hits an
unsaved channel. The channel id is locked while editing to keep per-account
channelIds references from orphaning.

Per-account opt-in: a globally-disabled channel's toggle is now locked +
forced off (it can never fire). The id is kept in channelIds — the backend
already filters disabled channels — so re-enabling globally restores the
prior selection.

New: notification-channel-dialog.tsx. webui typecheck + build green.
Adversarial review: 0 blockers / 0 should-fix (2 nits applied).
2026-06-16 21:54:19 +08:00
DrSmoothl 0b7fb0c69d feat(notifications): P4 WebUI — channel manager, per-account opt-in, deliveries widget
- API client: notifications surface (getConfig/saveConfig/recent/test) + types.
- Settings → 通知 tab: global channel CRUD (id/name/url/body-template/enabled) +
  global debounce window, per-channel test-send, dirty-tracked save; invalid
  channels (bad slug / non-http URL) are dropped server-side and surfaced.
- Per-account 通用设置: opt-in toggles bound to notifications.channelIds, riding
  the ConfigPage's existing debounced autosave; stale opt-ins preserved.
- Overview: opt-in 最近投递 widget (polls /api/notifications/recent, read-only).
  Hidden-by-default set is now DERIVED from the catalogue (defaultVisible) and
  shared by desktop + mobile reconcile — replaces the hardcoded STATIC_WIDGET_IDS
  so a new opt-in widget can't reappear unbidden on existing mobile dashboards.

Typecheck + build green. Adversarial review: 1 should-fix (mobile hidden-set) +
2 nits found, fixed/triaged, and re-verified clean.
2026-06-16 19:53:31 +08:00
DrSmoothl fb567177b4 feat(webui): Apple-widgets dashboard editor — gallery drag in/out
Reworks the desktop overview edit UX from per-card show/hide toggles to an
Apple-widgets model:

- The grid shows only the widgets that are on it; hidden ones live in a new
  right-side 部件库 ("store") panel that slides in during edit mode.
- Add: drag a gallery tile onto the canvas (HTML5 DnD) — dropped at the cursor
  cell, driven entirely through React state.
- Remove ("hide"): drag a card back onto the gallery (gridstack `removable`).
  Move/resize/remove all funnel through one onChange writer that derives removal
  from a block's absence in the grid snapshot — no separate handler, no state
  race.
- Card affordance: the big top "notch" bar is gone. Edit mode now shows two
  small square corner icons — a subtle semi-transparent drag hint (top-left, the
  whole card stays draggable) and the settings gear (top-right, configurable
  widgets only). The eye toggle is removed.

Mobile is unchanged (single-column reorder panel) — the gallery drag UX is
desktop-only by design.
2026-06-16 14:57:39 +08:00
DrSmoothl 7355fe9ea4 feat(webui): log buffer export + view presets (B3)
- 导出当前视图: a toolbar button dumps the current (filtered) log view to a
  client-side `.log` text file — no server endpoint, respects the active level
  filter + search.
- 视图预设: 开发 / 运维 / 精简 presets bundle the existing display prefs
  (visibleLevels / maxLines / autoScroll / wrap); a new `UiLogsPrefs.preset`
  field stores the active id. Any hand edit to those prefs drops to 自定义.
  The client owns the preset→prefs bundles; the server just stores + validates
  the id (oneOf, defaults custom). No non-chronological reordering, per plan.
2026-06-16 14:36:02 +08:00
DrSmoothl 1a0bc12ec0 feat(webui): kiosk (展示模式) for chrome-free wall displays (B2)
A session-sticky kiosk mode for showing the dashboard on a wall display:

- Entry: `?kiosk=1` URL param (stripped after read) or a top-bar button
  (toggleable via topbarItems 'kiosk').
- Hides the sidebar + top bar (MainLayout) and any in-content edit entry marked
  data-kiosk-hide (the overview 编辑布局 toolbar) via an html[data-kiosk] CSS rule.
- Exit: Esc key or a dim corner button.

Purely cosmetic — never touches auth and issues no token. A new KioskProvider
(sessionStorage-backed, mounted under LayoutProvider) owns the state.

Completes the B2 dashboard/components batch.
2026-06-16 14:32:57 +08:00
DrSmoothl 72e0d6bcca feat(webui): static note / link / account widgets (B2)
Three opt-in static widgets join the GRID_WIDGETS catalogue (hidden by default
— enabled from the layout editor), with content stored in block.config:

- 便签 (note): pre-wrap plain text, capped at 4000 chars (under the server's
  4096-byte config cap). No Markdown.
- 链接卡 (link): label + http(s)-only url (javascript:/data: rejected) + an
  icon from a curated lucide set; renders as a clickable card.
- 账号快捷卡 (account): a specified uin's avatar/nickname/online dot, with a
  datalist of connected accounts in the config form.

GridWidgetSpec gains `defaultVisible`, honored by defaultOverviewGrid/Mobile and
migrateOverviewBlocks; reconcileLayoutItems gains a `hiddenByDefault` set so the
mobile catalogue appends these hidden too. parse* validators keep config total
over corrupt input.
2026-06-16 14:28:56 +08:00
DrSmoothl 60d1f0b04f feat(webui): config forms for host + connections widgets (B2)
Adds the gear config form to two more overview widgets (stat tiles stay
form-less, per plan):

- 主机资源 (host): toggle which resource panels show (CPU / 内存 / 运行进程);
  the grid column count tracks the visible panel count, and an all-off config
  falls back to all-on (no empty card).
- OneBot 连接 (connections): filter by account nickname/uin, an "仅显示异常端点"
  toggle (drops healthy adapters and emptied accounts), and sort by 默认 /
  名称 / 异常优先 (worst status first).

Both register in CONFIGURABLE_WIDGETS with parse* validators, render via the
existing dialog, and surface on mobile through the same per-widget config map.
2026-06-16 14:24:21 +08:00
DrSmoothl 23048894b5 feat(webui): top-bar element show/hide (B2)
The top-bar's optional right-side elements (connection-status badge, theme
toggle) are now toggleable via `topbarItems`. Essential controls — the
menu/collapse button, page title, and logout — always render and aren't listed.

- A TOPBAR_CATALOGUE (id+label) drives both the render gating and the settings
  toggles; TopBar reconciles `topbarItems` against it so a new element defaults
  to shown.
- A 顶栏 group in settings → 外观 exposes one switch per catalogue element.
2026-06-16 14:20:23 +08:00
DrSmoothl 754621de04 feat(webui): independent single-column mobile overview (B2)
Phones now render the overview from the dedicated `overviewMobile` ordering
instead of deriving a 1-column view from the desktop grid — the two layouts are
fully disjoint, so reordering on a phone never touches grid coords and vice
versa.

- View mode reuses DashboardGrid (drag disabled, cols=1), stacking each widget
  at its catalogue height via a pure prefix-sum, so cards keep their cell
  sizing. Per-widget config is shared with the desktop blocks.
- Edit mode surfaces a motion `Reorder` drag-sort panel (grip + show/hide eye +
  config gear for configurable widgets) — no 2D drag on mobile, per plan.
- The 编辑布局 toggle now appears on mobile too, with a mobile-specific hint.

Order/visibility reconciles against the live widget catalogue, so a widget
added later just appears on phones as well.
2026-06-16 14:18:40 +08:00
DrSmoothl 45d651614b feat(webui): layout schema for mobile overview + topbar items (B2)
Schema foundation for the B2 dashboard batch, mirroring the navItems shape:

- `overviewMobile: UiLayoutItem[]` — a separate single-column (id+visible)
  ordering for phones, kept fully disjoint from the desktop 2D `overviewBlocks`
  grid so mobile ordering never pollutes grid coords.
- `topbarItems: UiLayoutItem[]` — show/hide list for toggleable top-bar
  elements (status badge, theme toggle, kiosk button); essential elements stay
  pinned in the consumer.

Server `normalizeLayout` round-trips both (idOr + dedup, total over corrupt
input); defaults seed first run. `LayoutContext` exposes them with
setOverviewMobile/setTopbarItems setters and reconcile-on-consume semantics, so
adding a widget/element later just appears. Old configs lacking the fields fall
back to defaults on load.

Consumers (mobile render, topbar render + config, drag-sort panel) land in
follow-up B2 commits.
2026-06-16 14:14:03 +08:00
DrSmoothl 6d4e8538ea fix(ui): add focus-visible ring to ToggleSwitch and Sheet close (B1)
Keyboard-a11y polish to match the codebase's standard
`focus-visible:ring-[3px] focus-visible:ring-ring/40` treatment:

- ToggleSwitch (role=switch, used across every settings/config surface) had
  no focus-visible ring — keyboard users got no focus indicator.
- Sheet's close button used a bare `focus:outline-none`; now mirrors the
  Dialog close button's ring.

Slider, Button, Input, Select, Tabs, Checkbox, Switch already carry the ring.
2026-06-16 14:10:04 +08:00
DrSmoothl 636189d7c9 feat(webui): CSS snippet templates + low-contrast accent advisory (B1)
- Custom-CSS editor stays a plain <textarea> (native Cmd/Ctrl+Z undo) but
  gains insert-at-cursor template buttons (string-constant snippets) and a
  best-effort on-blur validation that warns on unbalanced braces or CSS that
  parses to zero rules. Never blocks saving; ?safe-mode=1 remains the escape.

- Accent picker: choosing a custom colour whose contrast against the canvas
  falls below WCAG 3:1 surfaces a one-time (per-session) advisory offering to
  revert. Pure-advisory — applies immediately, no persistent banner, no nag.
2026-06-16 14:08:09 +08:00
DrSmoothl 5b07f518cc feat(webui): custom fonts + theme-variable override panel (B1)
Adds two appearance customizations from the WebUI plan's B1 batch:

- Custom fonts: new `fontSansCustom`/`fontMonoCustom` free-form family
  fields (mirroring accent's preset/custom dual-field). A "自定义" segment
  reveals a text input; on Chromium it gets a native <datalist> of installed
  fonts via `queryLocalFonts()`, feature-detected with a silent fallback to
  a plain text box on Firefox/Safari/mobile. No font-file uploads.

- Theme-variable panel: new `cssVars` map lets the operator override
  individual theme tokens (background/foreground/primary/…) with colour
  pickers, layered last over palette+accent. Both keys (token whitelist) and
  values (hex/named/functional colour) are validated, so — unlike customCss —
  this stays safe to serve to the unauthenticated login page.

Server `normalizeAppearance` gains `fontFamilyOr` (rejects control
chars/injection) and `normalizeCssVars` (whitelist keys + colour-only values,
total over corrupt input). Client `ThemeContext` re-validates defensively
(the localStorage cache is locally tamperable) before injecting into CSS.

Tests for the new normalizers land with the B4 batch.
2026-06-16 14:04:59 +08:00
DrSmoothl 7e59dbf79b chore(release): v1.9.11 2026-06-15 13:57:38 +08:00
DrSmoothl ee8eb928b3 chore(release): v1.9.10 2026-06-14 16:28:39 +08:00
DrSmoothl 8f61b1486e feat(webui): Apple-style overview pass + roomier stat tiles
- Grid row height 80→108px so a 1-row stat tile's icon + 3 text lines clear
  the padding with real breathing room (the previous fix still clipped ~8px);
  stat tile gets an airier layout (size-10 icon, text-lg value, py-3.5).
- Carry the app's Apple language across the homepage: inner surfaces and
  empty-state containers round to xl, empty-state icons calm to size-8/opacity,
  edit hint + first-run nudge rounded consistently.
2026-06-14 16:20:19 +08:00
DrSmoothl 44a29c6ee4 feat(webui): OLED/accent/palette theming fixes + light-dark reveal
- OLED: toggle switch off-track is now a neutral foreground tint with a white
  knob (was invisible bg-muted + bg-background on pure black); the OLED sidebar
  override is scoped to sidebar-style=follow so panel/accent work in OLED too.
- Accent: the chosen accent now also tints the selected-state surfaces
  (--accent / --sidebar-accent) so the sidebar active item and settings nav
  rail follow it — default palette only, respecting accent scope.
- Palettes: add 6 more soft schemes (Rosé Pine / Moon / Dawn, Nord, Everforest
  dark + light) via a pal() builder; schema unions + normalizer + bootstrap
  light/dark classification updated to match.
- Light/dark switch now animates: a circular View Transitions reveal from the
  click (mode/palette/intensity changes only; gated off under reduced/disabled
  motion; instant fallback where the API is absent).
2026-06-14 16:20:05 +08:00
DrSmoothl 84021a19dc feat(webui): deep-link settings tabs via ?tab= and jump update banner to 关于
The settings sub-tab now lives in the URL (typed `?tab=` search param on the
/settings route, validated against the tab whitelist; default 外观 omits it).
The active tab is derived from the URL and tab clicks navigate (replace), so
tabs are shareable/back-button friendly. The sidebar "有新版本可用" banner now
links to /settings?tab=about, landing directly on 关于 (where 软件更新 lives)
instead of the default settings tab.
2026-06-14 15:45:42 +08:00
DrSmoothl df0b79a87d feat(webui): restyle login page with Apple-style vibrancy
- Frosted "vibrancy" card (bg-card/65 + backdrop-blur-2xl) floating over the
  wavy background, with a centered brand focal point (logo tile, name,
  version, subtitle).
- Larger rounded fields/button (h-12, rounded-xl) for a calmer iOS feel.
- The "我觉得这个界面很卡怎么办?" help line becomes a 灵动岛-style frosted
  capsule (rounded-full, blur, float, spring on hover/tap).
- New entrance/hover motion gated on reduceMotion/disableMotion.
2026-06-14 00:47:56 +08:00
DrSmoothl dc26cc93ba fix(webui): hide native Edge password reveal control on login
The login password field showed two eye icons — our custom show/hide
toggle plus Edge/IE's native ::-ms-reveal. Hide the native reveal/clear
pseudo-elements so only our toggle remains.
2026-06-14 00:46:46 +08:00
DrSmoothl 985dfd4705 feat(webui): animated login background + three independent motion settings
Login page now has a mouse-reactive wavy-line background (ported a-waves +
embedded Perlin noise, themed to the accent, rendered behind the card which
sits on a 95%-opaque blurred surface so content stays readable). A "我觉得这个
界面很卡怎么办?" link opens a dialog that toggles it off — a device-local
preference (localStorage, works pre-auth, defaults off when the OS prefers
reduced motion), independent of the system motion settings.

Motion settings are now three:
- 关闭登录页的动效 — the login background toggle above (device-local).
- 减弱动效 (reduceMotion) — soft: transforms/springs off, durations
  collapsed, page/sidebar instant; gentle entrance fades remain.
- 关闭全部动效 (disableMotion, NEW appearance field) — everything reduce does
  plus data-no-motion CSS (kills pulse dots; spinners excluded so "busy"
  stays legible) and the entrance opacity fades gated off across
  overview/processes/logs/config lists.
2026-06-14 00:41:18 +08:00
DrSmoothl 9dd46198cb feat(webui): custom scrollbars + sliders, stat-tile fit, reduce-motion
- Scrollbars: theme native scrollbars (thin, token-colored thumb) for plain
  overflow containers; Radix ScrollArea keeps its own custom bar (it hides
  the native one, so no double bar).
- Sliders: new <Slider> component + `.slider` CSS replaces the native range
  inputs (UI scale / mask opacity / blur). Filled track + ring-bordered
  thumb, themed; input height matches the track so the thumb centers in every
  engine; Firefox fills via ::-moz-range-progress.
- Stat tiles: tighten the h=1 tile (py-2 + mt-0.5) so the three text lines +
  padding fit the 80px cell without hugging the border.
- Reduce motion: gate the always-present sidebar-width + page-transition
  animations to instant when enabled (Framer's reducedMotion only suppresses
  transforms, so these needed an explicit opt-out); kill the slider thumb
  transition too.
2026-06-14 00:16:26 +08:00
DrSmoothl 7d647e0ed7 feat(webui): redesign settings About panel in the Apple style
Split the single centered card into a clean three-section stack consistent
with the rest of settings:

- Brand hero card: logo glow + name + version pill + tagline/description.
- "软件更新" grouped list (reuses Group/SettingRow): current-version row +
  check-update row (status dot/spinner + 重新检查); when an update exists, a
  tinted detail block with version, notes, platform asset hint and 前往下载.
- Support card: refined Star CTA + repo/releases/issues links.

UpdateStatus → UpdateGroup; all update states (checking/disabled/error/
latest) preserved.
2026-06-13 23:50:55 +08:00
DrSmoothl e93a17de78 feat(webui): add Catppuccin Latte/Frappé/Macchiato/Mocha palettes
Add a "配色方案" picker offering the four Catppuccin flavors as full color
schemes alongside the default sky theme.

- Schema: new `palette` field on UiAppearance (core + client mirror),
  normalized to a 5-value whitelist defaulting to 'default'.
- Apply: each flavor's base/surface tokens are injected into the shared
  theme stylesheet over :root (Latte) or .dark (the three dark flavors);
  accent (--primary/--ring) stays separate so it composes. A flavor fixes
  light/dark (Latte→light, rest→dark), overriding `mode`, and forces
  dark-intensity to soft so the OLED "black" rule can't fight the palette.
  sidebar-style + high-contrast still compose (higher specificity).
- Pre-paint bootstrap is palette-aware (no light↔dark flash on reload).
- Settings: swatch-preview picker; mode + dark-intensity controls disable
  while a flavor is active. The top-bar ThemeToggle hides then (it would be
  inert under a fixed-scheme palette).
2026-06-13 23:42:16 +08:00
DrSmoothl de598242ab feat(webui): apply Apple-style polish to processes + config pages
Carry the logs/settings visual language across the remaining pages:

- Processes: sort control becomes a segmented radiogroup; action banner
  gains a spinner; cards round to xl with a hover tint; calmer empty state.
- Config: save status collapses from bordered pills into one inline
  dot/spinner indicator; node summary rows round to xl with hover and
  fold the three flag badges into a single muted "数组 · 不上报自身 · 已设
  Token" line; empty states round to xl; account rail rounds to xl.

Presentational only — all state wiring and handlers unchanged.
2026-06-13 23:25:11 +08:00
DrSmoothl 3d480fb018 feat(webui): redesign settings page with macOS-style two-pane UX
Rework the settings page around the macOS System Settings layout, reusing
existing UI tokens (no new deps):

- Two-pane: a sticky left nav rail (w-52) on lg, a wrapping tab strip on
  mobile. Active section mirrors the app sidebar's selected style.
- Grouped inset lists: each Card is a header above a hairline-divided list
  of label-left / control-right rows (SettingRow: auto / inline / stack),
  replacing the stacked Field + Separator spam.
- Refined segmented control: recessed track with a raised pill on the
  selected segment (font-semibold + full ring so it survives high-contrast
  / OLED); exposed as a proper radiogroup (role=radio + aria-checked) and
  named via the row label through a small context + useId.
- Per-section fade transition; section heading anchors the detail pane.

Wide controls (时制, 深色强度, fonts, radius scale, poll interval, default
route) stack so they don't crowd their labels; password-saved confirmation
keeps its success color. All settings preserved 1:1.
2026-06-13 23:15:38 +08:00
DrSmoothl 5b253ea1d5 feat(webui): redesign logs page with Apple-style UX
Rework the run-log viewer around progressive disclosure and a calmer,
content-first hierarchy, reusing existing UI tokens (no new deps):

- Toolbar: live status dot (red when disconnected) replaces the badge;
  real search field with inline icon + clear; icon-only actions with
  tooltips, grouped (toggles in a track · divider · data actions).
- One always-visible segmented level filter (iOS-style raised pill +
  colored dot) instead of strikethrough pills.
- Collapse the server-level switch + highlight-rule editor into a single
  animated "选项" panel; server level also surfaced in the subtitle. The
  control area drops from three rows to one.
- Log stream: subtle sticky column header (时间/级别/模块/消息) aligned to
  rows via a sm:contents trick, dot-style level indicators, hairline row
  separators, and distinct empty / no-match states.

a11y: radiogroup on color swatches, aria-pressed on level toggles,
unique remove-button labels, focus rings on all controls.
2026-06-13 23:00:22 +08:00
DrSmoothl a61e0a253d feat(webui): in-place dashboard edit overlays + inline sidebar reorder
Rework the layout edit mode from a separate panel to in-place affordances:
- Each dashboard widget gets a semi-transparent floating overlay in edit mode:
  a "拖动" grip bar (the whole card is the drag target — forgiving +
  discoverable), an eye to show/hide, and a gear that opens the per-widget
  settings in a dialog. Hidden widgets show as re-enableable "已隐藏" ghosts;
  the bottom-right resize grip is now clearly visible.
- The sidebar nav becomes a drag-to-reorder list directly in the sidebar
  (show/hide + locked pinned items + a 完成 button); editing force-expands the
  sidebar (and disables the collapse toggle). Edit mode is a shared
  LayoutContext flag so one "编辑布局" toggle drives both the grid and the nav.
- The separate editor panel (overview-layout-editor) is removed; the gear
  opens config in a dialog instead.

Also: stat-tile typography tightened (leading-tight, smaller value, overflow
clip) so text no longer hugs the edge on small/short tiles. Verified by an
adversarial review round (no MUST-FIX).
2026-06-13 21:45:41 +08:00