From 4eef2c57cf9178cdf5b0a882d6fae0dcdcfae89a Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 15 Sep 2016 20:51:41 -0700 Subject: Show loading indication when selecting ShapeShift --- ui/app/components/loading.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ui/app/components/loading.js (limited to 'ui/app/components/loading.js') diff --git a/ui/app/components/loading.js b/ui/app/components/loading.js new file mode 100644 index 000000000..ae735894f --- /dev/null +++ b/ui/app/components/loading.js @@ -0,0 +1,44 @@ +const inherits = require('util').inherits +const Component = require('react').Component +const h = require('react-hyperscript') +const ReactCSSTransitionGroup = require('react-addons-css-transition-group') + + +inherits(LoadingIndicator, Component) +module.exports = LoadingIndicator + +function LoadingIndicator () { + Component.call(this) +} + +LoadingIndicator.prototype.render = function () { + var isLoading = this.props.isLoading + + return ( + h(ReactCSSTransitionGroup, { + className: 'css-transition-group', + transitionName: 'loader', + transitionEnterTimeout: 150, + transitionLeaveTimeout: 150, + }, [ + + isLoading ? h('div', { + style: { + zIndex: 10, + position: 'absolute', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + height: '100%', + width: '100%', + background: 'rgba(255, 255, 255, 0.5)', + }, + }, [ + h('img', { + src: 'images/loading.svg', + }), + ]) : null, + ]) + ) +} + -- cgit From 5d8a3dd99b0cebad48e2fdcc4c407d7d89d4717c Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 18 Jan 2017 16:45:39 -0800 Subject: Add ability to import v3 JSON wallets There is now a menu item labeled "JSON File" for importing, and it can digest either: - v1 MyEtherWallet JSON files - v3 Account files (used by Geth, Mist, and MyEtherWallet). Fixes #715 --- ui/app/components/loading.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui/app/components/loading.js') diff --git a/ui/app/components/loading.js b/ui/app/components/loading.js index ae735894f..88dc535df 100644 --- a/ui/app/components/loading.js +++ b/ui/app/components/loading.js @@ -12,7 +12,7 @@ function LoadingIndicator () { } LoadingIndicator.prototype.render = function () { - var isLoading = this.props.isLoading + const { isLoading, loadingMessage } = this.props return ( h(ReactCSSTransitionGroup, { @@ -37,8 +37,14 @@ LoadingIndicator.prototype.render = function () { h('img', { src: 'images/loading.svg', }), + + showMessageIfAny(loadingMessage), ]) : null, ]) ) } +function showMessageIfAny (loadingMessage) { + if (!loadingMessage) return null + return h('span', loadingMessage) +} -- cgit