copy to cliboard
This commit is contained in:
+2
-1
@@ -154,7 +154,8 @@
|
||||
"disable_2fa": "غیر فعال کردن دو مرحله ای",
|
||||
"enter_2fa_code": "کد دو مرحله ای خود را وارد کنید",
|
||||
"cancel": "انصراف",
|
||||
"confirm_disable": "تایید غیر فعال سازی"
|
||||
"confirm_disable": "تایید غیر فعال سازی",
|
||||
"seed_copied": "کد پشتیبان با موفقیت کپی شد"
|
||||
},
|
||||
"confrim": {
|
||||
"subject": "حذف",
|
||||
|
||||
@@ -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