diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.ts index 5868160..15c12f9 100644 --- a/electron/electron-env.d.ts +++ b/electron/electron-env.d.ts @@ -39,7 +39,7 @@ interface Window { setCurrentVideoPath: (path: string) => Promise<{ success: boolean }> getCurrentVideoPath: () => Promise<{ success: boolean; path?: string }> clearCurrentVideoPath: () => Promise<{ success: boolean }> - getPlatform: () => Promise, + getPlatform: () => Promise revealInFolder: (filePath: string) => Promise<{ success: boolean; error?: string; message?: string }>, hudOverlayHide: () => void; hudOverlayClose: () => void; diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.ts index 5c9827c..4936dc6 100644 --- a/electron/ipc/handlers.ts +++ b/electron/ipc/handlers.ts @@ -209,7 +209,11 @@ export function registerIpcHandlers( // This might happen if the file was moved or deleted after export, // or if the path is somehow invalid for showItemInFolder try { - shell.openPath(path.dirname(filePath)); + const openPathResult = await shell.openPath(path.dirname(filePath)); + if (openPathResult) { + // openPath returned an error message + return { success: false, error: openPathResult }; + } return { success: true, message: 'Could not reveal item, but opened directory.' }; } catch (openError) { console.error(`Error opening directory: ${path.dirname(filePath)}`, openError); diff --git a/src/components/video-editor/ExportDialog.tsx b/src/components/video-editor/ExportDialog.tsx index af9dde8..7a77e25 100644 --- a/src/components/video-editor/ExportDialog.tsx +++ b/src/components/video-editor/ExportDialog.tsx @@ -112,13 +112,10 @@ export function ExportDialog({
-
- -
-
{/* Added flex container */} +
Export Complete Your {formatLabel.toLowerCase()} is ready - {exportedFilePath && ( // Only show button if path exists + {exportedFilePath && (
) : ( diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx index 354cda9..c116825 100644 --- a/src/components/video-editor/VideoEditor.tsx +++ b/src/components/video-editor/VideoEditor.tsx @@ -722,7 +722,7 @@ export default function VideoEditor() { }, []); const showExportSuccessToast = useCallback((filePath: string) => { - toast.success(`Video exported successfully to ${filePath}`, { + toast.success(`Exported successfully to ${filePath}`, { action: { label: 'Show in Folder', onClick: async () => {