diff --git a/resources/js/modules/editor/partials/editor-controls.jsx b/resources/js/modules/editor/partials/editor-controls.jsx index c19cabd..12f74de 100644 --- a/resources/js/modules/editor/partials/editor-controls.jsx +++ b/resources/js/modules/editor/partials/editor-controls.jsx @@ -4,10 +4,12 @@ import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; import { useMitt } from '@/plugins/MittContext'; import useVideoEditorStore from '@/stores/VideoEditorStore'; -import { Download, Play, Square, SquarePen } from 'lucide-react'; +import useMediaStore from '@/stores/MediaStore'; +import { Download, Play, Square, SquarePen, RefreshCw } from 'lucide-react'; const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive = false }) => { const { videoIsPlaying } = useVideoEditorStore(); + const { init } = useMediaStore(); const emitter = useMitt(); const handlePlay = () => { @@ -26,6 +28,11 @@ const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive = emitter.emit('open-ai-editor-sheet'); }; + const handleRefresh = () => { + handleReset(); + init(); + }; + const togglePlayPause = () => { if (videoIsPlaying) { handleReset(); @@ -58,6 +65,10 @@ const EditorControls = ({ className = '', onEditClick = () => {}, isEditActive = + +