aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-01-18 10:17:41 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-01-18 10:47:56 +0800
commit8bb57f33b186e373ee6be4cb8f7418d38934f218 (patch)
tree8707b29878a2f220d2362a6d10566543910534b2
parent234c2417ca2480fc3025030bc19ef007ea8e8d30 (diff)
downloadtangerine-wallet-browser-8bb57f33b186e373ee6be4cb8f7418d38934f218.tar
tangerine-wallet-browser-8bb57f33b186e373ee6be4cb8f7418d38934f218.tar.gz
tangerine-wallet-browser-8bb57f33b186e373ee6be4cb8f7418d38934f218.tar.bz2
tangerine-wallet-browser-8bb57f33b186e373ee6be4cb8f7418d38934f218.tar.lz
tangerine-wallet-browser-8bb57f33b186e373ee6be4cb8f7418d38934f218.tar.xz
tangerine-wallet-browser-8bb57f33b186e373ee6be4cb8f7418d38934f218.tar.zst
tangerine-wallet-browser-8bb57f33b186e373ee6be4cb8f7418d38934f218.zip
add a `x` close button to gas calc loding screen on conf-tx
-rw-r--r--ui/app/components/loading.js12
-rw-r--r--ui/app/conf-tx.js6
2 files changed, 16 insertions, 2 deletions
diff --git a/ui/app/components/loading.js b/ui/app/components/loading.js
index 163792584..b8e2eb599 100644
--- a/ui/app/components/loading.js
+++ b/ui/app/components/loading.js
@@ -11,7 +11,7 @@ function LoadingIndicator () {
}
LoadingIndicator.prototype.render = function () {
- const { isLoading, loadingMessage } = this.props
+ const { isLoading, loadingMessage, canBypass, bypass } = this.props
return (
isLoading ? h('.full-flex-height', {
@@ -28,6 +28,16 @@ LoadingIndicator.prototype.render = function () {
background: 'rgba(255, 255, 255, 0.8)',
},
}, [
+ canBypass ? h( 'i.fa.fa-close.cursor-pointer.close-loading', {
+ style: {
+ position: 'absolute',
+ top: '1px',
+ right: '15px',
+ color: '#AEAEAE',
+ },
+ onClick: bypass,
+ }) : null,
+
h('img', {
src: 'images/loading.svg',
}),
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index ce4d153b5..9c8f98fa8 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -62,8 +62,12 @@ ConfirmTxScreen.prototype.render = function () {
h('.flex-column.flex-grow', [
h(LoadingIndicator, {
- isLoading: txData.loadingDefaults,
+ isLoading: this.state ? !this.state.bypassLoadingScreen : txData.loadingDefaults,
loadingMessage: 'Estimating transaction cost…',
+ canBypass: true,
+ bypass: () => {
+ this.setState({bypassLoadingScreen: true})
+ },
}),
// subtitle and nav