feat: supports license lost status

This commit is contained in:
NFish 2024-11-13 16:11:57 +08:00
parent 8a39b6f05c
commit 9d9400849d
3 changed files with 18 additions and 0 deletions

View File

@ -83,6 +83,20 @@ const NormalForm = () => {
<Loading type='area' /> <Loading type='area' />
</div> </div>
} }
if (systemFeatures.license?.status === LicenseStatus.LOST) {
return <div className='w-full mx-auto mt-8'>
<div className='bg-white'>
<div className="p-4 rounded-lg bg-gradient-to-r from-workflow-workflow-progress-bg-1 to-workflow-workflow-progress-bg-2">
<div className='flex items-center justify-center w-10 h-10 rounded-xl bg-components-card-bg shadow shadows-shadow-lg mb-2 relative'>
<RiContractLine className='w-5 h-5' />
<RiErrorWarningFill className='absolute w-4 h-4 text-text-warning-secondary -top-1 -right-1' />
</div>
<p className='system-sm-medium text-text-primary'>{t('login.licenseLost')}</p>
<p className='system-xs-regular text-text-tertiary mt-1'>{t('login.licenseLostTip')}</p>
</div>
</div>
</div>
}
if (systemFeatures.license?.status === LicenseStatus.EXPIRED) { if (systemFeatures.license?.status === LicenseStatus.EXPIRED) {
return <div className='w-full mx-auto mt-8'> return <div className='w-full mx-auto mt-8'>
<div className='bg-white'> <div className='bg-white'>

View File

@ -100,6 +100,8 @@ const translation = {
noLoginMethodTip: 'Please contact the system admin to add an authentication method.', noLoginMethodTip: 'Please contact the system admin to add an authentication method.',
licenseExpired: 'License Expired', licenseExpired: 'License Expired',
licenseExpiredTip: 'The Dify Enterprise license for your workspace has expired. Please contact your administrator to continue using Dify.', licenseExpiredTip: 'The Dify Enterprise license for your workspace has expired. Please contact your administrator to continue using Dify.',
licenseLost: 'License Lost',
licenseLostTip: 'The Dify Enterprise license server for your workspace lost. Please contact your administrator to continue using Dify.',
licenseInactive: 'License Inactive', licenseInactive: 'License Inactive',
licenseInactiveTip: 'The Dify Enterprise license for your workspace is inactive. Please contact your administrator to continue using Dify.', licenseInactiveTip: 'The Dify Enterprise license for your workspace is inactive. Please contact your administrator to continue using Dify.',
} }

View File

@ -101,6 +101,8 @@ const translation = {
noLoginMethodTip: '请联系系统管理员添加身份认证方式', noLoginMethodTip: '请联系系统管理员添加身份认证方式',
licenseExpired: '许可证已过期', licenseExpired: '许可证已过期',
licenseExpiredTip: '您所在空间的 Dify Enterprise 许可证已过期,请联系管理员以继续使用 Dify。', licenseExpiredTip: '您所在空间的 Dify Enterprise 许可证已过期,请联系管理员以继续使用 Dify。',
licenseLost: '认证服务器丢失',
licenseLostTip: '您所在空间的 Dify Enterprise 认证服务器已丢失,请联系管理员以继续使用 Dify。',
licenseInactive: '许可证未激活', licenseInactive: '许可证未激活',
licenseInactiveTip: '您所在空间的 Dify Enterprise 许可证尚未激活,请联系管理员以继续使用 Dify。', licenseInactiveTip: '您所在空间的 Dify Enterprise 许可证尚未激活,请联系管理员以继续使用 Dify。',
} }