Basic definition of installed software

This commit is contained in:
ziajka 2019-01-11 08:38:22 +01:00
parent 71129e28cf
commit 25e137a488

View File

@ -7,11 +7,22 @@ import { ElectronService } from 'ngx-electron';
export class InstalledSoftwareService { export class InstalledSoftwareService {
private software = [{ private software = [{
name: 'ls', name: 'ls',
commands: ['ls'] commands: ['ls'],
installed: false
}, { }, {
name: 'telnet', name: 'telnet',
commands: ['telnet'] commands: ['telnet'],
}] installed: false
}, {
name: 'SolarPuTTY',
commands: [
'SolarPuTTY.exe'
],
type: 'web',
resource: 'exe',
binary: 'SolarPuTTY.exe',
installed: false
}];
constructor( constructor(
private electronService: ElectronService private electronService: ElectronService
@ -22,10 +33,8 @@ export class InstalledSoftwareService {
.getInstalledSoftware(this.software); .getInstalledSoftware(this.software);
return this.software.map((software) => { return this.software.map((software) => {
return { software.installed = installedSoftware[software.name].length > 0;
name: software.name, return software;
installed: installedSoftware[software.name].length > 0
}
}); });
} }