Commit 93b71fc2 authored by dev0tion's avatar dev0tion

Add date picker, edit wallet recovery

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