()
| 379 | } |
| 380 | |
| 381 | private showPasswordPrompt(): Promise<string | null> { |
| 382 | return new Promise((resolve) => { |
| 383 | const promptWindow = new BrowserWindow({ |
| 384 | width: 500, |
| 385 | height: 300, |
| 386 | show: false, |
| 387 | alwaysOnTop: true, |
| 388 | webPreferences: { |
| 389 | nodeIntegration: true, |
| 390 | contextIsolation: false, |
| 391 | }, |
| 392 | }); |
| 393 | |
| 394 | promptWindow.loadURL( |
| 395 | getAssetPath('password-prompt.html'), |
| 396 | ); |
| 397 | |
| 398 | promptWindow.once('ready-to-show', () => { |
| 399 | promptWindow.show(); |
| 400 | }); |
| 401 | |
| 402 | ipcMain.once('submit-password', (event, password) => { |
| 403 | promptWindow.close(); |
| 404 | resolve(password); |
| 405 | }); |
| 406 | |
| 407 | promptWindow.on('closed', () => { |
| 408 | resolve(null); |
| 409 | }); |
| 410 | }); |
| 411 | } |
| 412 | |
| 413 | private async installDependencies(dataFolderPath: string) { |
| 414 | if (!this.SurferPythonPath) { |
no test coverage detected