mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-3799 Avoid having multiple proxy basic auth modals open at the same time (#1503)
* SDA-3799 Avoid having multiple proxy basic auth modals open at the same time * SDA-3799 Auth modal always on top on macOS only + removing transparency
This commit is contained in:
parent
2dbe0e997e
commit
e5cce3029d
@ -1571,17 +1571,20 @@ export class WindowHandler {
|
||||
clearSettings,
|
||||
callback,
|
||||
): void {
|
||||
if (this.basicAuthWindow && windowExists(this.basicAuthWindow)) {
|
||||
this.basicAuthWindow.close();
|
||||
}
|
||||
|
||||
const opts = this.getWindowOpts(
|
||||
{
|
||||
width: 360,
|
||||
height: isMac ? 270 : 295,
|
||||
alwaysOnTop: true,
|
||||
alwaysOnTop: isMac,
|
||||
skipTaskbar: true,
|
||||
resizable: false,
|
||||
show: false,
|
||||
modal: true,
|
||||
frame: false,
|
||||
transparent: true,
|
||||
fullscreenable: false,
|
||||
acceptFirstMouse: true,
|
||||
},
|
||||
@ -1604,13 +1607,13 @@ export class WindowHandler {
|
||||
isValidCredentials: isMultipleTries,
|
||||
});
|
||||
});
|
||||
|
||||
const closeBasicAuth = (_event, shouldClearSettings = true) => {
|
||||
if (shouldClearSettings) {
|
||||
clearSettings();
|
||||
}
|
||||
if (this.basicAuthWindow && windowExists(this.basicAuthWindow)) {
|
||||
this.basicAuthWindow.close();
|
||||
this.basicAuthWindow = null;
|
||||
}
|
||||
};
|
||||
|
||||
@ -1621,6 +1624,7 @@ export class WindowHandler {
|
||||
};
|
||||
|
||||
this.basicAuthWindow.once('close', () => {
|
||||
this.basicAuthWindow = null;
|
||||
ipcMain.removeListener('basic-auth-closed', closeBasicAuth);
|
||||
ipcMain.removeListener('basic-auth-login', login);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user