From c606ccce19996b6d664c29514897c346a09169d2 Mon Sep 17 00:00:00 2001 From: Hom Date: Fri, 25 Feb 2022 18:37:05 +0800 Subject: [PATCH] feat: double confirm ID downloaded or printed (#5733) --- packages/dashboard/src/locales/en-US.json | 3 +-- .../pages/SignUp/steps/MnemonicRevealForm.tsx | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/dashboard/src/locales/en-US.json b/packages/dashboard/src/locales/en-US.json index d6364ca5bc21..cd54f3a28465 100644 --- a/packages/dashboard/src/locales/en-US.json +++ b/packages/dashboard/src/locales/en-US.json @@ -46,8 +46,7 @@ "create_account_identity_title": "Create an Identity for Mask Network", "create_account_sign_in_button": "Recovery", "create_account_persona_exists": "Persona already exists.", - "create_account_identity_warning": "Download your idendity ID to backup safely.", - "create_account_mnemonic_download_or_print": "I’ve downloaded it or printed it ", + "create_account_mnemonic_download_or_print": "I've kept my identity code safely.", "create_account_preview_tip": "This QR saves your identity code, please keep it safely. You can use Mask APP to scan QR to login persona.", "create_account_mnemonic_confirm_failed": "Incorrect identity code", "create_account_connect_social_media_button": "Create", diff --git a/packages/dashboard/src/pages/SignUp/steps/MnemonicRevealForm.tsx b/packages/dashboard/src/pages/SignUp/steps/MnemonicRevealForm.tsx index b6b3bc72e741..3d12741ae42b 100644 --- a/packages/dashboard/src/pages/SignUp/steps/MnemonicRevealForm.tsx +++ b/packages/dashboard/src/pages/SignUp/steps/MnemonicRevealForm.tsx @@ -1,10 +1,9 @@ import { memo, useEffect, useState } from 'react' import { useLocation, useNavigate } from 'react-router-dom' -import { Button, Stack, Box, IconButton } from '@mui/material' +import { Button, Stack, Box, IconButton, FormControlLabel, Checkbox } from '@mui/material' import RefreshIcon from '@mui/icons-material/Refresh' import { MaskColorVar, useCustomSnackbar } from '@masknet/theme' import { DashboardRoutes, ECKeyIdentifier } from '@masknet/shared-base' -import { MaskAlert } from '../../../components/MaskAlert' import { Header } from '../../../components/RegisterFrame/ColumnContentHeader' import { Body, @@ -42,6 +41,7 @@ export const MnemonicRevealForm = memo(() => { }) const [id, setId] = useState(null) const [privateKey, setPrivateKey] = useState('') + const [checked, setChecked] = useState(false) const create = async () => { try { @@ -118,9 +118,19 @@ export const MnemonicRevealForm = memo(() => { + setChecked(e.target.checked)} />} + label={t.create_account_mnemonic_download_or_print()} + sx={{ marginTop: '8px' }} + /> - onPreview('print')}> { - - - -