mirror of
https://github.com/standardnotes/app.git
synced 2026-01-16 23:01:30 +00:00
feature: expose desktop manager for Electron
This commit is contained in:
parent
e06311c56b
commit
3fa0d6cdba
1 changed files with 7 additions and 0 deletions
|
|
@ -34,6 +34,13 @@ export class ApplicationGroup {
|
|||
this.$rootScope = $rootScope;
|
||||
this.onApplicationDeinit = this.onApplicationDeinit.bind(this);
|
||||
this.createDefaultApplication();
|
||||
|
||||
/** FIXME(baptiste): rely on a less fragile method to detect Electron */
|
||||
if ((window as any).isElectron) {
|
||||
Object.defineProperty(window, 'desktopManager', {
|
||||
get: () => this.activeApplication?.getDesktopService()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private createDefaultApplication() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue