From f4cffb65f8f670ca0a779fd3496546ce3716e5e2 Mon Sep 17 00:00:00 2001 From: yuruo Date: Thu, 6 Jun 2024 18:40:54 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ui(autoMate):=20import=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=BF=AE=E5=A4=8D(window.ts)=F0=9F=90=9B,=20=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=AA=97=E5=8F=A3=E5=87=BD=E6=95=B0=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D(index.ts)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/autoMate/src/main/code/window.ts | 2 +- ui/autoMate/src/main/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/autoMate/src/main/code/window.ts b/ui/autoMate/src/main/code/window.ts index 94066a3..270fd99 100644 --- a/ui/autoMate/src/main/code/window.ts +++ b/ui/autoMate/src/main/code/window.ts @@ -2,7 +2,7 @@ import { BrowserWindow, shell } from 'electron' import { is } from '@electron-toolkit/utils' import icon from '../../../resources/icon.png?asset' -import * as ipc from './ipc' +import * as ipc from '../ipc' import { join } from 'path' export function createWindow(): void { // Create the browser window. diff --git a/ui/autoMate/src/main/index.ts b/ui/autoMate/src/main/index.ts index d19da58..0bd3493 100644 --- a/ui/autoMate/src/main/index.ts +++ b/ui/autoMate/src/main/index.ts @@ -1,5 +1,6 @@ import { app, BrowserWindow, ipcMain } from 'electron' import { electronApp, optimizer } from '@electron-toolkit/utils' +import { createWindow } from './code/window' // This method will be called when Electron has finished // initialization and is ready to create browser windows. @@ -21,7 +22,7 @@ app.whenReady().then(() => { app.on('activate', function () { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. - if (BrowserWindow.getAllWindows().length === 0) code.createWindow() + if (BrowserWindow.getAllWindows().length === 0) createWindow() }) })