diff options
author | Jacky Chan <jchan@uber.com> | 2017-08-18 19:11:26 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-21 12:51:37 +0800 |
commit | 0264ecaad77330b151f4bf4248b66f4659a67cce (patch) | |
tree | 0d1a062177a9fff3e32ee89459c3c75aee530a1b /ui/app | |
parent | 20cb6a76ddcad83645b8e67b31d0bce3c8cee116 (diff) | |
download | tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.gz tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.bz2 tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.lz tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.xz tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.zst tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.zip |
Adding CreatePasswordScreen
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/app.js | 24 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 613577913..57e3d3366 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -3,6 +3,8 @@ const Component = require('react').Component const connect = require('react-redux').connect const h = require('react-hyperscript') const actions = require('./actions') +// mascara +const MascaraFirstTime = require('../../mascara/src/app/first-time').default // init const InitializeMenuScreen = require('./first-time/init-menu') const NewKeyChainScreen = require('./new-keychain') @@ -43,6 +45,10 @@ function mapStateToProps (state) { accounts, address, keyrings, + isMascara, + isInitialized, + noActiveNotices, + seedWords } = state.metamask const selected = address || Object.keys(accounts)[0] @@ -56,6 +62,8 @@ function mapStateToProps (state) { currentView: state.appState.currentView, activeAddress: state.appState.activeAddress, transForward: state.appState.transForward, + isMascara: state.metamask.isMascara, + isOnboarding: Boolean(!noActiveNotices || seedWords || !isInitialized), seedWords: state.metamask.seedWords, unapprovedTxs: state.metamask.unapprovedTxs, unapprovedMsgs: state.metamask.unapprovedMsgs, @@ -123,6 +131,11 @@ App.prototype.renderAppBar = function () { const props = this.props const state = this.state || {} const isNetworkMenuOpen = state.isNetworkMenuOpen || false + const {isMascara, isOnboarding} = props + + if (isMascara && isOnboarding) { + return null + } return ( @@ -407,9 +420,20 @@ App.prototype.renderBackButton = function (style, justArrow = false) { ) } +App.prototype.renderMascaraFirstTime = function () { + return 'hi' +} + App.prototype.renderPrimary = function () { log.debug('rendering primary') var props = this.props + const {isMascara, isOnboarding} = props + + if (isMascara && isOnboarding) { + return h(MascaraFirstTime, { + screenType: MascaraFirstTime.getScreenType(props) + }) + } // notices if (!props.noActiveNotices) { diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index e0c416c2d..323539eef 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -1,5 +1,6 @@ const extend = require('xtend') const actions = require('../actions') +const MetamascaraPlatform = require('../../../app/scripts/platforms/window') module.exports = reduceMetamask @@ -10,6 +11,7 @@ function reduceMetamask (state, action) { var metamaskState = extend({ isInitialized: false, isUnlocked: false, + isMascara: window.platform instanceof MetamascaraPlatform, rpcTarget: 'https://rawtestrpc.metamask.io/', identities: {}, unapprovedTxs: {}, |