diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-03-14 01:53:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 01:53:21 +0800 |
commit | 6a17a0cdf1bb3a13b5354606f1cfdac40659689a (patch) | |
tree | 3d6a214b845790c96e2c98e6c140ed6724d261e4 /ui/app/app.js | |
parent | 1fa5cec2ec784ace2dd8d1afab6c0d8cc195feb5 (diff) | |
parent | 572234e383f944eb2be28c4192f209c3972747b7 (diff) | |
download | tangerine-wallet-browser-6a17a0cdf1bb3a13b5354606f1cfdac40659689a.tar tangerine-wallet-browser-6a17a0cdf1bb3a13b5354606f1cfdac40659689a.tar.gz tangerine-wallet-browser-6a17a0cdf1bb3a13b5354606f1cfdac40659689a.tar.bz2 tangerine-wallet-browser-6a17a0cdf1bb3a13b5354606f1cfdac40659689a.tar.lz tangerine-wallet-browser-6a17a0cdf1bb3a13b5354606f1cfdac40659689a.tar.xz tangerine-wallet-browser-6a17a0cdf1bb3a13b5354606f1cfdac40659689a.tar.zst tangerine-wallet-browser-6a17a0cdf1bb3a13b5354606f1cfdac40659689a.zip |
Merge pull request #3468 from danjm/i3033-responsive-newui-onboarding
Make new-ui create password screen responsive.
Diffstat (limited to 'ui/app/app.js')
-rw-r--r-- | ui/app/app.js | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 4e6da24c3..50514bd3b 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -12,6 +12,8 @@ const MascaraBuyEtherScreen = require('../../mascara/src/app/first-time/buy-ethe const OldUIInitializeMenuScreen = require('./first-time/init-menu') const InitializeMenuScreen = MascaraFirstTime const NewKeyChainScreen = require('./new-keychain') +const WelcomeScreen = require('./welcome-screen').default + // accounts const MainContainer = require('./main-container') const SendTransactionScreen2 = require('./components/send/send-v2-container') @@ -91,6 +93,7 @@ function mapStateToProps (state) { betaUI: state.metamask.featureFlags.betaUI, isRevealingSeedWords: state.metamask.isRevealingSeedWords, Qr: state.appState.Qr, + welcomeScreenSeen: state.metamask.welcomeScreenSeen, // state needed to get account dropdown temporarily rendering from app bar identities, @@ -244,6 +247,7 @@ App.prototype.renderAppBar = function () { isInitialized, betaUI, isPopup, + welcomeScreenSeen, } = this.props if (window.METAMASK_UI_TYPE === 'notification') { @@ -269,7 +273,7 @@ App.prototype.renderAppBar = function () { style: {}, }, [ - h('.app-header.flex-row.flex-space-between', { + (isInitialized || welcomeScreenSeen || isPopup || !betaUI) && h('.app-header.flex-row.flex-space-between', { className: classnames({ 'app-header--initialized': !isOnboarding, }), @@ -294,7 +298,7 @@ App.prototype.renderAppBar = function () { ]), ]), - h('div.header__right-actions', [ + betaUI && isInitialized && h('div.header__right-actions', [ h('div.network-component-wrapper', { style: {}, }, [ @@ -324,8 +328,12 @@ App.prototype.renderAppBar = function () { ]), ]), - !isInitialized && !isPopup && betaUI && h('h2.alpha-warning', - 'Please be aware that this version is still under development'), + !isInitialized && !isPopup && betaUI && h('h2', { + className: classnames({ + 'alpha-warning': welcomeScreenSeen, + 'alpha-warning-welcome-screen': !welcomeScreenSeen, + }), + }, 'Please be aware that this version is still under development'), ]) ) @@ -369,11 +377,18 @@ App.prototype.renderPrimary = function () { isOnboarding, betaUI, isRevealingSeedWords, + welcomeScreenSeen, Qr, + isInitialized, + isUnlocked, } = props const isMascaraOnboarding = isMascara && isOnboarding const isBetaUIOnboarding = betaUI && isOnboarding && !props.isPopup && !isRevealingSeedWords + if (!welcomeScreenSeen && betaUI && !isInitialized && !isUnlocked) { + return h(WelcomeScreen) + } + if (isMascaraOnboarding || isBetaUIOnboarding) { return h(MascaraFirstTime) } |