mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-11 17:16:50 -05:00
Compare commits
3 Commits
renovate/a
...
fallenbage
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
098155baa4 | ||
|
|
e0a81038cd | ||
|
|
4ab919360a |
@@ -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>
|
||||
)
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user