mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Merge pull request #3680 from danjm/i3517-popup-newui-onboarding
Popup uses new ui onboarding when in beta.
This commit is contained in:
commit
e001c0900b
@ -122,6 +122,10 @@
|
|||||||
width: calc(100vw - 80px);
|
width: calc(100vw - 80px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unique-image {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.create-password__title,
|
.create-password__title,
|
||||||
.unique-image__title,
|
.unique-image__title,
|
||||||
.tou__title,
|
.tou__title,
|
||||||
@ -221,10 +225,6 @@
|
|||||||
max-width: 46rem;
|
max-width: 46rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backup-phrase {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.create-password__title,
|
.create-password__title,
|
||||||
.unique-image__title,
|
.unique-image__title,
|
||||||
.tou__title,
|
.tou__title,
|
||||||
@ -674,7 +674,6 @@ button.backup-phrase__confirm-seed-option:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.buy-ether__action-content-wrapper {
|
.buy-ether__action-content-wrapper {
|
||||||
width: 360px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import ImportSeedPhraseScreen from './import-seed-phrase-screen'
|
|||||||
import {
|
import {
|
||||||
onboardingBuyEthView,
|
onboardingBuyEthView,
|
||||||
unMarkPasswordForgotten,
|
unMarkPasswordForgotten,
|
||||||
|
showModal,
|
||||||
} from '../../../../ui/app/actions'
|
} from '../../../../ui/app/actions'
|
||||||
|
|
||||||
class FirstTimeFlow extends Component {
|
class FirstTimeFlow extends Component {
|
||||||
@ -80,7 +81,7 @@ class FirstTimeFlow extends Component {
|
|||||||
renderScreen () {
|
renderScreen () {
|
||||||
const {SCREEN_TYPE} = FirstTimeFlow
|
const {SCREEN_TYPE} = FirstTimeFlow
|
||||||
const {
|
const {
|
||||||
goToBuyEtherView,
|
openBuyEtherModal,
|
||||||
address,
|
address,
|
||||||
restoreCreatePasswordScreen,
|
restoreCreatePasswordScreen,
|
||||||
forgottenPassword,
|
forgottenPassword,
|
||||||
@ -131,7 +132,7 @@ class FirstTimeFlow extends Component {
|
|||||||
case SCREEN_TYPE.BACK_UP_PHRASE:
|
case SCREEN_TYPE.BACK_UP_PHRASE:
|
||||||
return (
|
return (
|
||||||
<BackupPhraseScreen
|
<BackupPhraseScreen
|
||||||
next={() => goToBuyEtherView(address)}
|
next={() => openBuyEtherModal()}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
default:
|
default:
|
||||||
@ -167,7 +168,7 @@ export default connect(
|
|||||||
}),
|
}),
|
||||||
dispatch => ({
|
dispatch => ({
|
||||||
leaveImportSeedScreenState: () => dispatch(unMarkPasswordForgotten()),
|
leaveImportSeedScreenState: () => dispatch(unMarkPasswordForgotten()),
|
||||||
goToBuyEtherView: address => dispatch(onboardingBuyEthView(address)),
|
openBuyEtherModal: () => dispatch(showModal({ name: 'DEPOSIT_ETHER'})),
|
||||||
})
|
})
|
||||||
)(FirstTimeFlow)
|
)(FirstTimeFlow)
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ async function runFirstTimeUsageTest (assert, done) {
|
|||||||
;(await findAsync(app, '.first-time-flow__button')).click()
|
;(await findAsync(app, '.first-time-flow__button')).click()
|
||||||
|
|
||||||
// Deposit Ether Screen
|
// Deposit Ether Screen
|
||||||
const buyEthTitle = (await findAsync(app, '.buy-ether__title'))[0]
|
const depositEthTitle = (await findAsync(app, '.page-container__title'))[0]
|
||||||
assert.equal(buyEthTitle.textContent, 'Deposit Ether', 'deposit ether screen')
|
assert.equal(depositEthTitle.textContent, 'Deposit Ether', 'deposit ether screen')
|
||||||
;(await findAsync(app, '.buy-ether__do-it-later')).click()
|
;(await findAsync(app, '.page-container__header-close')).click()
|
||||||
|
|
||||||
const menu = (await findAsync(app, '.account-menu__icon'))[0]
|
const menu = (await findAsync(app, '.account-menu__icon'))[0]
|
||||||
menu.click()
|
menu.click()
|
||||||
|
@ -386,7 +386,7 @@ App.prototype.renderPrimary = function () {
|
|||||||
isUnlocked,
|
isUnlocked,
|
||||||
} = props
|
} = props
|
||||||
const isMascaraOnboarding = isMascara && isOnboarding
|
const isMascaraOnboarding = isMascara && isOnboarding
|
||||||
const isBetaUIOnboarding = betaUI && isOnboarding && !props.isPopup && !isRevealingSeedWords
|
const isBetaUIOnboarding = betaUI && isOnboarding
|
||||||
|
|
||||||
if (!welcomeScreenSeen && betaUI && !isInitialized && !isUnlocked) {
|
if (!welcomeScreenSeen && betaUI && !isInitialized && !isUnlocked) {
|
||||||
return h(WelcomeScreen)
|
return h(WelcomeScreen)
|
||||||
@ -397,7 +397,7 @@ App.prototype.renderPrimary = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// notices
|
// notices
|
||||||
if (!props.noActiveNotices) {
|
if (!props.noActiveNotices && !betaUI) {
|
||||||
log.debug('rendering notice screen for unread notices.')
|
log.debug('rendering notice screen for unread notices.')
|
||||||
return h(NoticeScreen, {
|
return h(NoticeScreen, {
|
||||||
notice: props.lastUnreadNotice,
|
notice: props.lastUnreadNotice,
|
||||||
@ -418,7 +418,7 @@ App.prototype.renderPrimary = function () {
|
|||||||
return h(HDRestoreVaultScreen, {key: 'HDRestoreVaultScreen'})
|
return h(HDRestoreVaultScreen, {key: 'HDRestoreVaultScreen'})
|
||||||
} else if (!props.isInitialized && !props.isUnlocked && !isRevealingSeedWords) {
|
} else if (!props.isInitialized && !props.isUnlocked && !isRevealingSeedWords) {
|
||||||
log.debug('rendering menu screen')
|
log.debug('rendering menu screen')
|
||||||
return props.isPopup
|
return !betaUI
|
||||||
? h(OldUIInitializeMenuScreen, {key: 'menuScreenInit'})
|
? h(OldUIInitializeMenuScreen, {key: 'menuScreenInit'})
|
||||||
: h(InitializeMenuScreen, {key: 'menuScreenInit'})
|
: h(InitializeMenuScreen, {key: 'menuScreenInit'})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user