From 0033f5ba2e26acab4ac848ceed21a1f8650bd10a Mon Sep 17 00:00:00 2001
From: "1808837298@qq.com" <1808837298@qq.com>
Date: Tue, 11 Mar 2025 22:36:31 +0800
Subject: [PATCH] refactor: Update OIDC status check to use oidc_enabled flag
---
web/src/components/LoginForm.js | 4 ++--
web/src/components/PersonalSetting.js | 4 ++--
web/src/components/RegisterForm.js | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/web/src/components/LoginForm.js b/web/src/components/LoginForm.js
index d204fb47..d0183d7a 100644
--- a/web/src/components/LoginForm.js
+++ b/web/src/components/LoginForm.js
@@ -230,7 +230,7 @@ const LoginForm = () => {
{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 ? (
}
diff --git a/web/src/components/PersonalSetting.js b/web/src/components/PersonalSetting.js
index 2b7f249c..838c5de0 100644
--- a/web/src/components/PersonalSetting.js
+++ b/web/src/components/PersonalSetting.js
@@ -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('未启用')}
diff --git a/web/src/components/RegisterForm.js b/web/src/components/RegisterForm.js
index 29f1f471..6e79d32d 100644
--- a/web/src/components/RegisterForm.js
+++ b/web/src/components/RegisterForm.js
@@ -263,7 +263,7 @@ const RegisterForm = () => {
{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 ? (
}