mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
Merge pull request #1991 from NguyenTranHoangSym/SDA-4374_main
SDA-4374: Devtool will now depend on config
This commit is contained in:
commit
9b6eabfd82
@ -16,7 +16,9 @@ export default class LocalMenuShortcuts {
|
||||
new MenuItem(
|
||||
this.getMenuItemOptions({
|
||||
accelerator: isMac ? 'Alt+Command+I' : 'Ctrl+Shift+I',
|
||||
click: () => windowHandler.onRegisterDevtools(),
|
||||
click: () => {
|
||||
windowHandler.onRegisterDevtools();
|
||||
},
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
@ -460,6 +460,7 @@ export class WindowHandler {
|
||||
windowHandler.switchClient(clientSwitchType);
|
||||
}, SHORTCUT_KEY_THROTTLE);
|
||||
this.mainWebContents.on('before-input-event', (event, input) => {
|
||||
const { devToolsEnabled } = config.getConfigFields(['devToolsEnabled']);
|
||||
const windowsDevTools =
|
||||
input.control && input.shift && input.key.toLowerCase() === 'i';
|
||||
const macDevTools =
|
||||
@ -467,7 +468,7 @@ export class WindowHandler {
|
||||
if (input.control && input.shift && input.key.toLowerCase() === 'd') {
|
||||
event.preventDefault();
|
||||
throttledExportLogs();
|
||||
} else if (windowsDevTools || macDevTools) {
|
||||
} else if (devToolsEnabled && (windowsDevTools || macDevTools)) {
|
||||
event.preventDefault();
|
||||
this.mainWebContents?.toggleDevTools();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user