copy to cliboard
This commit is contained in:
@@ -67,6 +67,11 @@ const TwoFactor: FC = () => {
|
||||
setToken(value)
|
||||
}
|
||||
|
||||
const handleCopySeed = (seed: string) => {
|
||||
navigator.clipboard.writeText(seed)
|
||||
toast(t('setting.seed_copied'), 'success')
|
||||
}
|
||||
|
||||
if (isEnabled) {
|
||||
return (
|
||||
<Enabled />
|
||||
@@ -124,7 +129,7 @@ const TwoFactor: FC = () => {
|
||||
</div>
|
||||
<div className='text-xs text-gray-500 bg-gray-50 p-3 rounded-lg'>
|
||||
<div className='font-medium mb-1'>{t('setting.manual_entry')}:</div>
|
||||
<div className='font-mono break-all text-gray-700'>{qrData.seed}</div>
|
||||
<div onClick={() => handleCopySeed(qrData.seed)} className='font-mono break-all text-gray-700 cursor-pointer'>{qrData.seed}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user