Add ability to hide tray icon on non-Mac (which has no tray icon)
This commit is contained in:
parent
6ada5e4397
commit
1498872214
3 changed files with 44 additions and 10 deletions
|
@ -211,6 +211,19 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
return this._ipcCall('setAutoHideMenuBarEnabled', enabled);
|
||||
}
|
||||
|
||||
supportsTrayIcon(): boolean {
|
||||
// Things other than Mac support tray icons
|
||||
return !navigator.platform.toUpperCase().includes('MAC');
|
||||
}
|
||||
|
||||
async getTrayIconEnabled(): boolean {
|
||||
return this._ipcCall('getTrayIconEnabled');
|
||||
}
|
||||
|
||||
async setTrayIconEnabled(enabled: boolean): void {
|
||||
return this._ipcCall('setTrayIconEnabled', enabled);
|
||||
}
|
||||
|
||||
supportsMinimizeToTray(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue