diff options
Diffstat (limited to 'ui/app/app.js')
-rw-r--r-- | ui/app/app.js | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 25d6b1685..6088d17e4 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -8,6 +8,7 @@ const extend = require('xtend') const actions = require('./actions') const ReactCSSTransitionGroup = require('react-addons-css-transition-group') // init +const DisclaimerScreen = require('./first-time/disclaimer') const InitializeMenuScreen = require('./first-time/init-menu') const CreateVaultScreen = require('./first-time/create-vault') const CreateVaultCompleteScreen = require('./first-time/create-vault-complete') @@ -39,6 +40,7 @@ function App() { Component.call(this) } function mapStateToProps(state) { return { // state from plugin + isConfirmed: state.metamask.isConfirmed, isInitialized: state.metamask.isInitialized, isUnlocked: state.metamask.isUnlocked, currentView: state.appState.currentView, @@ -240,6 +242,10 @@ App.prototype.renderDropdown = function() { App.prototype.renderPrimary = function(){ var props = this.props + if (!props.isConfirmed) { + return h(DisclaimerScreen, {key: 'disclaimerScreen'}) + } + if (props.seedWords) { return h(CreateVaultCompleteScreen, {key: 'createVaultComplete'}) } @@ -314,37 +320,3 @@ App.prototype.toggleMetamaskActive = function(){ } } -function onOffToggle(state){ - var buttonSize = '50px'; - var lockWidth = '20px'; - return ( - h('.app-toggle.flex-row.flex-center.lock' + (state.isUnlocked ? '.unlocked' : '.locked'), { - width: buttonSize, - height: buttonSize, - }, [ - h('div', { - onClick: state.toggleMetamaskActive, - style: { - width: lockWidth, - height: '' + parseInt(lockWidth) * 1.5 + 'px', - position: 'relative', - } - }, [ - h('img.lock-top', { - src: 'images/lock-top.png', - style: { - width: lockWidth, - position: 'absolute', - } - }), - h('img', { - src: 'images/lock-base.png', - style: { - width: lockWidth, - position: 'absolute', - } - }), - ]) - ]) - ) -} |