Minor changes in settings form - read/write is working

This commit is contained in:
Rene V. Vergara A. 2022-07-20 12:03:37 -05:00
parent 79c1b1e5dc
commit 2d1123c613
3 changed files with 15 additions and 3 deletions

View file

@ -16,6 +16,10 @@
font-family: 'Spartan', sans-serif;
}
.settings_toggle {
font-size: 12px;
}
.mat-slide-toggle-content {
font-family: 'Spartan', sans-serif;
}

View file

@ -1,7 +1,7 @@
<div class="settings-title">Settings</div>
<div class="container">
<div class="container" style="margin-top: 10px;">
<mat-dialog-content [formGroup]="settingsForm">
<mat-form-field class="settings-field" [style.width.%]="100">
<mat-label>Name</mat-label>
@ -20,12 +20,15 @@
</mat-select>
</mat-form-field>
<mat-slide-toggle formControlName="useZats"
class="settings-toggle"
(change)="onChange($event)">
Use zatoshis?
</mat-slide-toggle>
<pre></pre>
<mat-slide-toggle formControlName="useVKey"
class="settings-toggle"
(change)="onChangeVKeyOn($event)">
Activate payment confirmation?
Confirm payments?
</mat-slide-toggle>
<pre></pre>
<mat-form-field [style.width.%]="100">

View file

@ -66,14 +66,19 @@ export class SettingsComponent implements OnInit {
}
save() {
console.log('Settings', this.settingsForm.value.vKey);
console.log('===> Saving Settins ');
console.log('viewnkey from Form: ' + this.settingsForm.value.vKey);
console.log('payconf from Form: ' + (this.settingsForm.value.useVKey?"On":"Off"));
this.owner.name = this.settingsForm.value.name;
this.owner.currency = this.settingsForm.value.currency;
this.owner.zats = this.settingsForm.value.useZats;
this.owner.payconf = this.settingsForm.value.useVKey;
this.owner.viewkey = this.settingsForm.value.vKey;
console.log('Save Settings from Owner.viewkey :' + this.owner.viewkey);
this.dialogRef.close(this.owner);
console.log("===> Settings dialog closed")
}
onChange(ob: MatSlideToggleChange) {