add reduce motion toggle and bump to v1.0.1
Add in-app reduce motion setting under Settings > Appearance so users can disable animations without changing their OS preference. Applies a .reduce-motion CSS class to kill all CSS transitions/animations and wraps the app in MotionConfig to globally disable Framer Motion springs, layout animations, and enter/exit transitions. Setting persists to disk. Also removes leftover default Square*.png icons and bumps version to 1.0.1.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { getCurrentWindow, LogicalSize, LogicalPosition } from "@tauri-apps/api/window";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import { AnimatePresence, motion, MotionConfig } from "framer-motion";
|
||||
import { springs, fadeSlideLeft, fadeSlideRight } from "@/lib/motion";
|
||||
import { useAppStore } from "@/stores/app-store";
|
||||
import { useBoardStore } from "@/stores/board-store";
|
||||
@@ -18,6 +18,7 @@ export default function App() {
|
||||
const initialized = useAppStore((s) => s.initialized);
|
||||
const init = useAppStore((s) => s.init);
|
||||
const view = useAppStore((s) => s.view);
|
||||
const reduceMotion = useAppStore((s) => s.settings.reduceMotion);
|
||||
|
||||
const [settingsOpen, setSettingsOpen] = useState(false);
|
||||
const [shortcutHelpOpen, setShortcutHelpOpen] = useState(false);
|
||||
@@ -127,7 +128,7 @@ export default function App() {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<MotionConfig reducedMotion={reduceMotion ? "always" : "user"}>
|
||||
<AppShell>
|
||||
<AnimatePresence mode="wait">
|
||||
{view.type === "board-list" ? (
|
||||
@@ -161,6 +162,6 @@ export default function App() {
|
||||
<SettingsDialog open={settingsOpen} onOpenChange={setSettingsOpen} />
|
||||
<ToastContainer />
|
||||
<ShortcutHelpModal open={shortcutHelpOpen} onOpenChange={setShortcutHelpOpen} />
|
||||
</>
|
||||
</MotionConfig>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user