attempt to fix an issue with pairing a new device.
parent
e24807aa76
commit
191d73413d
|
@ -9,8 +9,6 @@
|
|||
[required]="true"
|
||||
>
|
||||
</account-geography-card>
|
||||
<!-- <account-voice-card [voiceForm]="defaultsForm"></account-voice-card>-->
|
||||
<!-- <account-wake-word-card [wakeWordForm]="defaultsForm">x</account-wake-word-card>-->
|
||||
</mat-card-content>
|
||||
<mat-card-actions *ngIf="!addingDevice" align="right">
|
||||
<button mat-button (click)="onSave()" [disabled]="!defaultsForm.valid">SAVE</button>
|
||||
|
|
|
@ -102,7 +102,6 @@ export class AddComponent implements OnInit {
|
|||
timeFormat: [null, Validators.required],
|
||||
}
|
||||
);
|
||||
|
||||
this.defaultsForm = this.formBuilder.group(
|
||||
{
|
||||
city: [null],
|
||||
|
@ -115,9 +114,9 @@ export class AddComponent implements OnInit {
|
|||
);
|
||||
this.deviceForm = this.formBuilder.group(
|
||||
{
|
||||
city: [this.defaults ? this.defaults.city.name : null, Validators.required],
|
||||
city: [this.defaults.city.name, Validators.required],
|
||||
name: [null, [ Validators.required ], [ deviceNameValidator(this.deviceService) ]],
|
||||
country: [this.defaults ? this.defaults.country.name : null, Validators.required],
|
||||
country: [this.defaults.country.name, Validators.required],
|
||||
pairingCode: [
|
||||
null,
|
||||
[
|
||||
|
@ -125,13 +124,13 @@ export class AddComponent implements OnInit {
|
|||
Validators.maxLength(6),
|
||||
Validators.minLength(6)
|
||||
],
|
||||
[ pairingCodeValidator(this.deviceService) ],
|
||||
// [ pairingCodeValidator(this.deviceService) ],
|
||||
],
|
||||
placement: [null],
|
||||
region: [this.defaults ? this.defaults.region.name : null, Validators.required],
|
||||
timezone: [this.defaults ? this.defaults.timezone.name : null, Validators.required],
|
||||
wakeWord: [this.defaults ? this.defaults.wakeWord.name : null, Validators.required],
|
||||
voice: [this.defaults ? this.defaults.voice.displayName : null, Validators.required]
|
||||
region: [this.defaults.region.name, Validators.required],
|
||||
timezone: [this.defaults.timezone.name, Validators.required],
|
||||
wakeWord: [this.defaults.wakeWord.name ? this.defaults.wakeWord.name : 'Hey Mycroft', Validators.required],
|
||||
voice: [this.defaults.voice.displayName ? this.defaults.voice.displayName : 'American Male', Validators.required]
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -39,12 +39,12 @@ export class DefaultsComponent implements OnInit {
|
|||
);
|
||||
this.defaultsForm = this.formBuilder.group(
|
||||
{
|
||||
city: [this.defaults ? this.defaults.city.name : null],
|
||||
country: [this.defaults ? this.defaults.country.name : null],
|
||||
region: [this.defaults ? this.defaults.region.name : null],
|
||||
timezone: [this.defaults ? this.defaults.timezone.name : null],
|
||||
wakeWord: [this.defaults ? this.defaults.wakeWord.name : null],
|
||||
voice: [this.defaults ? this.defaults.voice.displayName : null]
|
||||
city: [this.defaults.city.name],
|
||||
country: [this.defaults.country.name],
|
||||
region: [this.defaults.region.name],
|
||||
timezone: [this.defaults.timezone.name],
|
||||
wakeWord: [this.defaults.wakeWord.name],
|
||||
voice: [this.defaults.voice.displayName]
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue