1
0
mirror of https://github.com/fallenbagel/jellyseerr.git synced 2026-01-11 17:16:50 -05:00

Compare commits

..

3 Commits

Author SHA1 Message Date
fallenbagel
098155baa4 fix(login): add missing keys to PlexLoginButton FormattedMessage children 2026-01-12 00:08:26 +05:00
fallenbagel
e0a81038cd fix(plex-settings): fix Plex preset selection not enabling save button (#2289)
Uses setValues instead of setFieldValue calls to properly trigger the validation and also added a
validateOnMOunt to ensure form validity is checked on initial render.

fix #2287
2026-01-11 19:17:47 +01:00
fallenbagel
4ab919360a fix(setup): fix Plex login not proceeding after authentication (#2290)
Directly fetch and populate SWR cache with user data instead of relying on revalidate() which is
disabled on auth pages since #2213

fix #2288
2026-01-11 18:43:27 +01:00
5 changed files with 2663 additions and 831 deletions

View File

@@ -103,7 +103,7 @@
"swagger-ui-express": "4.6.2",
"swr": "2.3.7",
"tailwind-merge": "^2.6.0",
"typeorm": "0.3.28",
"typeorm": "0.3.12",
"ua-parser-js": "^1.0.35",
"undici": "^7.16.0",
"validator": "^13.15.23",

3469
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,7 @@ import Button from '@app/components/Common/Button';
import { SmallLoadingSpinner } from '@app/components/Common/LoadingSpinner';
import usePlexLogin from '@app/hooks/usePlexLogin';
import defineMessages from '@app/utils/defineMessages';
import { Fragment } from 'react';
import { FormattedMessage } from 'react-intl';
const messages = defineMessages('components.Login', {
@@ -46,8 +47,12 @@ const PlexLoginButton = ({
>
{(chunks) => (
<>
{chunks.map((c) =>
typeof c === 'string' ? <span>{c}</span> : c
{chunks.map((c, index) =>
typeof c === 'string' ? (
<span key={index}>{c}</span>
) : (
<Fragment key={index}>{c}</Fragment>
)
)}
</>
)}

View File

@@ -377,6 +377,7 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
webAppUrl: data?.webAppUrl,
}}
validationSchema={PlexSettingsSchema}
validateOnMount={true}
onSubmit={async (values) => {
let toastId: string | null = null;
try {
@@ -423,6 +424,7 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
values,
handleSubmit,
setFieldValue,
setValues,
isSubmitting,
isValid,
}) => {
@@ -445,9 +447,12 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
availablePresets[Number(e.target.value)];
if (targPreset) {
setFieldValue('hostname', targPreset.address);
setFieldValue('port', targPreset.port);
setFieldValue('useSsl', targPreset.ssl);
setValues({
...values,
hostname: targPreset.address,
port: targPreset.port,
useSsl: targPreset.ssl,
});
}
}}
>

View File

@@ -28,7 +28,8 @@ const LoginWithPlex = ({ onComplete }: LoginWithPlexProps) => {
const response = await axios.post('/api/v1/auth/plex', { authToken });
if (response.data?.id) {
revalidate();
const { data: user } = await axios.get('/api/v1/auth/me');
revalidate(user, false);
}
};
if (authToken) {