diff --git a/apps/admin/app/dashboard/system/user-security/register-form.tsx b/apps/admin/app/dashboard/system/user-security/register-form.tsx index 18049da..3201c89 100644 --- a/apps/admin/app/dashboard/system/user-security/register-form.tsx +++ b/apps/admin/app/dashboard/system/user-security/register-form.tsx @@ -167,12 +167,58 @@ export default function RegisterConfig() { /> {t('ipRegistrationLimitDescription')} - )} /> + {form.watch('enable_ip_register_limit') && ( +
+ ( + + {t('registrationLimitCount')} + + field.onChange(Number(value))} + /> + + {t('registrationLimitCountDescription')} + + + )} + /> + + ( + + {t('registrationLimitExpire')} + + field.onChange(Number(value))} + /> + + {t('registrationLimitExpireDescription')} + + + )} + /> +
+ )} + - ( - - {t('registrationLimitCount')} - - field.onChange(Number(value))} - /> - - {t('registrationLimitCountDescription')} - - - )} - /> - - ( - - {t('registrationLimitExpire')} - - field.onChange(Number(value))} - /> - - {t('registrationLimitExpireDescription')} - - - )} - /> - - ( - - {t('trialTime')} - - field.onChange(Number(value))} - /> - - {t('trialTimeDescription')} - - - )} - /> - - ( - - {t('trialSubscribe')} - - { - if (value) { - field.onChange(value); - } - }} - options={ - subscribe?.map((item) => ({ - label: item.name, - value: item.id, - })) || [] - } - /> - - {t('trialSubscribeDescription')} - - - )} - /> + {form.watch('enable_trial') && ( + <> + ( + + {t('trialConfig')} + +
+ field.onChange(Number(value))} + className='flex-1' + prefix={ + ( + { + if (value) { + field.onChange(value); + } + }} + options={ + subscribe?.map((item) => ({ + label: item.name, + value: item.id, + })) || [] + } + className='bg-secondary w-32 rounded-r-none' + /> + )} + /> + } + suffix={ + ( + { + unitField.onChange(value); + }} + options={[ + { label: t('none'), value: 'None' }, + { label: t('year'), value: 'Year' }, + { label: t('month'), value: 'Month' }, + { label: t('day'), value: 'Day' }, + { label: t('hour'), value: 'Hour' }, + { label: t('minute'), value: 'Minute' }, + ]} + className='bg-secondary w-32 rounded-l-none' + /> + )} + /> + } + /> +
+
+ {t('trialConfigDescription')} + +
+ )} + /> + + )} diff --git a/apps/admin/app/dashboard/ticket/page.tsx b/apps/admin/app/dashboard/ticket/page.tsx index 6347f66..8f3572b 100644 --- a/apps/admin/app/dashboard/ticket/page.tsx +++ b/apps/admin/app/dashboard/ticket/page.tsx @@ -172,7 +172,7 @@ export default function Page() { {ticket?.description} -
+
{ticket?.follow?.map((item) => (