diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index dae009a..26bfd44 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -474,10 +474,14 @@ export default function VideoEditor() {
}, [saveProject]);
const handleNewRecordingConfirm = useCallback(async () => {
- setShowNewRecordingDialog(false);
- await window.electronAPI.clearCurrentVideoPath();
- await window.electronAPI.setCurrentRecordingSession(null);
- await window.electronAPI.switchToHud();
+ try {
+ await window.electronAPI.clearCurrentVideoPath();
+ await window.electronAPI.switchToHud();
+ setShowNewRecordingDialog(false);
+ } catch (err) {
+ console.error("Failed to start new recording:", err);
+ setError("Failed to start new recording: " + String(err));
+ }
}, []);
const handleLoadProject = useCallback(async () => {
@@ -1415,10 +1419,8 @@ export default function VideoEditor() {
style={{ WebkitAppRegion: "no-drag" } as React.CSSProperties}
>
- New Recording
-
- Start a new recording? Your current recording will be discarded.
-
+ {t("newRecording.title")}
+ {t("newRecording.description")}
@@ -1470,7 +1472,7 @@ export default function VideoEditor() {
className="flex items-center gap-1 px-2 py-1 rounded-md text-white/50 hover:text-white/90 hover:bg-white/10 transition-all duration-150 text-[11px] font-medium"
>
- New Recording
+ {t("newRecording.title")}