mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:29:16 +00:00
feat: allow user to sign up
This commit is contained in:
parent
a5e2d57894
commit
e435fe0ff3
@ -93,6 +93,13 @@ const schema: ISchema = {
|
||||
{ label: '简体中文', value: 'zh-CN' },
|
||||
],
|
||||
},
|
||||
allowSignUp: {
|
||||
type: 'string',
|
||||
title: '{{t("Allow sign up")}}',
|
||||
'x-component': 'Checkbox',
|
||||
'x-decorator': 'FormItem',
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -69,7 +69,7 @@ export function RouteSchemaRenderer({ route }) {
|
||||
},
|
||||
);
|
||||
const compile = useCompile();
|
||||
const { title } = useSystemSettings();
|
||||
const { title, allowSignUp = true } = useSystemSettings();
|
||||
if (loading) {
|
||||
return <Spin size={'large'} className={'nb-spin-center'} />;
|
||||
}
|
||||
@ -82,7 +82,7 @@ export function RouteSchemaRenderer({ route }) {
|
||||
</Helmet>
|
||||
<SchemaRenderer
|
||||
components={{ Div }}
|
||||
scope={{ useSignin, useSignup }}
|
||||
scope={{ useSignin, useSignup, allowSignUp }}
|
||||
schema={data}
|
||||
/>
|
||||
</div>
|
||||
|
@ -39,6 +39,7 @@ export default {
|
||||
'Switch role': 'Switch role',
|
||||
'Super admin': 'Super admin',
|
||||
'Language': 'Language',
|
||||
'Allow sign up': 'Allow sign up',
|
||||
'Sign out': 'Sign out',
|
||||
'Cancel': 'Cancel',
|
||||
'Submit': 'Submit',
|
||||
|
@ -40,6 +40,7 @@ export default {
|
||||
'Switch role': '切换角色',
|
||||
'Super admin': '超级管理员',
|
||||
'Language': '语言设置',
|
||||
'Allow sign up': '允许注册',
|
||||
'Sign out': '注销',
|
||||
'Cancel': '取消',
|
||||
'Submit': '提交',
|
||||
|
@ -11,6 +11,10 @@ export default {
|
||||
type: 'boolean',
|
||||
name: 'showLogoOnly',
|
||||
},
|
||||
{
|
||||
type: 'boolean',
|
||||
name: 'allowSignUp',
|
||||
},
|
||||
{
|
||||
type: 'belongsTo',
|
||||
name: 'logo',
|
||||
|
@ -49,6 +49,7 @@ export const signin = {
|
||||
registerlink: {
|
||||
type: 'void',
|
||||
'x-component': 'Div',
|
||||
'x-hidden': '{{allowSignUp !== true}}',
|
||||
properties: {
|
||||
link: {
|
||||
type: 'void',
|
||||
|
Loading…
Reference in New Issue
Block a user