mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
Merge branch 'master' of github.com:symphonyoss/SymphonyElectron
This commit is contained in:
commit
158d3dc518
@ -11,6 +11,7 @@
|
|||||||
"devToolsEnabled": true,
|
"devToolsEnabled": true,
|
||||||
"contextIsolation": true,
|
"contextIsolation": true,
|
||||||
"disableGpu": false,
|
"disableGpu": false,
|
||||||
|
"enableRendererLogs": false,
|
||||||
"ctWhitelist": [],
|
"ctWhitelist": [],
|
||||||
"podWhitelist": [],
|
"podWhitelist": [],
|
||||||
"notificationSettings": {
|
"notificationSettings": {
|
||||||
|
@ -46,6 +46,7 @@ position:
|
|||||||
- authServerWhitelist: This is a list of domains that would be included for auto authentication. More details [here](./ad-sso-authentication.md)
|
- authServerWhitelist: This is a list of domains that would be included for auto authentication. More details [here](./ad-sso-authentication.md)
|
||||||
- authNegotiateDelegateWhitelist: This is a list of domains that would be included for auto authentication. More details [here](./ad-sso-authentication.md)
|
- authNegotiateDelegateWhitelist: This is a list of domains that would be included for auto authentication. More details [here](./ad-sso-authentication.md)
|
||||||
- disableGpu: This disables hardware acceleration. The options available are "true" and "false"
|
- disableGpu: This disables hardware acceleration. The options available are "true" and "false"
|
||||||
|
- enableRendererLogs: This enables printouts from renderer. The options available are "true" and "false"
|
||||||
- permissions: These are a set of fine grained controls that admins can use to control certain peripherals of the system being used from the SDA.
|
- permissions: These are a set of fine grained controls that admins can use to control certain peripherals of the system being used from the SDA.
|
||||||
- media: This includes the camera, microphone and audio. If set to "true", all these permissions are allowed to be used by the SDA.
|
- media: This includes the camera, microphone and audio. If set to "true", all these permissions are allowed to be used by the SDA.
|
||||||
- geolocation: This includes the user location that is requested by the app. If set to "true", this permission is allowed to be used by the SDA.
|
- geolocation: This includes the user location that is requested by the app. If set to "true", this permission is allowed to be used by the SDA.
|
||||||
|
@ -77,6 +77,7 @@ export class AppMenu {
|
|||||||
|
|
||||||
private readonly menuItemConfigFields: string[];
|
private readonly menuItemConfigFields: string[];
|
||||||
private disableGpu: boolean;
|
private disableGpu: boolean;
|
||||||
|
private enableRendererLogs: boolean;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.menuList = [];
|
this.menuList = [];
|
||||||
@ -84,6 +85,7 @@ export class AppMenu {
|
|||||||
this.menuItemConfigFields = [ 'minimizeOnClose', 'launchOnStartup', 'alwaysOnTop', 'bringToFront', 'memoryRefresh', 'isCustomTitleBar', 'devToolsEnabled' ];
|
this.menuItemConfigFields = [ 'minimizeOnClose', 'launchOnStartup', 'alwaysOnTop', 'bringToFront', 'memoryRefresh', 'isCustomTitleBar', 'devToolsEnabled' ];
|
||||||
this.cloudConfig = config.getFilteredCloudConfigFields(this.menuItemConfigFields);
|
this.cloudConfig = config.getFilteredCloudConfigFields(this.menuItemConfigFields);
|
||||||
this.disableGpu = config.getConfigFields(['disableGpu']).disableGpu;
|
this.disableGpu = config.getConfigFields(['disableGpu']).disableGpu;
|
||||||
|
this.enableRendererLogs = config.getConfigFields(['enableRendererLogs']).enableRendererLogs;
|
||||||
this.buildMenu();
|
this.buildMenu();
|
||||||
// send initial analytic
|
// send initial analytic
|
||||||
if (!initialAnalyticsSent) {
|
if (!initialAnalyticsSent) {
|
||||||
@ -463,6 +465,21 @@ export class AppMenu {
|
|||||||
click: () => {
|
click: () => {
|
||||||
gpuRestartDialog(!this.disableGpu);
|
gpuRestartDialog(!this.disableGpu);
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('Enable Renderer Logs')(),
|
||||||
|
type: 'checkbox',
|
||||||
|
checked: this.enableRendererLogs,
|
||||||
|
click: async () => {
|
||||||
|
if (this.enableRendererLogs) {
|
||||||
|
this.enableRendererLogs = false;
|
||||||
|
} else {
|
||||||
|
this.enableRendererLogs = true;
|
||||||
|
}
|
||||||
|
const enableRendererLogs = this.enableRendererLogs;
|
||||||
|
await config.updateUserConfig({ enableRendererLogs });
|
||||||
|
logger.info('New value for enableRendererLogs: ' + this.enableRendererLogs);
|
||||||
|
},
|
||||||
} ],
|
} ],
|
||||||
}, {
|
}, {
|
||||||
label: i18n.t('About Symphony')(),
|
label: i18n.t('About Symphony')(),
|
||||||
|
@ -200,6 +200,25 @@ export const handleChildWindow = (webContents: WebContents): void => {
|
|||||||
// Update initial bound changes
|
// Update initial bound changes
|
||||||
sendInitialBoundChanges(browserWin);
|
sendInitialBoundChanges(browserWin);
|
||||||
|
|
||||||
|
browserWin.webContents.on('console-message', (_event, level, message, _line, _sourceId) => {
|
||||||
|
const { enableRendererLogs } = config.getConfigFields([ 'enableRendererLogs' ]);
|
||||||
|
if (enableRendererLogs) {
|
||||||
|
if (browserWin) {
|
||||||
|
if (level === 0) {
|
||||||
|
logger.debug('renderer ' + browserWin.title + ': ' + message);
|
||||||
|
} else if (level === 1) {
|
||||||
|
logger.info('renderer ' + browserWin.title + ': ' + message);
|
||||||
|
} else if (level === 2) {
|
||||||
|
logger.warn('renderer ' + browserWin.title + ': ' + message);
|
||||||
|
} else if (level === 3) {
|
||||||
|
logger.error('renderer ' + browserWin.title + ': ' + message);
|
||||||
|
} else {
|
||||||
|
logger.info('renderer ' + browserWin.title + ': ' + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Remove all attached event listeners
|
// Remove all attached event listeners
|
||||||
browserWin.on('close', () => {
|
browserWin.on('close', () => {
|
||||||
logger.info(`child-window-handler: close event occurred for window with url ${newWinUrl}!`);
|
logger.info(`child-window-handler: close event occurred for window with url ${newWinUrl}!`);
|
||||||
|
@ -26,6 +26,7 @@ export interface IConfig {
|
|||||||
memoryRefresh: CloudConfigDataTypes;
|
memoryRefresh: CloudConfigDataTypes;
|
||||||
memoryThreshold: string;
|
memoryThreshold: string;
|
||||||
disableGpu: boolean;
|
disableGpu: boolean;
|
||||||
|
enableRendererLogs: boolean;
|
||||||
devToolsEnabled: boolean;
|
devToolsEnabled: boolean;
|
||||||
ctWhitelist: string[];
|
ctWhitelist: string[];
|
||||||
podWhitelist: string[];
|
podWhitelist: string[];
|
||||||
|
@ -385,6 +385,25 @@ export class WindowHandler {
|
|||||||
response === 0 ? this.mainWindow.reload() : this.mainWindow.close();
|
response === 0 ? this.mainWindow.reload() : this.mainWindow.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.mainWindow.webContents.on('console-message', (_event, level, message, _line, _sourceId) => {
|
||||||
|
const { enableRendererLogs } = config.getConfigFields([ 'enableRendererLogs' ]);
|
||||||
|
if (enableRendererLogs) {
|
||||||
|
if (this.mainWindow) {
|
||||||
|
if (level === 0) {
|
||||||
|
logger.debug('renderer ' + this.mainWindow.winName + ': ' + message);
|
||||||
|
} else if (level === 1) {
|
||||||
|
logger.info('renderer ' + this.mainWindow.winName + ': ' + message);
|
||||||
|
} else if (level === 2) {
|
||||||
|
logger.warn('renderer ' + this.mainWindow.winName + ': ' + message);
|
||||||
|
} else if (level === 3) {
|
||||||
|
logger.error('renderer ' + this.mainWindow.winName + ': ' + message);
|
||||||
|
} else {
|
||||||
|
logger.info('renderer ' + this.mainWindow.winName + ': ' + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Handle main window close
|
// Handle main window close
|
||||||
this.mainWindow.on('close', (event) => {
|
this.mainWindow.on('close', (event) => {
|
||||||
if (!this.mainWindow || !windowExists(this.mainWindow)) {
|
if (!this.mainWindow || !windowExists(this.mainWindow)) {
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools has been disabled! Please contact your system administrator to enable it!",
|
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools has been disabled! Please contact your system administrator to enable it!",
|
||||||
"Disable Hamburger menu": "Disable Hamburger menu",
|
"Disable Hamburger menu": "Disable Hamburger menu",
|
||||||
"Disable GPU": "Disable GPU",
|
"Disable GPU": "Disable GPU",
|
||||||
|
"Enable Renderer Logs": "Enable Renderer Logs",
|
||||||
"DownloadManager": {
|
"DownloadManager": {
|
||||||
"downloaded": "downloaded",
|
"downloaded": "downloaded",
|
||||||
"File not Found": "File not Found",
|
"File not Found": "File not Found",
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools has been disabled! Please contact your system administrator to enable it!",
|
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools has been disabled! Please contact your system administrator to enable it!",
|
||||||
"Disable Hamburger menu": "Disable Hamburger menu",
|
"Disable Hamburger menu": "Disable Hamburger menu",
|
||||||
"Disable GPU": "Disable GPU",
|
"Disable GPU": "Disable GPU",
|
||||||
|
"Enable Renderer Logs": "Enable Renderer Logs",
|
||||||
"DownloadManager": {
|
"DownloadManager": {
|
||||||
"downloaded": "downloaded",
|
"downloaded": "downloaded",
|
||||||
"File not Found": "File not Found",
|
"File not Found": "File not Found",
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools a été désactivé ! Veuillez contacter votre administrateur système pour l’activer !",
|
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools a été désactivé ! Veuillez contacter votre administrateur système pour l’activer !",
|
||||||
"Disable Hamburger menu": "Désactiver le menu Hamburger",
|
"Disable Hamburger menu": "Désactiver le menu Hamburger",
|
||||||
"Disable GPU": "Désactiver le GPU",
|
"Disable GPU": "Désactiver le GPU",
|
||||||
|
"Enable Renderer Logs": "Enable Renderer Logs",
|
||||||
"DownloadManager": {
|
"DownloadManager": {
|
||||||
"downloaded": "téléchargé",
|
"downloaded": "téléchargé",
|
||||||
"File not Found": "Fichier non trouvé",
|
"File not Found": "Fichier non trouvé",
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools a été désactivé ! Veuillez contacter votre administrateur système pour l’activer !",
|
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "Dev Tools a été désactivé ! Veuillez contacter votre administrateur système pour l’activer !",
|
||||||
"Disable Hamburger menu": "Désactiver le menu Hamburger",
|
"Disable Hamburger menu": "Désactiver le menu Hamburger",
|
||||||
"Disable GPU": "Désactiver le GPU",
|
"Disable GPU": "Désactiver le GPU",
|
||||||
|
"Enable Renderer Logs": "Enable Renderer Logs",
|
||||||
"DownloadManager": {
|
"DownloadManager": {
|
||||||
"downloaded": "téléchargé",
|
"downloaded": "téléchargé",
|
||||||
"File not Found": "Fichier non trouvé",
|
"File not Found": "Fichier non trouvé",
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "開発ツールが無効になっています。システム管理者に連絡して、有効にしてください。",
|
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "開発ツールが無効になっています。システム管理者に連絡して、有効にしてください。",
|
||||||
"Disable Hamburger menu": "ハンバーガーメニューを無効にする",
|
"Disable Hamburger menu": "ハンバーガーメニューを無効にする",
|
||||||
"Disable GPU": "GPUを無効にする",
|
"Disable GPU": "GPUを無効にする",
|
||||||
|
"Enable Renderer Logs": "Enable Renderer Logs",
|
||||||
"DownloadManager": {
|
"DownloadManager": {
|
||||||
"downloaded": "ダウンロード済み",
|
"downloaded": "ダウンロード済み",
|
||||||
"File not Found": "ファイルが見つかりません",
|
"File not Found": "ファイルが見つかりません",
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "開発ツールが無効になっています。システム管理者に連絡して、有効にしてください。",
|
"Dev Tools has been disabled! Please contact your system administrator to enable it!": "開発ツールが無効になっています。システム管理者に連絡して、有効にしてください。",
|
||||||
"Disable Hamburger menu": "ハンバーガーメニューを無効にする",
|
"Disable Hamburger menu": "ハンバーガーメニューを無効にする",
|
||||||
"Disable GPU": "GPUを無効にする",
|
"Disable GPU": "GPUを無効にする",
|
||||||
|
"Enable Renderer Logs": "Enable Renderer Logs",
|
||||||
"DownloadManager": {
|
"DownloadManager": {
|
||||||
"downloaded": "ダウンロード済み",
|
"downloaded": "ダウンロード済み",
|
||||||
"File not Found": "ファイルが見つかりません",
|
"File not Found": "ファイルが見つかりません",
|
||||||
|
Loading…
Reference in New Issue
Block a user