refactor: Update OIDC status check to use oidc_enabled flag

This commit is contained in:
1808837298@qq.com
2025-03-11 22:36:31 +08:00
parent e52ac52e7b
commit 0033f5ba2e
3 changed files with 6 additions and 6 deletions

View File

@@ -230,7 +230,7 @@ const LoginForm = () => {
</Text>
</div>
{status.github_oauth ||
status.oidc ||
status.oidc_enabled ||
status.wechat_login ||
status.telegram_oauth ||
status.linuxdo_oauth ? (
@@ -256,7 +256,7 @@ const LoginForm = () => {
) : (
<></>
)}
{status.oidc ? (
{status.oidc_enabled ? (
<Button
type='primary'
icon={<OIDCIcon />}

View File

@@ -662,10 +662,10 @@ const PersonalSetting = () => {
}}
disabled={
(userState.user && userState.user.oidc_id !== '') ||
!status.oidc
!status.oidc_enabled
}
>
{status.oidc ? t('绑定') : t('未启用')}
{status.oidc_enabled ? t('绑定') : t('未启用')}
</Button>
</div>
</div>

View File

@@ -263,7 +263,7 @@ const RegisterForm = () => {
</Text>
</div>
{status.github_oauth ||
status.oidc ||
status.oidc_enabled ||
status.wechat_login ||
status.telegram_oauth ||
status.linuxdo_oauth ? (
@@ -289,7 +289,7 @@ const RegisterForm = () => {
) : (
<></>
)}
{status.oidc ? (
{status.oidc_enabled ? (
<Button
type='primary'
icon={<OIDCIcon />}