From 2e39c2e7274579db4d64e2558c5b328aa9403080 Mon Sep 17 00:00:00 2001 From: Jochen Date: Thu, 11 Jun 2020 13:24:20 +0200 Subject: [PATCH] Move auth window to top to make sue its initialized Issue #5 Signed-off-by: Jochen --- login.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/login.js b/login.js index 2f92580..02b9547 100644 --- a/login.js +++ b/login.js @@ -7,6 +7,15 @@ const login = context => { return new Promise((resolve, reject) => { const credentials = [] + const authWindow = new BrowserWindow({ + 'use-content-size': true, + alwaysOnTop: true, + autoHideMenuBar: false, + webPreferences: { + nodeIntegration: false + } + }) + /** * Register nc:// protocol */ @@ -33,15 +42,6 @@ const login = context => { console.error(error) }) - const authWindow = new BrowserWindow({ - 'use-content-size': true, - alwaysOnTop: true, - autoHideMenuBar: false, - webPreferences: { - nodeIntegration: false - } - }) - const extraHeaders = { userAgent: 'KapScreenRecorder', extraHeaders: 'OCS-APIREQUEST: true\n ACCEPT_LANGUAGE: "en-US"'