forked from cronoh/nanovault
/
configure-wallet.component.html
154 lines (141 loc) · 6.66 KB
/
configure-wallet.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<h2>Configure Wallet</h2>
<p>Use the options below to import an existing wallet or create a new one.</p>
<div *ngIf="wallet.seed && (activePanel != 3 && activePanel != 4 && activePanel != 5)" class="uk-alert uk-alert-danger">
<b>You already have a wallet configured</b><br>
Before going any further, be 100% certain you have backed up the seed to your current wallet!<br>
Without it, <b>any funds you have will become completely unrecoverable!</b>
</div>
<div uk-grid *ngIf="activePanel == 0 || activePanel == 1">
<div class="uk-width-1-1">
<div class="uk-button-group uk-width-1-1">
<button (click)="setPanel(0)" class="uk-button uk-width-1-2" [ngClass]="{ 'uk-button-primary': activePanel == 0, 'uk-button-secondary': activePanel != 0 }">Create New Wallet</button>
<button (click)="setPanel(1)" class="uk-button uk-width-1-2" [ngClass]="{ 'uk-button-primary': activePanel == 1, 'uk-button-secondary': activePanel != 1 }">Import Existing Wallet</button>
</div>
</div>
</div>
<div class="uk-card uk-card-default" *ngIf="activePanel == 0">
<div class="uk-card-body">
<p>
When you create a new wallet, a new Banano seed will be generated which can be used to create brand new accounts
on the Banano network. Your Banano seed is the master key to all of your accounts and any money inside of them!
</p>
<div class="uk-alert-primary" uk-alert>
<p>Make sure you back up your seed, write it down, and keep it incredibly safe! There is NO way to recover it after
creation, and all funds inside WILL be lost without it! You have been warned!</p>
</div>
</div>
<div class="uk-card-footer uk-text-right">
<button class="uk-button uk-button-primary" (click)="createNewWallet()">Create Wallet</button>
</div>
</div>
<div class="uk-card uk-card-default" *ngIf="activePanel == 1">
<div class="uk-card-body">
<p>
If you already have a Banano wallet, you can import it below. When you import a wallet, none of your existing
wallets or accounts are affected, and your seed is not stored anywhere besides in your local client. Use the drop
down below to select which type of import you want to use.
</p>
<div uk-grid>
<div class="uk-width-1-1">
<div class="uk-form-horizontal">
<div class="uk-margin">
<label class="uk-form-label" for="form-horizontal-select">Select Import Type</label>
<div class="uk-form-controls">
<select class="uk-select" [(ngModel)]="selectedImportOption" id="form-horizontal-select">
<option *ngFor="let option of importOptions" [value]="option.value">{{ option.name }}</option>
</select>
</div>
</div>
</div>
</div>
</div>
<hr class="uk-divider-icon" style="margin-top: 10px;">
<div uk-grid *ngIf="selectedImportOption === 'file'">
<div class="uk-width-1-1">
<p>
If you have saved your wallet to a file using BananoVault before, use the button below to import it.
</p>
</div>
</div>
<div uk-grid *ngIf="selectedImportOption === 'seed'" class="uk-margin-top">
<div class="uk-width-1-1">
<p>
Enter your 64 character seed from any Banano wallet to import it below.
</p>
<input type="text" class="uk-input" (keyup.enter)="importExistingWallet()" [(ngModel)]="importSeedModel" placeholder="Your Banano Backup Seed">
</div>
</div>
</div>
<div class="uk-card-footer uk-text-right">
<div *ngIf="selectedImportOption === 'file'" class="js-upload" uk-form-custom style="display: inline-block;">
<input type="file" id="import-from-file" (change)="importFromFile($event.target.files)" multiple>
<button class="uk-button uk-button-primary" type="button" tabindex="-1">Import From File</button>
</div>
<button *ngIf="selectedImportOption === 'seed'" class="uk-button uk-button-primary" (click)="importExistingWallet()">Import From Seed</button>
</div>
</div>
<div class="uk-card uk-card-default" *ngIf="activePanel == 3">
<div class="uk-card-header">
<h3 class="uk-card-title">Wallet Created!</h3>
</div>
<div class="uk-card-body">
<p>
Your new Banano wallet has been created! Below is the seed for your wallet.
</p>
<div class="uk-alert uk-alert-primary">
Make sure to write down your seed or save it somewhere safe, and <strong>never share it with anyone!</strong><br>
It is the master key to all of your accounts, and the only way to recover your funds in an emergency.
</div>
<div uk-grid>
<div class="uk-width-1-4">Wallet Seed</div>
<div class="uk-width-3-4 uk-text-truncate">
{{ newWalletSeed }}<br>
<a title="Copy Seed To Clipboard" ngxClipboard [cbContent]="newWalletSeed" (cbOnSuccess)="copied()" uk-tooltip>Copy seed to clipboard</a>
</div>
</div>
</div>
<div class="uk-card-footer">
<button class="uk-button uk-button-danger" (click)="confirmNewSeed()">I've Saved My Seed</button>
</div>
</div>
<div class="uk-card uk-card-default" *ngIf="activePanel == 4">
<div class="uk-card-header">
<h3 class="uk-card-title">Set Wallet Password</h3>
</div>
<div class="uk-card-body">
<p>
The last step is to set a new password for your wallet. Your password is used to encrypt the sensitive parts of
your wallet when it is locked, which disables sending, receiving, creating accounts, and other operations.
</p>
<p>
Set your wallet password below:
</p>
<div uk-grid>
<div class="uk-width-1-2@m">
<input type="password" class="uk-input" [(ngModel)]="walletPasswordModel" placeholder="New Wallet Password">
</div>
<div class="uk-width-1-2@m">
<input type="password" class="uk-input" (keyup.enter)="saveWalletPassword()" [(ngModel)]="walletPasswordConfirmModel" placeholder="Confirm Wallet Password">
</div>
</div>
</div>
<div class="uk-card-footer uk-text-right">
<button class="uk-button uk-button-primary" (click)="saveWalletPassword()">Set Wallet Password</button>
</div>
</div>
<div class="uk-card uk-card-default" *ngIf="activePanel == 5">
<div class="uk-card-header">
<h3 class="uk-card-title">Wallet Configured!</h3>
</div>
<div class="uk-card-body">
<p>
Your wallet has been configured and you are ready to send and receive Banano!
</p>
</div>
<div class="uk-card-footer uk-text-right">
<button routerLink="/accounts" class="uk-button uk-button-primary">View Accounts</button>
</div>
</div>
<div *ngIf="activePanel == 4 || activePanel == 5" class="uk-alert-primary" uk-alert>
<p><b>ProTip:</b> If you lose your password, you can always restore your wallet using your seed.</p>
</div>