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
58a60686
Commit
58a60686
authored
Sep 26, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable send button after send clicked
parent
9e474442
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
send.component.html
Breeze.UI/src/app/wallet/send/send.component.html
+1
-1
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+5
-1
No files found.
Breeze.UI/src/app/wallet/send/send.component.html
View file @
58a60686
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<a><button
type=
"button"
class=
"btn btn-link col-12"
(
click
)="
activeModal
.
close
('
Close
click
')"
>
Cancel
</button></a>
<a><button
type=
"button"
class=
"btn btn-link col-12"
(
click
)="
activeModal
.
close
('
Close
click
')"
>
Cancel
</button></a>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"submit"
class=
"btn btn-lg btn-primary"
[
disabled
]="!
sendForm
.
valid
"
(
click
)="
send
()"
>
Send
</button>
<button
type=
"submit"
class=
"btn btn-lg btn-primary"
[
disabled
]="!
sendForm
.
valid
||
isSending
"
(
click
)="
send
()"
>
Send
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
58a60686
...
@@ -26,6 +26,7 @@ export class SendComponent implements OnInit {
...
@@ -26,6 +26,7 @@ export class SendComponent implements OnInit {
private
errorMessage
:
string
;
private
errorMessage
:
string
;
private
coinUnit
:
string
;
private
coinUnit
:
string
;
private
transaction
:
TransactionBuilding
;
private
transaction
:
TransactionBuilding
;
private
isSending
:
Boolean
=
false
;
ngOnInit
()
{
ngOnInit
()
{
this
.
coinUnit
=
this
.
globalService
.
getCoinUnit
();
this
.
coinUnit
=
this
.
globalService
.
getCoinUnit
();
...
@@ -84,6 +85,8 @@ export class SendComponent implements OnInit {
...
@@ -84,6 +85,8 @@ export class SendComponent implements OnInit {
};
};
private
send
()
{
private
send
()
{
this
.
isSending
=
true
;
this
.
transaction
=
new
TransactionBuilding
(
this
.
transaction
=
new
TransactionBuilding
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
(),
this
.
globalService
.
getCoinType
(),
...
@@ -101,7 +104,6 @@ export class SendComponent implements OnInit {
...
@@ -101,7 +104,6 @@ export class SendComponent implements OnInit {
response
=>
{
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
){
if
(
response
.
status
>=
200
&&
response
.
status
<
400
){
this
.
responseMessage
=
response
.
json
();
this
.
responseMessage
=
response
.
json
();
console
.
log
(
this
.
responseMessage
);
}
}
},
},
error
=>
{
error
=>
{
...
@@ -109,6 +111,7 @@ export class SendComponent implements OnInit {
...
@@ -109,6 +111,7 @@ export class SendComponent implements OnInit {
if
(
error
.
status
===
0
)
{
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
}
else
if
(
error
.
status
>=
400
)
{
this
.
isSending
=
false
;
if
(
!
error
.
json
().
errors
[
0
])
{
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
console
.
log
(
error
);
}
}
...
@@ -150,6 +153,7 @@ export class SendComponent implements OnInit {
...
@@ -150,6 +153,7 @@ export class SendComponent implements OnInit {
if
(
error
.
status
===
0
)
{
if
(
error
.
status
===
0
)
{
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
alert
(
"Something went wrong while connecting to the API. Please restart the application."
);
}
else
if
(
error
.
status
>=
400
)
{
}
else
if
(
error
.
status
>=
400
)
{
this
.
isSending
=
false
;
if
(
!
error
.
json
().
errors
[
0
])
{
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
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