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.
This commit is contained in:
DrSmoothl committed 2026-06-14 00:41:18 +08:00
1 parent 9dd46198cb
commit 985dfd4705
12 files changed
+363 -33

No files matched your search

+5
View File
@@ -86,7 +86,10 @@ export interface UiAppearance {
/** Corner radius in rem, 0…2. */
radius: number;
density: Density;
/** Soften animations (transforms off, shorter durations). */
reduceMotion: boolean;
/** Hard-disable all UI animations (stronger than reduceMotion). */
disableMotion: boolean;
highContrast: boolean;
sidebarDefaultCollapsed: boolean;
timeFormat: TimeFormat;
@@ -193,6 +196,7 @@ const DEFAULT_APPEARANCE: UiAppearance = {
radius: 0.75,
density: 'cozy',
reduceMotion: false,
disableMotion: false,
highContrast: false,
sidebarDefaultCollapsed: false,
timeFormat: '24h',
@@ -400,6 +404,7 @@ export function normalizeAppearance(value: unknown, imageState: ServerImageState
radius: clampNum(v.radius, 0, 2, DEFAULT_APPEARANCE.radius),
density: oneOf<Density>(v.density, ['cozy', 'compact'], DEFAULT_APPEARANCE.density),
reduceMotion: boolOr(v.reduceMotion, DEFAULT_APPEARANCE.reduceMotion),
disableMotion: boolOr(v.disableMotion, DEFAULT_APPEARANCE.disableMotion),
highContrast: boolOr(v.highContrast, DEFAULT_APPEARANCE.highContrast),
sidebarDefaultCollapsed: boolOr(v.sidebarDefaultCollapsed, DEFAULT_APPEARANCE.sidebarDefaultCollapsed),
timeFormat: oneOf<TimeFormat>(v.timeFormat, ['12h', '24h'], DEFAULT_APPEARANCE.timeFormat),