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
f36ed56e
Commit
f36ed56e
authored
Apr 11, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add temporary password check
parent
cb88292e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
login.component.html
Breeze.UI/src/app/login/login.component.html
+1
-1
login.component.ts
Breeze.UI/src/app/login/login.component.ts
+5
-3
No files found.
Breeze.UI/src/app/login/login.component.html
View file @
f36ed56e
...
...
@@ -11,7 +11,7 @@
<form
(
ngSubmit
)="
onSubmit
()"
#
passwordForm=
"ngForm"
>
<div
class=
"form-group"
>
<label
for=
"password"
>
Your password:
</label>
<input
type=
"password"
class=
"form-control"
id=
"password"
required
name=
"password"
>
<input
type=
"password"
class=
"form-control"
id=
"password"
[(
ngModel
)]="
password
"
required
name=
"password"
>
</div>
<button
type=
"submit"
class=
"btn btn-success"
>
Decrypt
</button>
</form>
...
...
Breeze.UI/src/app/login/login.component.ts
View file @
f36ed56e
...
...
@@ -16,13 +16,13 @@ export class LoginComponent implements OnInit {
private
currentWalletName
:
string
;
private
wallets
:
[
any
];
private
walletPath
:
string
;
private
password
:
string
;
private
responseMessage
:
any
;
private
errorMessage
:
any
;
ngOnInit
()
{
this
.
currentWalletName
=
""
;
this
.
apiService
.
getWalletFiles
()
.
subscribe
(
response
=>
{
...
...
@@ -51,7 +51,7 @@ export class LoginComponent implements OnInit {
private
onSubmit
()
{
this
.
walletLoad
=
new
WalletLoad
();
this
.
walletLoad
.
password
=
"test"
;
this
.
walletLoad
.
password
=
this
.
password
;
this
.
walletLoad
.
name
=
this
.
currentWalletName
;
this
.
walletLoad
.
folderPath
=
this
.
walletPath
;
...
...
@@ -68,7 +68,9 @@ export class LoginComponent implements OnInit {
},
error
=>
{
this
.
errorMessage
=
<
any
>
error
;
if
(
error
.
status
>=
400
)
{
if
(
error
.
status
===
403
&&
error
.
json
().
errors
[
0
].
message
===
"Wrong password, please try again."
)
{
alert
(
"Wrong password, try again."
);
}
else
if
(
error
.
status
>=
400
)
{
alert
(
this
.
errorMessage
);
console
.
log
(
this
.
errorMessage
);
}
...
...
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