feat: add the ui for "allow the OAuth 2.0 to login"

- update SystemSetting.js
This commit is contained in:
OnEvent 2024-08-08 18:20:13 +08:00
parent 1106bcabf2
commit c9d20f3616
No known key found for this signature in database
GPG Key ID: 3CDB9068A32B4927

View File

@ -99,6 +99,7 @@ const SystemSetting = () => {
case 'TurnstileCheckEnabled':
case 'EmailDomainRestrictionEnabled':
case 'RegisterEnabled':
case 'OAuth2Enabled':
value = inputs[key] === 'true' ? 'false' : 'true';
break;
default:
@ -323,6 +324,12 @@ const SystemSetting = () => {
control={<Checkbox checked={inputs.GitHubOAuthEnabled === 'true'} onChange={handleInputChange} name="GitHubOAuthEnabled" />}
/>
</Grid>
<Grid xs={12} md={3}>
<FormControlLabel
label="允许通过 OAuth 2.0 登录 & 注册"
control={<Checkbox checked={inputs.OAuth2Enabled === 'true'} onChange={handleInputChange} name="OAuth2Enabled" />}
/>
</Grid>
<Grid xs={12} md={3}>
<FormControlLabel
label="允许通过微信登录 & 注册"