From fc26f12051a55a69e16ae18369f940377b71f94c Mon Sep 17 00:00:00 2001 From: mozzie Date: Tue, 3 Sep 2024 17:01:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9E=84=E5=BB=BA=E5=90=8E=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E4=BA=8B=E4=BB=B6=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/desktop/electron/main.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts index ad05c26..2dcbff0 100644 --- a/apps/desktop/electron/main.ts +++ b/apps/desktop/electron/main.ts @@ -65,14 +65,13 @@ function createWindow() { win.loadURL(VITE_DEV_SERVER_URL); } else { win.loadFile(path.join(RENDERER_DIST, "index.html")).then(() => { - win?.webContents.openDevTools(); - // 检查是否传递了路径 if (process.argv.length >= 2) { - const folderPath = process.argv[1]; // 这是选中的目录路径 - console.log("Opened directory path:", folderPath); - win?.webContents.send("open-folder", process.argv); + const folderPath = process.argv[2]; + win?.webContents.send("open-folder", folderPath); + registerIpcMainHandlers(win); } }); + } // pythonManager = new PythonManager(win, "http://127.0.0.1:15001", 3000);