Commit 7b0fb800 authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #249 from stratisproject/ui

Remove old datepicker module, wait for both daemons to be loaded
parents bb45944b 0fce8e77
......@@ -52,7 +52,6 @@
"@angular/platform-server": "4.4.3",
"@angular/router": "4.4.3",
"@ng-bootstrap/ng-bootstrap": "1.0.0-beta.5",
"angular2-material-datepicker": "0.5.0",
"bootstrap": "4.0.0-beta",
"core-js": "2.5.1",
"electron-context-menu": "0.9.1",
......
......@@ -23,7 +23,11 @@ export class AppComponent implements OnInit {
ngOnInit() {
this.setTitle();
this.apiService.getWalletFiles().retryWhen(errors => errors.delay(2000)).subscribe(() => this.startApp());
this.apiService.getWalletFiles().retryWhen(errors => errors.delay(2000)).subscribe(() => this.checkStratisDaemon());
}
private checkStratisDaemon() {
this.apiService.getStratisWalletFiles().retryWhen(errors => errors.delay(2000)).subscribe(() => this.startApp());
}
private startApp() {
......
......@@ -23,8 +23,8 @@ export class RecoverComponent implements OnInit {
public creationDate: Date;
public isRecovering: boolean = false;
public maxDate = new Date();
public bsConfig: Partial<BsDatepickerConfig>;
private walletRecovery: WalletRecovery;
private bsConfig: Partial<BsDatepickerConfig>;
ngOnInit() {
this.bsConfig = Object.assign({}, {showWeekNumbers: false, containerClass: 'theme-blue'});
......
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { DatepickerModule } from 'angular2-material-datepicker'
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
import { SetupComponent } from './setup.component';
......@@ -16,7 +15,6 @@ import { RecoverComponent } from './recover/recover.component';
imports: [
BsDatepickerModule.forRoot(),
CommonModule,
DatepickerModule,
ReactiveFormsModule,
SetupRoutingModule,
SharedModule.forRoot()
......
......@@ -48,6 +48,16 @@ export class ApiService {
.map((response: Response) => response);
}
/**
* Gets available wallets at the default path
*/
getStratisWalletFiles(): Observable<any> {
return this.http
.get(this.stratisApiUrl + '/wallet/files')
.map((response: Response) => response);
}
/**
* Get a new mnemonic
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment