@@ -281,38 +281,38 @@ export const FileManagementPage = () => {
281
281
} ;
282
282
283
283
// Open file
284
- const handleOpenFile = async ( file : FileData ) => {
285
- try {
286
- // First save the file to a temporary location
287
- if ( ! window . electron || ! window . electron . saveFile || ! window . electron . openFile ) {
288
- console . error ( "Electron API not available" ) ;
289
- return ;
290
- }
284
+ // const handleOpenFile = async (file: FileData) => {
285
+ // try {
286
+ // // First save the file to a temporary location
287
+ // if (!window.electron || !window.electron.saveFile || !window.electron.openFile) {
288
+ // console.error("Electron API not available");
289
+ // return;
290
+ // }
291
291
292
- // Save file to temp location and then open it
293
- const saveResult = await window . electron . saveFile (
294
- file . data ,
295
- file . name ,
296
- file . type || 'application/octet-stream'
297
- ) ;
292
+ // // Save file to temp location and then open it
293
+ // const saveResult = await window.electron.saveFile(
294
+ // file.data,
295
+ // file.name,
296
+ // file.type || 'application/octet-stream'
297
+ // );
298
298
299
- if ( ! saveResult . success || ! saveResult . filePath ) {
300
- if ( ! saveResult . canceled ) {
301
- console . error ( "Error saving file:" , saveResult . error ) ;
302
- }
303
- return ;
304
- }
299
+ // if (!saveResult.success || !saveResult.filePath) {
300
+ // if (!saveResult.canceled) {
301
+ // console.error("Error saving file:", saveResult.error);
302
+ // }
303
+ // return;
304
+ // }
305
305
306
- // Now open the file with the default application
307
- const openResult = await window . electron . openFile ( saveResult . filePath ) ;
306
+ // // Now open the file with the default application
307
+ // const openResult = await window.electron.openFile(saveResult.filePath);
308
308
309
- if ( ! openResult . success ) {
310
- console . error ( "Error opening file:" , openResult . error ) ;
311
- }
312
- } catch ( error ) {
313
- console . error ( "Error opening file:" , error ) ;
314
- }
315
- } ;
309
+ // if (!openResult.success) {
310
+ // console.error("Error opening file:", openResult.error);
311
+ // }
312
+ // } catch (error) {
313
+ // console.error("Error opening file:", error);
314
+ // }
315
+ // };
316
316
317
317
// Format file size
318
318
const formatFileSize = ( bytes : number ) : string => {
0 commit comments