!wip fixed the test mode

This commit is contained in:
Jamie Rees 2018-06-04 08:13:09 +01:00
commit 422506928c
4 changed files with 300 additions and 2 deletions

View file

@ -27,6 +27,7 @@ export interface IUpdateSettings extends ISettings {
windowsService: boolean;
windowsServiceName: string;
isWindows: boolean;
testMode: boolean;
}
export interface IEmbySettings extends ISettings {

View file

@ -6,7 +6,7 @@
<legend>Update Settings</legend>
<div class="form-group" style="float: right">
<div *ngIf="updateAvailable">
<button (click)="update()" [disabled]="!enableUpdateButton" class="btn btn-success-outline">Update</button>
<button (click)="update()" [disabled]="!enableUpdateButton || !form.value.testMode" class="btn btn-success-outline">Update</button>
</div>
<div *ngIf="!updateAvailable">
<button (click)="checkForUpdate()" class="btn btn-primary-outline">Check For Update</button>
@ -19,8 +19,13 @@
<input type="checkbox" id="autoUpdateEnabled" formControlName="autoUpdateEnabled">
<label for="autoUpdateEnabled">Enable Automatic Update</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="testMode" formControlName="testMode">
<label for="testMode">Test Mode</label>
</div>
</div>
<div class="form-group" *ngIf="isWindows">
<div class="checkbox">
<input type="checkbox" id="windowsService" formControlName="windowsService">

View file

@ -35,6 +35,7 @@ export class UpdateComponent implements OnInit {
scriptLocation: [x.scriptLocation],
windowsService: [x.windowsService],
windowsServiceName: [x.windowsServiceName],
testMode: [x.testMode],
});
this.isWindows = x.isWindows;
this.enableUpdateButton = x.autoUpdateEnabled;