Abstract electron settings properly to avoid boilerplate-hell (#8798)
* Remove unused method `BasePlatform::screenCaptureErrorString` * Improve platform typescripting * Remove redundant awaits * Abstract electron settings properly to avoid boilerplate-hell * i18n * Fix stray semi-colons * Fix setting level order for Platform settings
This commit is contained in:
parent
9b8b1d193e
commit
ba2ce5ecba
9 changed files with 122 additions and 220 deletions
|
@ -1042,4 +1042,32 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
|||
supportedLevels: LEVELS_UI_FEATURE,
|
||||
default: true,
|
||||
},
|
||||
|
||||
// Electron-specific settings, they are stored by Electron and set/read over an IPC.
|
||||
// We store them over there are they are necessary to know before the renderer process launches.
|
||||
"Electron.autoLaunch": {
|
||||
supportedLevels: [SettingLevel.PLATFORM],
|
||||
displayName: _td("Start automatically after system login"),
|
||||
default: false,
|
||||
},
|
||||
"Electron.warnBeforeExit": {
|
||||
supportedLevels: [SettingLevel.PLATFORM],
|
||||
displayName: _td("Warn before quitting"),
|
||||
default: true,
|
||||
},
|
||||
"Electron.alwaysShowMenuBar": {
|
||||
supportedLevels: [SettingLevel.PLATFORM],
|
||||
displayName: _td("Always show the window menu bar"),
|
||||
default: false,
|
||||
},
|
||||
"Electron.showTrayIcon": {
|
||||
supportedLevels: [SettingLevel.PLATFORM],
|
||||
displayName: _td("Show tray icon and minimise window to it on close"),
|
||||
default: true,
|
||||
},
|
||||
"Electron.enableHardwareAcceleration": {
|
||||
supportedLevels: [SettingLevel.PLATFORM],
|
||||
displayName: _td("Enable hardware acceleration"),
|
||||
default: true,
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue