Update
This commit is contained in:
@@ -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 =
|
||||
<SquarePen className={`h-8 w-8 ${isEditActive ? 'text-white' : ''}`} />
|
||||
</Button>
|
||||
|
||||
<Button onClick={handleRefresh} variant="outline" size="icon" className="h-12 w-12 rounded-full border shadow-sm">
|
||||
<RefreshCw className="h-8 w-8" />
|
||||
</Button>
|
||||
|
||||
<Button onClick={handleDownloadButton} variant="outline" size="icon" className="h-12 w-12 rounded-full border shadow-sm">
|
||||
<Download className="h-8 w-8" />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user