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:
@@ -92,6 +92,7 @@ export function SettingsDialog({ open, onOpenChange }: SettingsDialogProps) {
|
||||
const setAccentColor = useAppStore((s) => s.setAccentColor);
|
||||
const setUiZoom = useAppStore((s) => s.setUiZoom);
|
||||
const setDensity = useAppStore((s) => s.setDensity);
|
||||
const setReduceMotion = useAppStore((s) => s.setReduceMotion);
|
||||
const setDefaultColumnWidth = useAppStore((s) => s.setDefaultColumnWidth);
|
||||
|
||||
const roRef = useRef<ResizeObserver | null>(null);
|
||||
@@ -268,6 +269,30 @@ export function SettingsDialog({ open, onOpenChange }: SettingsDialogProps) {
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Reduce Motion */}
|
||||
<div>
|
||||
<SectionLabel>Reduce Motion</SectionLabel>
|
||||
<p className="mb-2 text-xs text-pylon-text-secondary">
|
||||
Reduces animations and transitions for accessibility.
|
||||
</p>
|
||||
<div className="flex gap-2">
|
||||
{([false, true] as const).map((value) => (
|
||||
<Button
|
||||
key={String(value)}
|
||||
type="button"
|
||||
variant={settings.reduceMotion === value ? "default" : "outline"}
|
||||
size="sm"
|
||||
onClick={() => setReduceMotion(value)}
|
||||
className="flex-1"
|
||||
>
|
||||
{value ? "Reduced" : "Normal"}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user