From c7808b3f1747148adf6095e035b00719cf1ac355 Mon Sep 17 00:00:00 2001 From: Frontend Developer Date: Tue, 10 Mar 2026 09:46:56 +0000 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF:=20=E4=BF=AE=E5=A4=8DElectro?= =?UTF-8?q?n=E5=8A=A0=E8=BD=BD=E6=9C=AC=E5=9C=B0HTML=E9=97=AE=E9=A2=98,?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0index.html=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main/index.js | 14 ++++++-------- frontend/src/renderer/index.html | 12 ++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 frontend/src/renderer/index.html 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 @@ + + + + + + CloudDisk + + +
+ + +