(title: string, file: string)
| 152 | } |
| 153 | |
| 154 | getWindow(title: string, file: string) { |
| 155 | let win = this.win; |
| 156 | if (!win) { |
| 157 | win = new BrowserWindow({ |
| 158 | icon, |
| 159 | title, |
| 160 | parent: this.controller.win.mainWindow, |
| 161 | modal: osType !== "Darwin", |
| 162 | width: 800, |
| 163 | height: 600, |
| 164 | minimizable: false, |
| 165 | autoHideMenuBar: true, |
| 166 | webPreferences: { |
| 167 | nodeIntegration: true, |
| 168 | webSecurity: false, |
| 169 | }, |
| 170 | }) as BrowserWindow; |
| 171 | win.on("closed", (e: any) => { |
| 172 | this.win = undefined; |
| 173 | }); |
| 174 | this.win = win; |
| 175 | } |
| 176 | |
| 177 | win.loadFile(file); |
| 178 | if (process.env.NODE_ENV !== "production") win.webContents.openDevTools(); |
| 179 | return win; |
| 180 | } |
| 181 | |
| 182 | postUpdateInfo(updateInfo: any) { |
| 183 | const win = this.getWindow( |
no test coverage detected