mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-13 06:25:21 +00:00
23 lines
456 B
TypeScript
23 lines
456 B
TypeScript
|
import { Injectable } from '@angular/core';
|
||
|
import { ElectronService } from 'ngx-electron';
|
||
|
|
||
|
@Injectable()
|
||
|
export class PlatformService {
|
||
|
|
||
|
constructor(
|
||
|
private electronService: ElectronService
|
||
|
) { }
|
||
|
|
||
|
isWindows() {
|
||
|
return this.electronService.process.platform === 'win32';
|
||
|
}
|
||
|
|
||
|
isLinux() {
|
||
|
return this.electronService.process.platform === 'linux';
|
||
|
}
|
||
|
|
||
|
isDarwin() {
|
||
|
return this.electronService.process.platform === 'darwin';
|
||
|
}
|
||
|
}
|