diff options
| author | Kha Nguyen <hi@khanguyen.com> | 2025-07-24 17:08:33 -0500 |
|---|---|---|
| committer | Kha Nguyen <hi@khanguyen.com> | 2025-07-24 17:10:39 -0500 |
| commit | 8dcbbfa25245624cfaa1f8b8b1a21c6c4e29d993 (patch) | |
| tree | 6d5e8268b98bea8fda8356a817a0662730613cb5 /apps/web/src/hooks/use-editor-actions.ts | |
| parent | 8e737d87e0accbf1d433f4c8b1e8e0f125849799 (diff) | |
| parent | 65c3f9f7f78f787262a88c75b96a118ca5bee15c (diff) | |
| download | opencut-8dcbbfa25245624cfaa1f8b8b1a21c6c4e29d993.tar.gz | |
Merge branch 'main' into fix/project-title-styling
Diffstat (limited to 'apps/web/src/hooks/use-editor-actions.ts')
| -rw-r--r-- | apps/web/src/hooks/use-editor-actions.ts | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/apps/web/src/hooks/use-editor-actions.ts b/apps/web/src/hooks/use-editor-actions.ts index 4e8f6aef..b2fad55f 100644 --- a/apps/web/src/hooks/use-editor-actions.ts +++ b/apps/web/src/hooks/use-editor-actions.ts @@ -28,52 +28,52 @@ export function useEditorActions() { // Playback actions useActionHandler("toggle-play", () => { toggle(); - }); + }, undefined); useActionHandler("stop-playback", () => { if (isPlaying) { toggle(); } seek(0); - }); + }, undefined); useActionHandler("seek-forward", (args) => { const seconds = args?.seconds ?? 1; seek(Math.min(duration, currentTime + seconds)); - }); + }, undefined); useActionHandler("seek-backward", (args) => { const seconds = args?.seconds ?? 1; seek(Math.max(0, currentTime - seconds)); - }); + }, undefined); useActionHandler("frame-step-forward", () => { const projectFps = activeProject?.fps || 30; seek(Math.min(duration, currentTime + 1 / projectFps)); - }); + }, undefined); useActionHandler("frame-step-backward", () => { const projectFps = activeProject?.fps || 30; seek(Math.max(0, currentTime - 1 / projectFps)); - }); + }, undefined); useActionHandler("jump-forward", (args) => { const seconds = args?.seconds ?? 5; seek(Math.min(duration, currentTime + seconds)); - }); + }, undefined); useActionHandler("jump-backward", (args) => { const seconds = args?.seconds ?? 5; seek(Math.max(0, currentTime - seconds)); - }); + }, undefined); useActionHandler("goto-start", () => { seek(0); - }); + }, undefined); useActionHandler("goto-end", () => { seek(duration); - }); + }, undefined); // Timeline editing actions useActionHandler("split-element", () => { @@ -98,7 +98,7 @@ export function useEditorActions() { toast.error("Playhead must be within selected element"); } } - }); + }, undefined); useActionHandler("delete-selected", () => { if (selectedElements.length === 0) { @@ -110,7 +110,7 @@ export function useEditorActions() { } ); clearSelectedElements(); - }); + }, undefined); useActionHandler("select-all", () => { const allElements = tracks.flatMap((track: any) => @@ -120,7 +120,7 @@ export function useEditorActions() { })) ); setSelectedElements(allElements); - }); + }, undefined); useActionHandler("duplicate-selected", () => { if (selectedElements.length !== 1) { @@ -144,18 +144,18 @@ export function useEditorActions() { startTime: newStartTime, }); } - }); + }, undefined); useActionHandler("toggle-snapping", () => { toggleSnapping(); - }); + }, undefined); // History actions useActionHandler("undo", () => { undo(); - }); + }, undefined); useActionHandler("redo", () => { redo(); - }); + }, undefined); } |
