fix: update i18n & show warning tip on Login page when License is Inactive

This commit is contained in:
NFish 2024-11-07 14:09:29 +08:00
parent 93b72efc31
commit b3e0a5c078
4 changed files with 21 additions and 2 deletions

View File

@ -97,6 +97,20 @@ const NormalForm = () => {
</div>
</div>
}
if (systemFeatures.license_status === LicenseStatus.NONE) {
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.licenseInactive')}</p>
<p className='system-xs-regular text-text-tertiary mt-1'>{t('login.licenseInactiveTip')}</p>
</div>
</div>
</div>
}
return (
<>

View File

@ -99,7 +99,9 @@ const translation = {
noLoginMethod: 'Authentication method not configured',
noLoginMethodTip: 'Please contact the system admin to add an authentication method.',
licenseExpired: 'License Expired',
licenseExpiredTip: 'Your organization\'s Dify Enterprise license 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.',
licenseInactive: 'License Inactive',
licenseInactiveTip: 'Your organization\'s Dify Enterprise license Inactive.Please contact your administrator to continue using Dify.',
}
export default translation

View File

@ -100,7 +100,9 @@ const translation = {
noLoginMethod: '未配置身份认证方式',
noLoginMethodTip: '请联系系统管理员添加身份认证方式',
licenseExpired: '许可证已过期',
licenseExpiredTip: '您的组织的 Dify 企业许可证已过期。请联系您的管理员续订继续使用 Dify。',
licenseExpiredTip: '您所在空间的 Dify Enterprise 许可证已过期,请联系管理员以继续使用 Dify。',
licenseInactive: '许可证未激活',
licenseInactiveTip: '您的组织的 Dify 企业许可证未激活。请联系您的管理员激活后继续使用 Dify。',
}
export default translation

View File

@ -7,6 +7,7 @@ export enum SSOProtocol {
export enum LicenseStatus {
NONE = 'none',
ACTIVE = 'active',
INACTIVE = 'inactive',
EXPIRED = 'expired',
}