feat(admin-next): add disableGuestLogin and disableUserRegister in admin/config

pull/90/head
moonrailgun 2 years ago
parent 0d7d71d22f
commit 43cc8e34a3

@ -43,6 +43,8 @@ export const i18n: TushanContextProps['i18n'] = {
config: {
uploadFileLimit: 'Upload file limit (Byte)',
emailVerification: 'Mandatory Email Verification',
allowGuestLogin: 'Allow Guest Login',
allowUserRegister: 'Allow User Register',
serverName: 'Server Name',
serverEntryImage: 'Server Entry Page Image',
},
@ -176,6 +178,8 @@ export const i18n: TushanContextProps['i18n'] = {
config: {
uploadFileLimit: '上传文件限制(Byte)',
emailVerification: '邮箱强制验证',
allowGuestLogin: '允许访客登录',
allowUserRegister: '允许用户注册',
serverName: '服务器名',
serverEntryImage: '服务器登录图',
},

@ -106,6 +106,14 @@ export const SystemConfig: React.FC = React.memo(() => {
{config.emailVerification ? <IconCheck /> : <IconClose />}
</Form.Item>
<Form.Item label={t('custom.config.allowGuestLogin')}>
{!config.disableGuestLogin ? <IconCheck /> : <IconClose />}
</Form.Item>
<Form.Item label={t('custom.config.allowUserRegister')}>
{!config.disableUserRegister ? <IconCheck /> : <IconClose />}
</Form.Item>
<Form.Item label={t('custom.config.serverName')}>
<Input
value={serverName}

Loading…
Cancel
Save