Explorar el Código

refactor: Update OIDC status check to use oidc_enabled flag

1808837298@qq.com hace 1 año
padre
commit
0033f5ba2e

+ 2 - 2
web/src/components/LoginForm.js

@@ -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 />}

+ 2 - 2
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('未启用')}
                                         </Button>
                                     </div>
                                 </div>

+ 2 - 2
web/src/components/RegisterForm.js

@@ -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 />}