aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2018-03-14 02:00:52 +0800
committerGitHub <noreply@github.com>2018-03-14 02:00:52 +0800
commit1d2cb46eff10023056a36f815e70ae2aec5a7a7d (patch)
tree7ce94489dbd6c30e8f53ddf06dda1b898b95a583 /ui/app/app.js
parentb45ea44aa5eb35c5092d78bc888e884af70db7cb (diff)
parent6a17a0cdf1bb3a13b5354606f1cfdac40659689a (diff)
downloadtangerine-wallet-browser-1d2cb46eff10023056a36f815e70ae2aec5a7a7d.tar
tangerine-wallet-browser-1d2cb46eff10023056a36f815e70ae2aec5a7a7d.tar.gz
tangerine-wallet-browser-1d2cb46eff10023056a36f815e70ae2aec5a7a7d.tar.bz2
tangerine-wallet-browser-1d2cb46eff10023056a36f815e70ae2aec5a7a7d.tar.lz
tangerine-wallet-browser-1d2cb46eff10023056a36f815e70ae2aec5a7a7d.tar.xz
tangerine-wallet-browser-1d2cb46eff10023056a36f815e70ae2aec5a7a7d.tar.zst
tangerine-wallet-browser-1d2cb46eff10023056a36f815e70ae2aec5a7a7d.zip
Merge branch 'master' into i18n
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js23
1 files changed, 19 insertions, 4 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index 8511ee396..9708a2485 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -13,6 +13,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')
@@ -92,6 +94,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,
@@ -245,6 +248,7 @@ App.prototype.renderAppBar = function () {
isInitialized,
betaUI,
isPopup,
+ welcomeScreenSeen,
} = this.props
if (window.METAMASK_UI_TYPE === 'notification') {
@@ -270,7 +274,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,
}),
@@ -295,7 +299,7 @@ App.prototype.renderAppBar = function () {
]),
]),
- h('div.header__right-actions', [
+ betaUI && isInitialized && h('div.header__right-actions', [
h('div.network-component-wrapper', {
style: {},
}, [
@@ -325,8 +329,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'),
])
)
@@ -370,11 +378,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)
}