Skip to content

Commit

Permalink
Fix New Plex Login option being tied to localLogin settings, and also…
Browse files Browse the repository at this point in the history
… being disabled unecessarily
  • Loading branch information
Mike Kao authored and lenaxia committed Nov 9, 2024
1 parent 502b9fb commit 06954a0
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions src/components/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,26 +120,26 @@ const Login = () => {
<Accordion single atLeastOne>
{({ openIndexes, handleClick, AccordionContent }) => (
<>
<button
className={`w-full cursor-default bg-gray-800 bg-opacity-70 py-2 text-center text-sm font-bold text-gray-400 transition-colors duration-200 focus:outline-none sm:rounded-t-lg ${
openIndexes.includes(0) && 'text-indigo-500'
} ${
settings.currentSettings.localLogin &&
'hover:cursor-pointer hover:bg-gray-700'
}`}
onClick={() => handleClick(0)}
disabled={!settings.currentSettings.localLogin}
>
{intl.formatMessage(messages.signinwithplex)}
</button>
<AccordionContent isOpen={openIndexes.includes(0)}>
<div className="px-10 py-8">
<PlexLoginButton
isProcessing={isProcessing}
onAuthToken={(authToken) => setAuthToken(authToken)}
/>
{settings.currentSettings.newPlexLogin && (
<div>
<button
className={`w-full cursor-default bg-gray-800 bg-opacity-70 py-2 text-center text-sm font-bold text-gray-400 transition-colors duration-200 hover:cursor-pointer hover:bg-gray-700 focus:outline-none ${
openIndexes.includes(0) && 'text-indigo-500'
}`}
onClick={() => handleClick(0)}
>
{intl.formatMessage(messages.signinwithplex)}
</button>
<AccordionContent isOpen={openIndexes.includes(0)}>
<div className="px-10 py-8">
<PlexLoginButton
isProcessing={isProcessing}
onAuthToken={(authToken) => setAuthToken(authToken)}
/>
</div>
</AccordionContent>
</div>
</AccordionContent>
)}
{settings.currentSettings.localLogin && (
<div>
<button
Expand All @@ -160,8 +160,8 @@ const Login = () => {
</AccordionContent>
</div>
)}
{settings.currentSettings.oidcLogin ? (
<>
{settings.currentSettings.oidcLogin && (
<div>
<button
className={`w-full cursor-default bg-gray-800 bg-opacity-70 py-2 text-center text-sm font-bold text-gray-400 transition-colors duration-200 hover:cursor-pointer hover:bg-gray-700 focus:outline-none ${
openIndexes.includes(2)
Expand All @@ -182,8 +182,8 @@ const Login = () => {
/>
</div>
</AccordionContent>
</>
) : null}
</div>
)}
</>
)}
</Accordion>
Expand Down

0 comments on commit 06954a0

Please sign in to comment.