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
5d2e3ac1
Commit
5d2e3ac1
authored
Sep 26, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable decrypt, create and recover button on api call
parent
58a60686
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
4 deletions
+16
-4
login.component.ts
Breeze.UI/src/app/login/login.component.ts
+4
-0
create.component.html
Breeze.UI/src/app/setup/create/create.component.html
+1
-1
create.component.ts
Breeze.UI/src/app/setup/create/create.component.ts
+4
-0
recover.component.html
Breeze.UI/src/app/setup/recover/recover.component.html
+1
-1
recover.component.ts
Breeze.UI/src/app/setup/recover/recover.component.ts
+4
-0
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+2
-2
No files found.
Breeze.UI/src/app/login/login.component.ts
View file @
5d2e3ac1
...
...
@@ -20,6 +20,7 @@ export class LoginComponent implements OnInit {
private
openWalletForm
:
FormGroup
;
private
hasWallet
:
boolean
=
false
;
private
wallets
:
[
string
];
private
isDecrypting
=
false
;
ngOnInit
()
{
this
.
getWalletFiles
();
...
...
@@ -112,6 +113,7 @@ export class LoginComponent implements OnInit {
}
private
onDecryptClicked
()
{
this
.
isDecrypting
=
true
;
this
.
globalService
.
setWalletName
(
this
.
openWalletForm
.
get
(
"selectWallet"
).
value
);
let
walletLoad
=
new
WalletLoad
(
this
.
openWalletForm
.
get
(
"selectWallet"
).
value
,
...
...
@@ -133,6 +135,7 @@ export class LoginComponent implements OnInit {
}
},
error
=>
{
this
.
isDecrypting
=
false
;
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
...
...
@@ -159,6 +162,7 @@ export class LoginComponent implements OnInit {
}
},
error
=>
{
this
.
isDecrypting
=
false
;
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
...
...
Breeze.UI/src/app/setup/create/create.component.html
View file @
5d2e3ac1
...
...
@@ -34,7 +34,7 @@
</div>
<!-- /row-->
<div
class=
"row d-flex justify-content-center"
>
<button
type=
"button"
class=
"btn btn-darkgray btn-lg"
[
disabled
]="!
createWalletForm
.
valid
"
(
click
)="
onCreateClicked
()"
>
Create
</button>
<button
type=
"button"
class=
"btn btn-darkgray btn-lg"
[
disabled
]="!
createWalletForm
.
valid
||
isCreating
"
(
click
)="
onCreateClicked
()"
>
Create
</button>
</div>
<!-- /row-->
</div>
...
...
Breeze.UI/src/app/setup/create/create.component.ts
View file @
5d2e3ac1
...
...
@@ -24,6 +24,7 @@ export class CreateComponent implements OnInit {
private
createWalletForm
:
FormGroup
;
private
newWallet
:
WalletCreation
;
private
mnemonic
:
string
;
private
isCreating
:
Boolean
=
false
;
ngOnInit
()
{
this
.
getNewMnemonic
();
...
...
@@ -99,6 +100,7 @@ export class CreateComponent implements OnInit {
}
private
onCreateClicked
()
{
this
.
isCreating
=
true
;
if
(
this
.
mnemonic
)
{
this
.
newWallet
=
new
WalletCreation
(
this
.
createWalletForm
.
get
(
"walletName"
).
value
,
...
...
@@ -147,6 +149,7 @@ export class CreateComponent implements OnInit {
},
error
=>
{
console
.
log
(
error
);
this
.
isCreating
=
false
;
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
...
...
@@ -174,6 +177,7 @@ export class CreateComponent implements OnInit {
}
},
error
=>
{
this
.
isCreating
=
false
;
console
.
log
(
error
);
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
...
...
Breeze.UI/src/app/setup/recover/recover.component.html
View file @
5d2e3ac1
...
...
@@ -37,7 +37,7 @@
</div>
<!-- /row-->
<div
class=
"row d-flex justify-content-center"
>
<button
type=
"button"
class=
"btn btn-darkgray btn-lg"
[
disabled
]="!
recoverWalletForm
.
valid
"
(
click
)="
onRecoverClicked
()"
>
Recover
</button>
<button
type=
"button"
class=
"btn btn-darkgray btn-lg"
[
disabled
]="!
recoverWalletForm
.
valid
||
isRecovering
"
(
click
)="
onRecoverClicked
()"
>
Recover
</button>
</div>
<!-- /row-->
</div>
...
...
Breeze.UI/src/app/setup/recover/recover.component.ts
View file @
5d2e3ac1
...
...
@@ -22,6 +22,7 @@ export class RecoverComponent implements OnInit {
private
recoverWalletForm
:
FormGroup
;
private
creationDate
:
Date
;
private
walletRecovery
:
WalletRecovery
;
private
isRecovering
:
Boolean
=
false
;
private
responseMessage
:
string
;
private
errorMessage
:
string
;
...
...
@@ -90,6 +91,7 @@ export class RecoverComponent implements OnInit {
}
private
onRecoverClicked
(){
this
.
isRecovering
=
true
;
this
.
walletRecovery
=
new
WalletRecovery
(
this
.
recoverWalletForm
.
get
(
"walletName"
).
value
,
this
.
recoverWalletForm
.
get
(
"walletMnemonic"
).
value
,
...
...
@@ -110,6 +112,7 @@ export class RecoverComponent implements OnInit {
}
},
error
=>
{
this
.
isRecovering
=
false
;
console
.
log
(
error
);
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
...
...
@@ -139,6 +142,7 @@ export class RecoverComponent implements OnInit {
}
},
error
=>
{
this
.
isRecovering
=
false
;
console
.
log
(
error
);
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
...
...
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
5d2e3ac1
...
...
@@ -108,10 +108,10 @@ export class SendComponent implements OnInit {
},
error
=>
{
console
.
log
(
error
);
this
.
isSending
=
false
;
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
this
.
isSending
=
false
;
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
...
...
@@ -150,10 +150,10 @@ export class SendComponent implements OnInit {
},
error
=>
{
console
.
log
(
error
);
this
.
isSending
=
false
;
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
this
.
isSending
=
false
;
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
...
...
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