gns3-web-ui/src/app/services/platform.service.ts
2021-04-12 13:15:45 +02:00

20 lines
446 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';
}
}