feat: add mobile swipe-back navigation and gestures

- Implement swipe-to-close for mobile modals and dialogs
- Add PageTransition component with push/pop animations
- Create navigation store for managing navigation state
- Add useNavigationDirection hook for animation direction
- Implement useSwipeToClose hook for swipe gestures
- Add prefers-reduced-motion accessibility support
- Create FileBrowserSheet component for mobile file browser
- Add comprehensive tests for swipe behavior and navigation
- Update FileBrowser, Dialog, and BackButton components
- Configure Vite for proper CSS handling
This commit is contained in:
Chris Scott committed 2026-04-15 12:44:33 -04:00
1 parent 46731210e8
commit 9d94c333b4
23 files changed
+1684 -161

No files matched your search

@@ -11,7 +11,7 @@ import { Dialog, DialogContent } from '@/components/ui/dialog'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
import { Settings2, Keyboard, Code, ChevronLeft, Key, GitBranch, User, Volume2, Bell, X } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { useSwipeBack } from '@/hooks/useMobile'
import { useSwipeToClose } from '@/hooks/useMobile'
import { useSettingsDialog } from '@/hooks/useSettingsDialog'
type SettingsView = 'menu' | 'general' | 'git' | 'shortcuts' | 'opencode' | 'providers' | 'account' | 'voice' | 'notifications'
@@ -30,7 +30,7 @@ export function SettingsDialog() {
}
}, [mobileView, close])
const { bind: bindSwipe, swipeStyles } = useSwipeBack(handleSwipeBack, {
const { bind: bindSwipe, swipeStyles } = useSwipeToClose(handleSwipeBack, {
enabled: isOpen,
})