feat: Show not supported OS on firmware page when relevant (#695)

This commit is contained in:
Róbert Kiss
2018-06-24 22:16:00 +02:00
committed by László Monda
parent 94cfd9d2e9
commit 114014fa13
9 changed files with 53 additions and 15 deletions

View File

@@ -12,7 +12,7 @@
Firmware {{ hardwareModules.rightModuleInfo.firmwareVersion }} is running on the right keyboard half.
</p>
<p>Please note that firmware update doesn't work on Windows 7, Windows Vista, and Windows XP. Use Windows 10, Windows 8, Linux, or OSX instead.</p>
<p *ngIf="showUnsupportedOsToFirmwareUpgrade$ | async">Firmware update doesn't work on Windows 7, Windows Vista, and Windows XP. Use Windows 10, Windows 8, Linux, or OSX instead.</p>
<p>If the update process fails, disconnect every USB device from your computer including USB hubs, KVM switches, and every USB device. Then connect only your UHK and retry.</p>

View File

@@ -2,15 +2,15 @@ import { Component, OnDestroy } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';
import { HardwareModules, VersionInformation } from 'uhk-common';
import { Constants } from 'uhk-common';
import { OpenUrlInNewWindowAction } from '../../../store/actions/app';
import { Constants, HardwareModules, VersionInformation } from 'uhk-common';
import { OpenUrlInNewWindowAction } from '../../../store/actions/app';
import {
AppState,
flashFirmwareButtonDisbabled,
getAgentVersionInfo,
getHardwareModules,
showUnsupportedOsToFirmwareUpgrade,
xtermLog
} from '../../../store';
import { UpdateFirmwareAction, UpdateFirmwareWithAction } from '../../../store/actions/device';
@@ -31,6 +31,7 @@ export class DeviceFirmwareComponent implements OnDestroy {
getAgentVersionInfo$: Observable<VersionInformation>;
hardwareModulesSubscription: Subscription;
hardwareModules: HardwareModules;
showUnsupportedOsToFirmwareUpgrade$: Observable<boolean>;
constructor(private store: Store<AppState>) {
this.flashFirmwareButtonDisbabled$ = store.select(flashFirmwareButtonDisbabled);
@@ -39,6 +40,7 @@ export class DeviceFirmwareComponent implements OnDestroy {
this.hardwareModulesSubscription = store.select(getHardwareModules).subscribe(data => {
this.hardwareModules = data;
});
this.showUnsupportedOsToFirmwareUpgrade$ = store.select(showUnsupportedOsToFirmwareUpgrade);
}
ngOnDestroy(): void {