aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-12-05 14:15:45 +0800
committerDan Miller <danjm.com@gmail.com>2018-12-13 01:23:37 +0800
commit47501a6f7ad092f9d941fffac1b3b5cc557c65c3 (patch)
treeb3f2ab7f7914fde1e95ef3372f521dd546e09583 /ui
parent970bdebb863388b862c51ff46fb7b83875080746 (diff)
downloadtangerine-wallet-browser-47501a6f7ad092f9d941fffac1b3b5cc557c65c3.tar.gz
tangerine-wallet-browser-47501a6f7ad092f9d941fffac1b3b5cc557c65c3.tar.zst
tangerine-wallet-browser-47501a6f7ad092f9d941fffac1b3b5cc557c65c3.zip
Add spinner and dropdown arrow to network indicator on custom network loading.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/dropdowns/components/network-dropdown-icon.js32
-rw-r--r--ui/app/components/network.js42
2 files changed, 47 insertions, 27 deletions
diff --git a/ui/app/components/dropdowns/components/network-dropdown-icon.js b/ui/app/components/dropdowns/components/network-dropdown-icon.js
index a45da4c10..d4a2c2ff7 100644
--- a/ui/app/components/dropdowns/components/network-dropdown-icon.js
+++ b/ui/app/components/dropdowns/components/network-dropdown-icon.js
@@ -16,16 +16,32 @@ NetworkDropdownIcon.prototype.render = function () {
isSelected,
innerBorder = 'none',
diameter = '12',
+ loading,
} = this.props
- return h(`.menu-icon-circle${isSelected ? '--active' : ''}`, {},
- h('div', {
+ return loading
+ ? h('span.pointer.network-indicator', {
style: {
- background: backgroundColor,
- border: innerBorder,
- height: `${diameter}px`,
- width: `${diameter}px`,
+ display: 'flex',
+ alignItems: 'center',
+ flexDirection: 'row',
},
- })
- )
+ }, [
+ h('img', {
+ style: {
+ width: '27px',
+ },
+ src: 'images/loading.svg',
+ }),
+ ])
+ : h(`.menu-icon-circle${isSelected ? '--active' : ''}`, {},
+ h('div', {
+ style: {
+ background: backgroundColor,
+ border: innerBorder,
+ height: `${diameter}px`,
+ width: `${diameter}px`,
+ },
+ })
+ )
}
diff --git a/ui/app/components/network.js b/ui/app/components/network.js
index 611aadb7b..ce042377d 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -32,24 +32,7 @@ Network.prototype.render = function () {
}
let iconName, hoverText
- if (networkNumber === 'loading') {
- return h('span.pointer.network-indicator', {
- style: {
- display: 'flex',
- alignItems: 'center',
- flexDirection: 'row',
- },
- onClick: (event) => this.props.onClick(event),
- }, [
- h('img', {
- title: context.t('attemptingConnect'),
- style: {
- width: '27px',
- },
- src: 'images/loading.svg',
- }),
- ])
- } else if (providerName === 'mainnet') {
+ if (providerName === 'mainnet') {
hoverText = context.t('mainnet')
iconName = 'ethereum-network'
} else if (providerName === 'ropsten') {
@@ -92,6 +75,7 @@ Network.prototype.render = function () {
h(NetworkDropdownIcon, {
backgroundColor: '#038789', // $blue-lagoon
nonSelectBackgroundColor: '#15afb2',
+ loading: networkNumber === 'loading',
}),
h('.network-name', context.t('mainnet')),
h('i.fa.fa-chevron-down.fa-lg.network-caret'),
@@ -101,6 +85,7 @@ Network.prototype.render = function () {
h(NetworkDropdownIcon, {
backgroundColor: '#e91550', // $crimson
nonSelectBackgroundColor: '#ec2c50',
+ loading: networkNumber === 'loading',
}),
h('.network-name', context.t('ropsten')),
h('i.fa.fa-chevron-down.fa-lg.network-caret'),
@@ -110,6 +95,7 @@ Network.prototype.render = function () {
h(NetworkDropdownIcon, {
backgroundColor: '#690496', // $purple
nonSelectBackgroundColor: '#b039f3',
+ loading: networkNumber === 'loading',
}),
h('.network-name', context.t('kovan')),
h('i.fa.fa-chevron-down.fa-lg.network-caret'),
@@ -119,13 +105,31 @@ Network.prototype.render = function () {
h(NetworkDropdownIcon, {
backgroundColor: '#ebb33f', // $tulip-tree
nonSelectBackgroundColor: '#ecb23e',
+ loading: networkNumber === 'loading',
}),
h('.network-name', context.t('rinkeby')),
h('i.fa.fa-chevron-down.fa-lg.network-caret'),
])
default:
return h('.network-indicator', [
- h('i.fa.fa-question-circle.fa-lg', {
+ networkNumber === 'loading'
+ ? h('span.pointer.network-indicator', {
+ style: {
+ display: 'flex',
+ alignItems: 'center',
+ flexDirection: 'row',
+ },
+ onClick: (event) => this.props.onClick(event),
+ }, [
+ h('img', {
+ title: context.t('attemptingConnect'),
+ style: {
+ width: '27px',
+ },
+ src: 'images/loading.svg',
+ }),
+ ])
+ : h('i.fa.fa-question-circle.fa-lg', {
style: {
margin: '10px',
color: 'rgb(125, 128, 130)',
nsformers-base 0.4.2_1 --> 0.4.4 devel/hs-transformers-compat 0.3.3.4_1 --> 0.4.0.4 devel/hs-unix-compat 0.4.1.3_1 --> 0.4.1.4 devel/hs-unix-time 0.3.3_1 --> 0.3.5 devel/hs-unordered-containers 0.2.4.0_1 --> 0.2.5.1 devel/hs-utf8-string 0.3.8_1 --> 1 devel/hs-uuagc 0.9.51_1 --> 0.9.52.1 devel/hs-uuagc-cabal 1.0.5.0_1 --> 1.0.6.0 devel/hs-uuid 1.3.3_1 --> 1.3.11 devel/hs-uulib 0.9.16_1 --> 0.9.20 devel/hs-vault 0.3.0.3_1 --> 0.3.0.4 devel/hs-vector 0.10.9.1_1 --> 0.10.12.3 devel/hs-vector-algorithms 0.6.0.3_1 --> 0.7.0.1 devel/hs-vector-instances 3.3_1 --> 3.3.1 devel/hs-vector-th-unbox 0.2.1.0_1 --> 0.2.1.2 devel/hs-void 0.6.1_1 --> 0.7 devel/hs-word8 0.1.1_1 --> 0.1.2 dns/hs-dns 1.4.2_1 --> 2.0.0 graphics/hs-JuicyPixels 3.1.6.1_1 --> 3.2.6 graphics/hs-cairo 0.12.5.3_1 --> 0.13.1.0 graphics/hs-dia-base 0.1.1.2_8 --> 0.1.1.3 graphics/hs-dia-functions 0.2.1.3_8 --> 0.2.1.4 graphics/hs-svgcairo 0.12.5.2_1 --> 0.13.0.3 lang/hs-brainfuck 0.1_15 --> 0.1.0.2 lang/hs-unlambda 0.1.3_8 --> 0.1.4.1 mail/hs-email-validate 2.0.1_1 --> 2.1.3 mail/hs-mime 0.4.0.1_1 --> 0.4.0.2 mail/hs-mime-mail 0.4.5.2_1 --> 0.4.9 mail/hs-mime-types 0.1.0.4_1 --> 0.1.0.6 math/hs-Agda 2.4.0.2_1 --> 2.4.2.3 math/hs-NumInstances 1.3_6 --> 1.4 math/hs-categories 1.0.6_1 --> 1.0.7 math/hs-comonad 4.2.2_1 --> 4.2.7.2 math/hs-contravariant 1.1_1 --> 1.3.2 math/hs-data-lens 2.10.5_1 --> 2.10.7 math/hs-data-lens-template 2.1.8_1 --> 2.1.9 math/hs-ieee754 0.7.3_10 --> 0.7.6 math/hs-mwc-random 0.13.1.2_1 --> 0.13.3.2 math/hs-pointed 4.1_1 --> 4.2.0.2 math/hs-semigroupoids 4.0.4_1 --> 5.0.0.3 math/hs-semigroups 0.15.2_1 --> 0.16.2.2 math/hs-statistics 0.13.2.1_1 --> 0.13.2.3 math/hs-vector-space 0.8.7_1 --> 0.10.2 net/hs-connection 0.2.3_1 --> 0.2.5 net/hs-gsasl 0.3.5_1 --> 0.3.6 net/hs-hoauth2 0.4.3 --> 0.4.8 net/hs-iproute 1.3.1_1 --> 1.5.0 net/hs-network 2.4.2.3_1 --> 2.6.2.1 net/hs-network-info 0.2.0.5_1 --> 0.2.0.7 net/hs-network-multicast 0.0.11_1 --> 0.1.0 net/hs-network-protocol-xmpp 0.4.6_2 --> 0.4.8 net/hs-simple-sendfile 0.2.15_1 --> 0.2.21 print/hs-hscolour 1.20.3_8,1 --> 1.23,1 security/hs-DRBG 0.5.2_1 --> 0.5.4 security/hs-HsOpenSSL 0.11_2 --> 0.11.1.1 security/hs-RSA 2.0.0_1 --> 2.1.0.1 security/hs-SHA 1.6.4.1_1 --> 1.6.4.2 security/hs-cipher-aes 0.2.8_1 --> 0.2.11 security/hs-cipher-aes128 0.6.4_1 --> 0.7.0.1 security/hs-clientsession 0.9.0.3_1 --> 0.9.1.1 security/hs-cprng-aes 0.5.2_1 --> 0.6.1 security/hs-crypto-api 0.13_1 --> 0.13.2 security/hs-crypto-conduit 0.5.4_1 --> 0.5.5 security/hs-crypto-numbers 0.2.3_1 --> 0.2.7 security/hs-crypto-pubkey 0.2.4_1 --> 0.2.8 security/hs-crypto-pubkey-types 0.4.2.2_1 --> 0.4.3 security/hs-crypto-random 0.0.7_1 --> 0.0.9 security/hs-entropy 0.3.2_1 --> 0.3.7 security/hs-gnutls 0.1.5_1 --> 0.2 security/hs-pwstore-fast 2.4.1_1 --> 2.4.4 security/hs-skein 1.0.9_1 --> 1.0.9.3 security/hs-tls 1.2.8_1 --> 1.3.1 security/hs-x509 1.4.11_1 --> 1.6.0 security/hs-x509-store 1.4.4_1 --> 1.6.0 security/hs-x509-system 1.4.5_1 --> 1.6.0 security/hs-x509-validation 1.5.0_1 --> 1.6.0 sysutils/hs-angel 0.5.0_1 --> 0.6.2 sysutils/hs-ekg 0.4.0.1_1 --> 0.4.0.8 sysutils/hs-ekg-core 0.1.0.1_1 --> 0.1.1.0 textproc/hs-Diff 0.3.0_1 --> 0.3.2 textproc/hs-HStringTemplate 0.7.3_1 --> 0.8.3 textproc/hs-HaXml 1.24.1_1 --> 1.25.3 textproc/hs-attoparsec 0.10.4.0_7 --> 0.12.1.6 textproc/hs-attoparsec-enumerator 0.3.3_1 --> 0.3.4 textproc/hs-blaze-html 0.7.0.2_1 --> 0.8.1.0 textproc/hs-blaze-markup 0.6.1.0_1 --> 0.7.0.2 textproc/hs-case-insensitive 1.1.0.3_1 --> 1.2.0.4 textproc/hs-citeproc-hs 0.3.9_1 --> 0.3.10 textproc/hs-double-conversion 0.2.0.6_7 --> 2.0.1.0 textproc/hs-feed 0.3.9.2_1 --> 0.3.10.0 textproc/hs-hexpat 0.20.6_1 --> 0.20.9 textproc/hs-highlighting-kate 0.5.11.1 --> 0.6 textproc/hs-hs-bibutils 5.0_6 --> 5.5 textproc/hs-html-conduit 1.1.0.5_1 --> 1.2.0 textproc/hs-hxt 9.3.1.4_1 --> 9.3.1.15 textproc/hs-hxt-charproperties 9.1.1.1_1 --> 9.2.0.1 textproc/hs-hxt-regex-xmlschema 9.1.0_7 --> 9.2.0.2 textproc/hs-hxt-unicode 9.0.2.2_1 --> 9.0.2.4 textproc/hs-lhs2tex 1.18.1_8 --> 1.19 textproc/hs-pandoc 1.13.2 --> 1.15.0.6 textproc/hs-pandoc-types 1.12.4.1_1 --> 1.12.4.5 textproc/hs-parsec 3.1.5_1 --> 3.1.9 textproc/hs-polyparse 1.9_6 --> 1.11 textproc/hs-stringsearch 0.3.6.5_1 --> 0.3.6.6 textproc/hs-tagsoup 0.13.1_1 --> 0.13.3 textproc/hs-tagstream-conduit 0.5.5.1_1 --> 0.5.5.3 textproc/hs-texmath 0.8.0.1 --> 0.8.3 textproc/hs-uri 0.1.6.2_1 --> 0.1.6.3 textproc/hs-xml 1.3.13_6 --> 1.3.14 textproc/hs-xml-conduit 1.2.1_1 --> 1.3.1 textproc/hs-xml-hamlet 0.4.0.9_1 --> 0.4.0.11 textproc/hs-xml-types 0.3.4_1 --> 0.3.6 textproc/hs-xmlhtml 0.2.3.2_1 --> 0.2.3.4 textproc/hs-yaml 0.8.8.4_1 --> 0.8.13 www/hs-DAV 1.0.1_1 --> 1.0.7 www/hs-HTTP 4000.2.10_1 --> 4000.2.20 www/hs-authenticate 1.3.2.9_1 --> 1.3.2.11 www/hs-cgi 3001.1.8.5_1,1 --> 3001.2.2.2,1 www/hs-cookie 0.4.1.2_1 --> 0.4.1.6 www/hs-gitit 0.10.6.1_1 --> 0.11.1 www/hs-hS3 0.5.8_1 --> 0.5.9 www/hs-happstack-server 7.3.7_1 --> 7.4.4 www/hs-heist 0.13.1.2_1 --> 0.14.1.1 www/hs-hjsmin 0.1.4.7_1 --> 0.1.5.0 www/hs-http-client 0.3.6.1_1 --> 0.4.20 www/hs-http-conduit 2.1.4_1 --> 2.1.8 www/hs-http-date 0.0.4_8 --> 0.0.6.1 www/hs-http-reverse-proxy 0.4.0.1_1 --> 0.4.2 www/hs-http-server 1.0.4_1 --> 1.0.6 www/hs-http-types 0.8.5_1 --> 0.8.6 www/hs-oeis 0.3.5_1 --> 0.3.6 www/hs-path-pieces 0.1.4_1 --> 0.2.0 www/hs-recaptcha 0.1.0.2_1 --> 0.1.0.3 www/hs-shakespeare 2.0.1.1_1 --> 2.0.5 www/hs-snap 0.13.2.8_1 --> 0.14.0.6 www/hs-snap-core 0.9.6.3_1 --> 0.9.7.2 www/hs-snap-server 0.9.4.5_1 --> 0.9.5.1 www/hs-wai 3.0.1.1_1 --> 3.0.3.0 www/hs-wai-app-static 3.0.0_1 --> 3.1.1 www/hs-wai-extra 3.0.1.2_1 --> 3.0.10 www/hs-wai-logger 2.2.0_1 --> 2.2.4.1 www/hs-warp 3.0.0.5_1 --> 3.1.3 www/hs-warp-tls 3.0.0_1 --> 3.1.1 www/hs-webkit 0.12.6.1_1 --> 0.13.1.3 www/hs-xss-sanitize 0.3.5.2_1 --> 0.3.5.6 www/hs-yesod 1.2.6.1_1 --> 1.4.1.5 www/hs-yesod-auth 1.3.4_1 --> 1.4.6 www/hs-yesod-auth-hashdb 1.3.0.1_1 --> 1.4.2.2 www/hs-yesod-bin 1.2.12.3_1 --> 1.4.13.3 www/hs-yesod-core 1.2.19_1 --> 1.4.13 www/hs-yesod-form 1.3.14_1 --> 1.4.4.1 www/hs-yesod-persistent 1.2.3_1 --> 1.4.0.3 www/hs-yesod-static 1.2.4_1 --> 1.5.0.2 www/hs-yesod-test 1.2.3.2_1 --> 1.4.3.1 x11-toolkits/hs-GLURaw 1.4.0.1_1 --> 1.5.0.1 x11-toolkits/hs-GLUT 2.5.1.1_1,1 --> 2.7.0.1,1 x11-toolkits/hs-OpenGL 2.9.2.0_1,1 --> 2.12.0.1,1 x11-toolkits/hs-OpenGLRaw 1.5.0.0_1 --> 2.5.1.0 x11-toolkits/hs-gtk 0.12.5.7_1 --> 0.13.9 x11-toolkits/hs-gtk2hs 0.12.5_1,1 --> 0.13,1 x11-toolkits/hs-gtksourceview2 0.12.5.0_1 --> 0.13.1.3 x11-toolkits/hs-pango 0.12.5.3_1 --> 0.13.1.0 x11-toolkits/hs-vte 0.12.5.0_1 --> 0.13.0.2 x11-toolkits/hs-wx 0.90.1.0_1 --> 0.91.0.0 x11-toolkits/hs-wxc 0.90.1.1_1 --> 0.91.0.0 x11-toolkits/hs-wxcore 0.90.1.1_1 --> 0.91.0.0 x11-toolkits/hs-wxdirect 0.90.1.1_1 --> 0.91.0.0 x11-wm/hs-xmonad 0.11_10 --> 0.11.1 x11-wm/hs-xmonad-contrib 0.11.3_2 --> 0.11.4 x11/hs-xmobar 0.21_1 --> 0.23.1 Removed ports (14): devel/hs-MaybeT Support for computations with failures (deprecated) devel/hs-geniplate Use template Haskell to generate Uniplate-like functions (upstream support is discontinued) devel/hs-glade Binding to the glade library (upstream support is discontinued) devel/hs-haskell-platform The Haskell Platform (it is not tracked any more) devel/hs-ranges Ranges and various functions on them (deprecated) devel/hs-testpack Test Utility Pack for HUnit and QuickCheck (upstream is unmaintained) graphics/hs-soegtk GUI functions as used in the book "The Haskell School of Expression" (upstream support is discontinued) lang/hs-epic Compiler for a simple functional language (it is not needed any more) math/hs-nats Natural numbers (it has been merged into the base library of GHC) multimedia/hs-gstreamer Binding to the GStreamer open source multimedia framework (upstream support is discontinued) [2] www/hs-scgi Haskell library for writing SCGI programs (deprecated) www/hs-yesod-platform Meta package for Yesod (upstream support is discontinued) www/hs-yesod-routes Effective routing for Yesod (upstream support is discontinued) x11-toolkits/hs-gtkglext Binding to the GTK+ OpenGL Extension (upstream support is discontinued) PR: 181049 [1] PR: 197925 [2] PR: 200684 [3] Submitted by: arrowdodger <6yearold@gmail.com> [1] Obtained from: FreeBSD Haskell
Diffstat (limited to 'devel/hs-enclosed-exceptions')