Fix: account delete function & confirm issues (#7129)

This commit is contained in:
Yi Xiao 2024-08-09 11:37:34 +08:00 committed by GitHub
parent 4dfa8eedb8
commit 34cab0e0b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 10 deletions

View File

@ -89,7 +89,7 @@ function Confirm({
<div className='flex flex-col items-start max-w-full rounded-2xl border-[0.5px] border-solid border-components-panel-border shadows-shadow-lg bg-components-panel-bg'>
<div className='flex pt-6 pl-6 pr-6 pb-4 flex-col items-start gap-2 self-stretch'>
<div className='title-2xl-semi-bold text-text-primary'>{title}</div>
<div className='system-md-regular text-text-tertiary'>{content}</div>
<div className='system-md-regular text-text-tertiary w-full'>{content}</div>
</div>
<div className='flex p-6 gap-2 justify-end items-start self-stretch'>
{showCancel && <Button onClick={onCancel}>{cancelTxt}</Button>}

View File

@ -250,15 +250,29 @@ export default function AccountPage() {
showCancel={false}
type='warning'
title={t('common.account.delete')}
content={<>
content={
<>
<div className='my-1 text-[#D92D20] text-sm leading-5'>
{t('common.account.deleteTip')}
</div>
<div className='mt-3 text-sm leading-5'>
<span>{t('common.account.deleteConfirmTip')}</span>
<a className='text-primary-600 cursor' href={`mailto:support@dify.ai?subject=Delete Account Request&body=Delete Account: ${userProfile.email}`} target='_blank'>support@dify.ai</a>
<a
className='text-primary-600 cursor'
href={`mailto:support@dify.ai?subject=Delete Account Request&body=Delete Account: ${userProfile.email}`}
target='_blank'
rel='noreferrer noopener'
onClick={(e) => {
e.preventDefault()
window.location.href = e.currentTarget.href
}}
>
support@dify.ai
</a>
</div>
</>}
<div className='my-2 px-3 py-2 rounded-lg bg-gray-100 text-sm font-medium leading-5 text-gray-800'>{`${t('common.account.delete')}: ${userProfile.email}`}</div>
</>
}
confirmText={t('common.operation.ok') as string}
/>
)}