Minor changes in settings form - read/write is working
This commit is contained in:
parent
79c1b1e5dc
commit
2d1123c613
3 changed files with 15 additions and 3 deletions
|
@ -16,6 +16,10 @@
|
||||||
font-family: 'Spartan', sans-serif;
|
font-family: 'Spartan', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings_toggle {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.mat-slide-toggle-content {
|
.mat-slide-toggle-content {
|
||||||
font-family: 'Spartan', sans-serif;
|
font-family: 'Spartan', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
<div class="settings-title">Settings</div>
|
<div class="settings-title">Settings</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container" style="margin-top: 10px;">
|
||||||
<mat-dialog-content [formGroup]="settingsForm">
|
<mat-dialog-content [formGroup]="settingsForm">
|
||||||
<mat-form-field class="settings-field" [style.width.%]="100">
|
<mat-form-field class="settings-field" [style.width.%]="100">
|
||||||
<mat-label>Name</mat-label>
|
<mat-label>Name</mat-label>
|
||||||
|
@ -20,12 +20,15 @@
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-slide-toggle formControlName="useZats"
|
<mat-slide-toggle formControlName="useZats"
|
||||||
|
class="settings-toggle"
|
||||||
(change)="onChange($event)">
|
(change)="onChange($event)">
|
||||||
Use zatoshis?
|
Use zatoshis?
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
|
<pre></pre>
|
||||||
<mat-slide-toggle formControlName="useVKey"
|
<mat-slide-toggle formControlName="useVKey"
|
||||||
|
class="settings-toggle"
|
||||||
(change)="onChangeVKeyOn($event)">
|
(change)="onChangeVKeyOn($event)">
|
||||||
Activate payment confirmation?
|
Confirm payments?
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<mat-form-field [style.width.%]="100">
|
<mat-form-field [style.width.%]="100">
|
||||||
|
|
|
@ -66,14 +66,19 @@ export class SettingsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
save() {
|
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.name = this.settingsForm.value.name;
|
||||||
this.owner.currency = this.settingsForm.value.currency;
|
this.owner.currency = this.settingsForm.value.currency;
|
||||||
this.owner.zats = this.settingsForm.value.useZats;
|
this.owner.zats = this.settingsForm.value.useZats;
|
||||||
this.owner.payconf = this.settingsForm.value.useVKey;
|
this.owner.payconf = this.settingsForm.value.useVKey;
|
||||||
|
|
||||||
this.owner.viewkey = this.settingsForm.value.vKey;
|
this.owner.viewkey = this.settingsForm.value.vKey;
|
||||||
|
console.log('Save Settings from Owner.viewkey :' + this.owner.viewkey);
|
||||||
|
|
||||||
this.dialogRef.close(this.owner);
|
this.dialogRef.close(this.owner);
|
||||||
|
console.log("===> Settings dialog closed")
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange(ob: MatSlideToggleChange) {
|
onChange(ob: MatSlideToggleChange) {
|
||||||
|
|
Loading…
Reference in a new issue