mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
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:
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,
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user