MCPcopy Create free account
hub / github.com/Surfer-Org/Protocol / showPasswordPrompt

Method showPasswordPrompt

desktop/src/main/helpers/python.ts:381–411  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

iMessageScriptMethod · 0.95

Calls 3

closeMethod · 0.80
onMethod · 0.80
getAssetPathFunction · 0.70

Tested by

no test coverage detected