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

@@ -9,6 +9,7 @@ import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { ToggleSwitch } from '@/components/ui/toggle-switch';
import { cn } from '@/lib/utils';
import { useTheme } from '@/contexts/ThemeContext';
import type { AdapterCommon } from './defaults';
import type { AdapterStatus } from '@/types';
@@ -47,12 +48,13 @@ export function NodeSummaryCard<T extends AdapterCommon>({
}: NodeSummaryCardProps<T>) {
const enabled = item.enabled !== false;
const blankName = !item.name?.trim();
const off = useTheme().appearance.disableMotion;
return (
<motion.div
initial={{ opacity: 0, y: 4 }}
initial={off ? false : { opacity: 0, y: 4 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.18 }}
transition={off ? { duration: 0 } : { duration: 0.18 }}
className={cn(
'flex flex-col gap-2 rounded-xl border bg-card/40 p-3.5 transition-all hover:bg-accent/20 sm:flex-row sm:items-center sm:gap-3',
!enabled && 'opacity-60',