Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-86duf5a56 - NEON3 - Onboarding - UX Improvements #166

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/renderer/src/locales/en/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@
"importEncryptedSubtitle": "Your encrypted key has been recognised, please complete the below fields to continue.",
"invalidAddress": "Invalid address",
"unexpectedError": "Unexpected error",
"locateFileButtonLabel": "Locate file..."
"locateFileButtonLabel": "Locate file...",
"neon2Warning": "This file is created during the migration process in your Neon 2 wallet. Start the process in Neon 2 to create the file.",
"importSuccess": "Compatible file identified!",
"importError": "Compatible file not recognised"
},
"step4": {
"title": "Please be patient, we are now setting up your wallet"
Expand Down
11 changes: 11 additions & 0 deletions src/renderer/src/routes/pages/Welcome/ImportWallet/Step3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Fragment, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import { TbFileImport } from 'react-icons/tb'
import { Location, useLocation, useNavigate } from 'react-router-dom'
import { Banner } from '@renderer/components/Banner'
import { Button } from '@renderer/components/Button'
import { Textarea } from '@renderer/components/Textarea'
import { UtilsHelper } from '@renderer/helpers/UtilsHelper'
Expand Down Expand Up @@ -206,6 +207,16 @@ export const WelcomeImportWalletStep3Page = () => {
onClick={fileActions.handleBrowse}
/>

{!fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="warning" message={t('neon2Warning')} className="my-3" />
)}

{fileActions.actionState.errors.path && <Banner type="warning" message={t('importError')} className="my-3" />}

{fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="success" message={t('importSuccess')} className="my-3" />
)}

<Button
label={commonT('general.next')}
className="w-64 mt-auto"
Expand Down
3 changes: 3 additions & 0 deletions src/shared/@types/i18next-resources.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ interface Resources {
invalidAddress: 'Invalid address'
unexpectedError: 'Unexpected error'
locateFileButtonLabel: 'Locate file...'
neon2Warning: 'This file is created during the migration process in your Neon 2 wallet. Start the process in Neon 2 to create the file.'
importSuccess: 'Compatible file identified!'
importError: 'Compatible file not recognised'
}
step4: {
title: 'Please be patient, we are now setting up your wallet'
Expand Down