feat: use new card
This commit is contained in:
parent
3ab086edcd
commit
cb087490c0
|
@ -3,6 +3,8 @@ import { Button, InformationBox, Input, Text } from '@status-im/components'
|
|||
import { ClearIcon, CloseCircleIcon } from '@status-im/icons'
|
||||
import { useState } from 'react'
|
||||
|
||||
import KeystoreBackupsCard from './KeystoreBackupsCard'
|
||||
|
||||
const KeystoreFiles = () => {
|
||||
const [encryptedPassword, setEncryptedPassword] = useState('')
|
||||
const [confirmEncryptedPassword, setConfirmEncryptedPassword] = useState('')
|
||||
|
@ -37,15 +39,6 @@ const KeystoreFiles = () => {
|
|||
setDisplayConfirmEncryptedPassword(getHidedPassword(password.length))
|
||||
}
|
||||
|
||||
const downloadKeyFilesHandler = () => {
|
||||
const element = document.createElement('a')
|
||||
const file = new Blob([''], { type: 'text/plain' })
|
||||
element.href = URL.createObjectURL(file)
|
||||
element.download = 'keystore_files.txt'
|
||||
document.body.appendChild(element)
|
||||
element.click()
|
||||
}
|
||||
|
||||
const getHidedPassword = (passwordLength: number) => {
|
||||
return '*'.repeat(passwordLength)
|
||||
}
|
||||
|
@ -103,38 +96,7 @@ const KeystoreFiles = () => {
|
|||
/>
|
||||
</YStack>
|
||||
</YStack>
|
||||
<YStack
|
||||
style={{
|
||||
border: '1px solid #DCE0E5',
|
||||
borderRadius: '16px',
|
||||
padding: '12px 16px',
|
||||
width: '32%',
|
||||
marginTop: '3.4%',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
onClick={downloadKeyFilesHandler}
|
||||
>
|
||||
<Text size={15} weight={'semibold'}>
|
||||
Download Keystore Backups
|
||||
</Text>
|
||||
<XStack
|
||||
style={{
|
||||
justifyContent: 'space-between',
|
||||
width: '100%',
|
||||
alignItems: 'center',
|
||||
marginTop: '8px',
|
||||
}}
|
||||
>
|
||||
<Text size={13} color="#647084">
|
||||
Your keystore files are loaded automatically, please secure your keystore backups for
|
||||
recovery.
|
||||
</Text>
|
||||
<img
|
||||
src={'/icons/download-keystore-backups-icon.svg'}
|
||||
alt="download-keystore-backups"
|
||||
/>
|
||||
</XStack>
|
||||
</YStack>
|
||||
<KeystoreBackupsCard />
|
||||
</XStack>
|
||||
<Stack style={{ width: 'fit-content' }}>
|
||||
<Button onPress={generateKeystoreFilesHandler}>Generate Key files</Button>
|
||||
|
|
Loading…
Reference in New Issue