mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
Saves settings
This commit is contained in:
@@ -60,7 +60,7 @@ import * as Rx from 'rxjs/Rx';
|
||||
MdFormFieldModule,
|
||||
MdInputModule,
|
||||
MdCheckboxModule,
|
||||
MdGridListModule,
|
||||
MdGridListModule
|
||||
],
|
||||
providers: [ElectronService,WebsocketService,WebsocketHandlerService],
|
||||
bootstrap: [AppComponent]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div *ngIf="settings !== null">
|
||||
<button (click)="saveSettings()" md-fab color="accent" class="md-fab md-fab-bottom-right">Save</button>
|
||||
<form *ngIf="settings.SMSGlobal != null">
|
||||
<md-card class="exchange-card">
|
||||
<md-card-header>
|
||||
@@ -26,7 +27,7 @@
|
||||
</md-grid-list>
|
||||
<md-grid-list cols="3" rowHeight="2:1" *ngFor="let contact of settings.SMSGlobal?.Contacts">
|
||||
<md-grid-tile>
|
||||
<md-checkbox name="contactEnabled" [(ngModel)]="contact.Enabled">Enabled</md-checkbox>
|
||||
<md-checkbox name="contactEnabled" [disabled]="!settings?.SMSGlobal.Enabled" [(ngModel)]="contact.Enabled">Enabled</md-checkbox>
|
||||
</md-grid-tile>
|
||||
<md-grid-tile>
|
||||
<md-form-field>
|
||||
@@ -85,7 +86,7 @@
|
||||
</md-grid-list>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -10,4 +10,11 @@
|
||||
.exchange-card {
|
||||
margin-bottom: 20px;
|
||||
width: 1000px;
|
||||
}
|
||||
|
||||
.md-fab {
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
bottom: 5%;
|
||||
right: 2%;
|
||||
}
|
||||
@@ -45,6 +45,15 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
private saveSettings(): void {
|
||||
//Send the message
|
||||
var settingsSave = {
|
||||
Event: 'SaveConfig',
|
||||
data: this.settings
|
||||
}
|
||||
this.ws.messages.next(settingsSave);
|
||||
}
|
||||
|
||||
|
||||
private resendMessageIfPageRefreshed(): void {
|
||||
if (this.failCount <= 5) {
|
||||
|
||||
Reference in New Issue
Block a user