diff --git a/frontend/src/main/index.js b/frontend/src/main/index.js index 60f3af7..5275b3e 100644 --- a/frontend/src/main/index.js +++ b/frontend/src/main/index.js @@ -14,13 +14,12 @@ function createWindow() { } }); - // Load the app - if (process.env.NODE_ENV === 'development') { - mainWindow.loadURL('http://localhost:3000'); - mainWindow.webContents.openDevTools(); - } else { - mainWindow.loadFile(path.join(__dirname, '../renderer/index.html')); - } + // Load the app - use proper file path + const indexPath = path.join(__dirname, '../renderer/index.html'); + mainWindow.loadFile(indexPath); + + // Open DevTools in development + // mainWindow.webContents.openDevTools(); mainWindow.on('closed', () => { mainWindow = null; @@ -57,7 +56,6 @@ ipcMain.handle('select-folder', async () => { }); ipcMain.handle('show-message', async (event, { title, message, type }) => { - const { dialog } = require('electron'); return dialog.showMessageBox(mainWindow, { type: type || 'info', title: title || 'CloudDisk', diff --git a/frontend/src/renderer/index.html b/frontend/src/renderer/index.html new file mode 100644 index 0000000..9d94be9 --- /dev/null +++ b/frontend/src/renderer/index.html @@ -0,0 +1,12 @@ + + +
+ + +