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:
12 files changed
+363
-33
No files matched your search
@@ -78,7 +78,7 @@ function ToolButton({ label, onClick, children, active, danger, disabled }: Tool
|
||||
|
||||
export function LogsPage() {
|
||||
const api = useApi();
|
||||
const { formatClock } = useTheme();
|
||||
const { formatClock, appearance } = useTheme();
|
||||
const { pages, setPages } = useLayout();
|
||||
const prefs = pages.logs;
|
||||
|
||||
@@ -434,9 +434,9 @@ export function LogsPage() {
|
||||
return (
|
||||
<motion.div
|
||||
key={log.id}
|
||||
initial={{ opacity: 0 }}
|
||||
initial={appearance.disableMotion ? false : { opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ duration: 0.12 }}
|
||||
transition={appearance.disableMotion ? { duration: 0 } : { duration: 0.12 }}
|
||||
className="flex flex-col gap-0.5 px-3 py-1.5 transition-colors hover:bg-accent/40 sm:flex-row sm:items-start sm:gap-3 sm:py-1"
|
||||
style={hl ? { boxShadow: `inset 3px 0 0 ${hl}`, backgroundColor: `color-mix(in oklab, ${hl} 8%, transparent)` } : undefined}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user