mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Merge branch 'master' of github.com:symphonyoss/SymphonyElectron
This commit is contained in:
commit
5c80265c42
@ -10,6 +10,7 @@
|
||||
"memoryThreshold": "800",
|
||||
"devToolsEnabled": true,
|
||||
"contextIsolation": true,
|
||||
"contextOriginUrl": "",
|
||||
"disableGpu": false,
|
||||
"enableRendererLogs": false,
|
||||
"ctWhitelist": [],
|
||||
|
@ -159,8 +159,9 @@ export const handleChildWindow = (webContents: WebContents): void => {
|
||||
// Event needed to hide native menu bar
|
||||
childWebContents.once('did-start-loading', () => {
|
||||
const browserWin = BrowserWindow.fromWebContents(childWebContents) as ICustomBrowserWindow;
|
||||
const { contextOriginUrl } = config.getGlobalConfigFields([ 'contextOriginUrl' ]);
|
||||
browserWin.setFullScreenable(true);
|
||||
browserWin.origin = windowHandler.url;
|
||||
browserWin.origin = contextOriginUrl || windowHandler.url;
|
||||
if (isWindowsOS && browserWin && !browserWin.isDestroyed()) {
|
||||
browserWin.setMenuBarVisibility(false);
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ export interface IConfig {
|
||||
}
|
||||
|
||||
export interface IGlobalConfig {
|
||||
contextOriginUrl: string;
|
||||
url: string;
|
||||
contextIsolation: boolean;
|
||||
}
|
||||
|
@ -69,9 +69,15 @@ if (!isDevEnv) {
|
||||
/**
|
||||
* Main function that init the application
|
||||
*/
|
||||
let oneStart = false;
|
||||
const startApplication = async () => {
|
||||
await app.whenReady();
|
||||
logger.info(`main: app is ready, performing initial checks`);
|
||||
if (oneStart) {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info('main: app is ready, performing initial checks oneStart: ' + oneStart);
|
||||
oneStart = true;
|
||||
createAppCacheFile();
|
||||
if (config.isFirstTimeLaunch()) {
|
||||
logger.info(`main: This is a first time launch! will update config and handle auto launch`);
|
||||
|
@ -117,7 +117,7 @@ export class WindowHandler {
|
||||
this.config = config.getConfigFields([ 'isCustomTitleBar', 'mainWinPos', 'minimizeOnClose', 'notificationSettings', 'alwaysOnTop', 'locale', 'customFlags', 'clientSwitch' ]);
|
||||
logger.info(`window-handler: main windows initialized with following config data`, this.config);
|
||||
|
||||
this.globalConfig = config.getGlobalConfigFields([ 'url', 'contextIsolation' ]);
|
||||
this.globalConfig = config.getGlobalConfigFields([ 'url', 'contextIsolation', 'contextOriginUrl' ]);
|
||||
this.userConfig = config.getUserConfigFields([ 'url' ]);
|
||||
|
||||
const { customFlags } = this.config;
|
||||
@ -296,7 +296,7 @@ export class WindowHandler {
|
||||
// update version info from server
|
||||
this.updateVersionInfo();
|
||||
// need this for postMessage origin
|
||||
this.mainWindow.origin = this.url;
|
||||
this.mainWindow.origin = this.globalConfig.contextOriginUrl || this.url;
|
||||
|
||||
// Event needed to hide native menu bar on Windows 10 as we use custom menu bar
|
||||
this.mainWindow.webContents.once('did-start-loading', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user