From 80217c70ea85b36417d3f020afea2a8f11e15d05 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Mon, 26 May 2025 20:44:52 -0400 Subject: [PATCH] fix(login): hide login form when only OIDC login is enabled --- src/components/Login/index.tsx | 84 ++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/src/components/Login/index.tsx b/src/components/Login/index.tsx index d496bfa2..b052c2c2 100644 --- a/src/components/Login/index.tsx +++ b/src/components/Login/index.tsx @@ -203,46 +203,50 @@ const Login = () => {
- - { - loginRef.current?.addEventListener( - 'transitionend', - done, - false - ); - }} - onEntered={() => { - document - .querySelector('#email, #username') - ?.focus(); - }} - classNames={{ - appear: 'opacity-0', - appearActive: 'transition-opacity duration-500 opacity-100', - enter: 'opacity-0', - enterActive: 'transition-opacity duration-500 opacity-100', - exitActive: 'transition-opacity duration-0 opacity-0', - }} - > -
- {isJellyfin && - (mediaServerLogin || - !settings.currentSettings.localLogin) ? ( - - ) : ( - settings.currentSettings.localLogin && ( - - ) - )} -
-
-
+ {loginFormVisible && ( + + { + loginRef.current?.addEventListener( + 'transitionend', + done, + false + ); + }} + onEntered={() => { + document + .querySelector('#email, #username') + ?.focus(); + }} + classNames={{ + appear: 'opacity-0', + appearActive: + 'transition-opacity duration-500 opacity-100', + enter: 'opacity-0', + enterActive: + 'transition-opacity duration-500 opacity-100', + exitActive: 'transition-opacity duration-0 opacity-0', + }} + > +
+ {isJellyfin && + (mediaServerLogin || + !settings.currentSettings.localLogin) ? ( + + ) : ( + settings.currentSettings.localLogin && ( + + ) + )} +
+
+
+ )} {additionalLoginOptions.length > 0 && (loginFormVisible ? (