mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Small clean ups of onboarding flow v2 changes (#12349)
This commit is contained in:
parent
aa070edd3f
commit
859b80955b
@ -58,7 +58,6 @@ const ONBOARDING_CONFIRM_SRP_ROUTE = '/onboarding/confirm-recovery-phrase';
|
|||||||
const ONBOARDING_CREATE_PASSWORD_ROUTE = '/onboarding/create-password';
|
const ONBOARDING_CREATE_PASSWORD_ROUTE = '/onboarding/create-password';
|
||||||
const ONBOARDING_COMPLETION_ROUTE = '/onboarding/completion';
|
const ONBOARDING_COMPLETION_ROUTE = '/onboarding/completion';
|
||||||
const ONBOARDING_UNLOCK_ROUTE = '/onboarding/unlock';
|
const ONBOARDING_UNLOCK_ROUTE = '/onboarding/unlock';
|
||||||
const ONBOARDING_GET_STARTED_ROUTE = '/onboarding/get-started';
|
|
||||||
const ONBOARDING_HELP_US_IMPROVE_ROUTE = '/onboarding/help-us-improve';
|
const ONBOARDING_HELP_US_IMPROVE_ROUTE = '/onboarding/help-us-improve';
|
||||||
const ONBOARDING_IMPORT_WITH_SRP_ROUTE =
|
const ONBOARDING_IMPORT_WITH_SRP_ROUTE =
|
||||||
'/onboarding/import-with-recovery-phrase';
|
'/onboarding/import-with-recovery-phrase';
|
||||||
@ -216,7 +215,6 @@ export {
|
|||||||
SWAPS_ERROR_ROUTE,
|
SWAPS_ERROR_ROUTE,
|
||||||
SWAPS_MAINTENANCE_ROUTE,
|
SWAPS_MAINTENANCE_ROUTE,
|
||||||
ONBOARDING_ROUTE,
|
ONBOARDING_ROUTE,
|
||||||
ONBOARDING_GET_STARTED_ROUTE,
|
|
||||||
ONBOARDING_HELP_US_IMPROVE_ROUTE,
|
ONBOARDING_HELP_US_IMPROVE_ROUTE,
|
||||||
ONBOARDING_CREATE_PASSWORD_ROUTE,
|
ONBOARDING_CREATE_PASSWORD_ROUTE,
|
||||||
ONBOARDING_IMPORT_WITH_SRP_ROUTE,
|
ONBOARDING_IMPORT_WITH_SRP_ROUTE,
|
||||||
|
@ -4,9 +4,9 @@ import { Redirect } from 'react-router-dom';
|
|||||||
import {
|
import {
|
||||||
DEFAULT_ROUTE,
|
DEFAULT_ROUTE,
|
||||||
ONBOARDING_COMPLETION_ROUTE,
|
ONBOARDING_COMPLETION_ROUTE,
|
||||||
ONBOARDING_GET_STARTED_ROUTE,
|
|
||||||
ONBOARDING_UNLOCK_ROUTE,
|
ONBOARDING_UNLOCK_ROUTE,
|
||||||
LOCK_ROUTE,
|
LOCK_ROUTE,
|
||||||
|
ONBOARDING_WELCOME,
|
||||||
} from '../../../helpers/constants/routes';
|
} from '../../../helpers/constants/routes';
|
||||||
import {
|
import {
|
||||||
getCompletedOnboarding,
|
getCompletedOnboarding,
|
||||||
@ -34,7 +34,7 @@ export default function OnboardingFlowSwitch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isInitialized) {
|
if (!isInitialized) {
|
||||||
return <Redirect to={{ pathname: ONBOARDING_GET_STARTED_ROUTE }} />;
|
return <Redirect to={{ pathname: ONBOARDING_WELCOME }} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Redirect to={{ pathname: ONBOARDING_UNLOCK_ROUTE }} />;
|
return <Redirect to={{ pathname: ONBOARDING_UNLOCK_ROUTE }} />;
|
||||||
|
@ -11,11 +11,11 @@ import {
|
|||||||
JUSTIFY_CONTENT,
|
JUSTIFY_CONTENT,
|
||||||
FONT_WEIGHT,
|
FONT_WEIGHT,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import { INITIALIZE_END_OF_FLOW_ROUTE } from '../../../helpers/constants/routes';
|
|
||||||
import {
|
import {
|
||||||
ThreeStepProgressBar,
|
ThreeStepProgressBar,
|
||||||
threeStepStages,
|
threeStepStages,
|
||||||
} from '../../../components/app/step-progress-bar';
|
} from '../../../components/app/step-progress-bar';
|
||||||
|
import { ONBOARDING_COMPLETION_ROUTE } from '../../../helpers/constants/routes';
|
||||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||||
import RecoveryPhraseChips from './recovery-phrase-chips';
|
import RecoveryPhraseChips from './recovery-phrase-chips';
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ export default function ConfirmRecoveryPhrase({ secretRecoveryPhrase = '' }) {
|
|||||||
type="primary"
|
type="primary"
|
||||||
className="recovery-phrase__footer--button"
|
className="recovery-phrase__footer--button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push(INITIALIZE_END_OF_FLOW_ROUTE);
|
history.push(ONBOARDING_COMPLETION_ROUTE);
|
||||||
}}
|
}}
|
||||||
disabled={!matching}
|
disabled={!matching}
|
||||||
>
|
>
|
||||||
|
@ -76,15 +76,21 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&--button {
|
&--button {
|
||||||
|
@include H6;
|
||||||
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
width: 40%;
|
width: 32%;
|
||||||
color: $primary-blue;
|
color: $primary-blue;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
color: $ui-black;
|
color: $ui-black;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
@ -7,7 +7,7 @@ import Typography from '../../../components/ui/typography';
|
|||||||
import Copy from '../../../components/ui/icon/copy-icon.component';
|
import Copy from '../../../components/ui/icon/copy-icon.component';
|
||||||
import { useCopyToClipboard } from '../../../hooks/useCopyToClipboard';
|
import { useCopyToClipboard } from '../../../hooks/useCopyToClipboard';
|
||||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||||
import { INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE } from '../../../helpers/constants/routes';
|
import { ONBOARDING_CONFIRM_SRP_ROUTE } from '../../../helpers/constants/routes';
|
||||||
import {
|
import {
|
||||||
TEXT_ALIGN,
|
TEXT_ALIGN,
|
||||||
TYPOGRAPHY,
|
TYPOGRAPHY,
|
||||||
@ -91,6 +91,7 @@ export default function RecoveryPhrase({ secretRecoveryPhrase }) {
|
|||||||
}}
|
}}
|
||||||
icon={copied ? null : <Copy size={20} color="#3098DC" />}
|
icon={copied ? null : <Copy size={20} color="#3098DC" />}
|
||||||
className="recovery-phrase__footer--copy--button"
|
className="recovery-phrase__footer--copy--button"
|
||||||
|
type="link"
|
||||||
>
|
>
|
||||||
{copied ? t('copiedExclamation') : t('copyToClipboard')}
|
{copied ? t('copiedExclamation') : t('copyToClipboard')}
|
||||||
</Button>
|
</Button>
|
||||||
@ -98,7 +99,7 @@ export default function RecoveryPhrase({ secretRecoveryPhrase }) {
|
|||||||
type="primary"
|
type="primary"
|
||||||
className="recovery-phrase__footer--button"
|
className="recovery-phrase__footer--button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
history.push(INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE);
|
history.push(ONBOARDING_CONFIRM_SRP_ROUTE);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('next')}
|
{t('next')}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user