Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
cb88292e
Commit
cb88292e
authored
Apr 11, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable wallet loading
parent
d6de1a0f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
login.component.html
Breeze.UI/src/app/login/login.component.html
+10
-4
login.component.ts
Breeze.UI/src/app/login/login.component.ts
+15
-3
No files found.
Breeze.UI/src/app/login/login.component.html
View file @
cb88292e
<h1>
Welcome
back
</h1>
<h1>
Welcome
to Breeze
</h1>
<div
*
ngIf=
"hasWallet"
>
<p>
Choose the wallet you want to open:
</p>
<div
class=
"form-group"
>
<label
for=
"walletLabel"
>
Wallet to open:
</label>
<select
name=
"wallet"
#
walletName
>
<option
*
ngFor=
"let wallet of wallets"
>
{{wallet}}
</option>
<select
name=
"wallet"
#
walletName
(
change
)="
walletChanged
(
walletName
.
value
)"
>
<option
*
ngFor=
"let wallet of wallets"
[
value
]="
wallet
"
>
{{wallet}}
</option>
</select>
</div>
<p>
Please enter your password to decrypt your wallet
</p>
...
...
@@ -17,5 +17,11 @@
</form>
<p></p>
</div>
<p>
If you like to create or restore a wallet please click the button below.
</p>
<div
*
ngIf=
"hasWallet;else no_wallet"
>
<p>
If you like to create or restore a wallet please click the button below.
</p>
</div>
<ng-template
#
no_wallet
>
<p>
Looks like you're new here. Please create or restore a wallet.
</p>
</ng-template>
<button
type=
"button"
(
click
)="
clickedCreate
()"
class=
"btn btn-success"
>
Create or restore wallet
</button>
\ No newline at end of file
Breeze.UI/src/app/login/login.component.ts
View file @
cb88292e
...
...
@@ -13,6 +13,7 @@ export class LoginComponent implements OnInit {
private
walletLoad
:
WalletLoad
;
private
hasWallet
:
boolean
=
false
;
private
currentWalletName
:
string
;
private
wallets
:
[
any
];
private
walletPath
:
string
;
...
...
@@ -21,6 +22,7 @@ export class LoginComponent implements OnInit {
ngOnInit
()
{
this
.
currentWalletName
=
""
;
this
.
apiService
.
getWalletFiles
()
.
subscribe
(
response
=>
{
...
...
@@ -28,9 +30,11 @@ export class LoginComponent implements OnInit {
this
.
responseMessage
=
response
;
this
.
wallets
=
response
.
json
().
walletsFiles
;
this
.
walletPath
=
response
.
json
().
walletsPath
;
console
.
log
(
this
.
wallets
);
if
(
this
.
wallets
.
length
>
0
)
{
this
.
hasWallet
=
true
;
this
.
currentWalletName
=
this
.
wallets
[
0
].
slice
(
0
,
-
5
);
}
else
{
this
.
hasWallet
=
false
;
}
}
},
...
...
@@ -45,10 +49,13 @@ export class LoginComponent implements OnInit {
}
private
onSubmit
()
{
this
.
walletLoad
=
new
WalletLoad
();
this
.
walletLoad
.
password
=
"test"
;
this
.
walletLoad
.
name
=
"myFirstWallet"
this
.
walletLoad
.
folderPath
=
"/home/dev0tion/Desktop/Wallets"
this
.
walletLoad
.
name
=
this
.
currentWalletName
;
this
.
walletLoad
.
folderPath
=
this
.
walletPath
;
console
.
log
(
this
.
walletLoad
);
this
.
apiService
.
loadWallet
(
this
.
walletLoad
)
.
subscribe
(
...
...
@@ -69,6 +76,11 @@ export class LoginComponent implements OnInit {
);
}
private
walletChanged
(
walletName
:
string
)
{
let
walletNameNoJson
:
string
=
walletName
.
slice
(
0
,
-
5
);
this
.
currentWalletName
=
walletNameNoJson
;
}
private
clickedCreate
()
{
this
.
router
.
navigate
([
'/setup'
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment