From 4a7ea72d5df3bf773738c88b15c8637e389a2846 Mon Sep 17 00:00:00 2001 From: sct Date: Wed, 26 Mar 2025 12:06:35 +0900 Subject: [PATCH] fix: resolve conflicts and errors after rebase --- server/routes/settings/index.ts | 2 +- .../Discover/PlexWatchlistSlider/index.tsx | 6 +- src/components/Discover/index.tsx | 17 ------ src/components/Login/LocalLogin.tsx | 6 +- src/components/PlexLoginButton/index.tsx | 2 +- src/components/Setup/CreateAccount/index.tsx | 2 +- .../UserGeneralSettings/index.tsx | 8 +-- src/pages/_app.tsx | 2 +- yarn.lock | 55 ++++++++++++++++++- 9 files changed, 67 insertions(+), 33 deletions(-) diff --git a/server/routes/settings/index.ts b/server/routes/settings/index.ts index 53e4dd5f..9c85313b 100644 --- a/server/routes/settings/index.ts +++ b/server/routes/settings/index.ts @@ -17,7 +17,7 @@ import cacheManager from '@server/lib/cache'; import ImageProxy from '@server/lib/imageproxy'; import { Permission } from '@server/lib/permissions'; import { plexFullScanner } from '@server/lib/scanners/plex'; -import type { MainSettings, PlexSetings, JobId } from '@server/lib/settings'; +import type { JobId, MainSettings, PlexSettings } from '@server/lib/settings'; import { getSettings } from '@server/lib/settings'; import logger from '@server/logger'; import { isAuthenticated } from '@server/middleware/auth'; diff --git a/src/components/Discover/PlexWatchlistSlider/index.tsx b/src/components/Discover/PlexWatchlistSlider/index.tsx index 76fba57c..a3f73020 100644 --- a/src/components/Discover/PlexWatchlistSlider/index.tsx +++ b/src/components/Discover/PlexWatchlistSlider/index.tsx @@ -1,6 +1,6 @@ import Slider from '@app/components/Slider'; import TmdbTitleCard from '@app/components/TitleCard/TmdbTitleCard'; -import { UserType, useUser } from '@app/hooks/useUser'; +import { useUser } from '@app/hooks/useUser'; import { ArrowRightCircleIcon } from '@heroicons/react/24/outline'; import type { WatchlistItem } from '@server/interfaces/api/discoverInterfaces'; import Link from 'next/link'; @@ -22,12 +22,12 @@ const PlexWatchlistSlider = () => { totalPages: number; totalResults: number; results: WatchlistItem[]; - }>(user?.userType === UserType.PLEX ? '/api/v1/discover/watchlist' : null, { + }>(user?.isPlexUser ? '/api/v1/discover/watchlist' : null, { revalidateOnMount: true, }); if ( - user?.userType !== UserType.PLEX || + !user?.isPlexUser || (watchlistItems && watchlistItems.results.length === 0 && !user?.settings?.watchlistSyncMovies && diff --git a/src/components/Discover/index.tsx b/src/components/Discover/index.tsx index c3abb02b..38875dbe 100644 --- a/src/components/Discover/index.tsx +++ b/src/components/Discover/index.tsx @@ -14,15 +14,6 @@ import RecentRequestsSlider from '@app/components/Discover/RecentRequestsSlider' import StudioSlider from '@app/components/Discover/StudioSlider'; import TvGenreSlider from '@app/components/Discover/TvGenreSlider'; import MediaSlider from '@app/components/MediaSlider'; -import RequestCard from '@app/components/RequestCard'; -import Slider from '@app/components/Slider'; -import TmdbTitleCard from '@app/components/TitleCard/TmdbTitleCard'; -import { Permission, useUser } from '@app/hooks/useUser'; -import { ArrowCircleRightIcon } from '@heroicons/react/outline'; -import type { WatchlistItem } from '@server/interfaces/api/discoverInterfaces'; -import type { MediaResultsResponse } from '@server/interfaces/api/mediaInterfaces'; -import type { RequestResultsResponse } from '@server/interfaces/api/requestInterfaces'; -import Link from 'next/link'; import { encodeURIExtraParams } from '@app/hooks/useDiscover'; import { Permission, useUser } from '@app/hooks/useUser'; import globalMessages from '@app/i18n/globalMessages'; @@ -82,14 +73,6 @@ const Discover = () => { const hasChanged = () => !Object.is(discoverData, sliders); - const { data: watchlistItems, error: watchlistError } = useSWR<{ - page: number; - totalPages: number; - totalResults: number; - results: WatchlistItem[]; - }>(user?.isPlexUser ? '/api/v1/discover/watchlist' : null, { - revalidateOnMount: true, - }); const updateSliders = async () => { try { await axios.post('/api/v1/settings/discover', sliders); diff --git a/src/components/Login/LocalLogin.tsx b/src/components/Login/LocalLogin.tsx index fd793915..ba6e9a76 100644 --- a/src/components/Login/LocalLogin.tsx +++ b/src/components/Login/LocalLogin.tsx @@ -2,7 +2,6 @@ import Button from '@app/components/Common/Button'; import SensitiveInput from '@app/components/Common/SensitiveInput'; import useSettings from '@app/hooks/useSettings'; import { useUser } from '@app/hooks/useUser'; -import { LoginIcon, SupportIcon } from '@heroicons/react/outline'; import { ArrowLeftOnRectangleIcon, LifebuoyIcon, @@ -113,7 +112,6 @@ const LocalLogin = ({ onError }: LocalLoginProps) => { data-lpignore="false" data-bwignore="false" /> - {errors.password && touched.password && @@ -131,7 +129,7 @@ const LocalLogin = ({ onError }: LocalLoginProps) => { disabled={isSubmitting || !isValid} data-testid="local-signin-button" > - + {isSubmitting ? intl.formatMessage(messages.signingin) @@ -143,7 +141,7 @@ const LocalLogin = ({ onError }: LocalLoginProps) => {