Commit 93b71fc2 authored by dev0tion's avatar dev0tion

Add date picker, edit wallet recovery

parent 944bed7a
......@@ -33,6 +33,7 @@
"@angular/platform-browser-dynamic": "^4.1.2",
"@angular/platform-server": "^4.1.2",
"@angular/router": "^4.1.2",
"angular2-material-datepicker": "^0.5.0",
"bootstrap": "^4.0.0-alpha.6",
"core-js": "^2.4.1",
"rxjs": "^5.4.0",
......
......@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { HttpModule } from '@angular/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { SharedModule } from './shared/shared.module';
......@@ -18,6 +19,7 @@ import { GlobalService } from './shared/services/global.service';
imports: [
AppRoutingModule,
BrowserModule,
BrowserAnimationsModule,
ReactiveFormsModule,
FormsModule,
HttpModule,
......
......@@ -22,6 +22,10 @@
<option value="test">Testnet</option>
</select>
</div>
<div class="form-group">
<label>Creation date:</label>
<material-datepicker [(date)]="creationDate"></material-datepicker>
</div>
<div class="form-group">
<button type="submit" [disabled]="!recoverWalletForm.valid" class="btn btn-success">Recover Wallet</button>
</div>
......
......@@ -24,6 +24,7 @@ export class RecoverComponent implements OnInit {
}
private recoverWalletForm: FormGroup;
private creationDate: Date;
private walletRecovery: WalletRecovery;
private responseMessage: string;
......@@ -42,7 +43,8 @@ export class RecoverComponent implements OnInit {
this.recoverWalletForm.get("walletPassword").value,
this.recoverWalletForm.get("selectNetwork").value,
this.globalService.getWalletPath(),
this.recoverWalletForm.get("walletName").value
this.recoverWalletForm.get("walletName").value,
this.creationDate
);
this.recoverWallet(this.walletRecovery);
}
......
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { DatepickerModule } from 'angular2-material-datepicker'
import { SetupComponent } from './setup.component';
import { CreateComponent } from './create/create.component';
......@@ -13,6 +14,7 @@ import { RecoverComponent } from './recover/recover.component';
@NgModule({
imports: [
CommonModule,
DatepickerModule,
ReactiveFormsModule,
SetupRoutingModule,
SharedModule.forRoot()
......
export class WalletRecovery {
constructor(mnemonic: string, password: string, network:string, folderPath: string, name: string) {
constructor(mnemonic: string, password: string, network:string, folderPath: string, walletName: string, creationDate: Date) {
this.mnemonic = mnemonic;
this.password = password;
this.network = network;
this.folderPath = folderPath;
this.name = name;
this.name = walletName;
this.creationDate = creationDate;
}
mnemonic: string;
......@@ -13,4 +14,5 @@ export class WalletRecovery {
folderPath: string;
name: string;
network: string;
creationDate: Date;
}
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