From 5f63ab6b4a779b077fa4dc9dd59b429757d46319 Mon Sep 17 00:00:00 2001 From: algerkong Date: Fri, 2 May 2025 22:53:19 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E6=8E=A7=E5=88=B6=E9=A1=B5=E9=9D=A2HTML?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83=E4=B8=8E?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E7=9A=84=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/modules/remoteControl.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/modules/remoteControl.ts b/src/main/modules/remoteControl.ts index 4be2e01..72180ee 100644 --- a/src/main/modules/remoteControl.ts +++ b/src/main/modules/remoteControl.ts @@ -213,7 +213,9 @@ function setupRoutes(app: express.Application) { app.get('/', (_, res) => { try { const resourcesPath = process.resourcesPath || ''; - const finalPath = path.join(resourcesPath, 'html', 'remote-control.html'); + const isDev = process.env.NODE_ENV === 'development'; + const htmlPath = path.join(process.cwd(), 'resources', 'html', 'remote-control.html'); + const finalPath = isDev ? htmlPath : path.join(resourcesPath, 'html', 'remote-control.html'); if (fs.existsSync(finalPath)) { res.sendFile(finalPath);