diff --git a/src/views/DeveloperPage.tsx b/src/pages/DeveloperPage.tsx similarity index 100% rename from src/views/DeveloperPage.tsx rename to src/pages/DeveloperPage.tsx diff --git a/src/views/HomePage.tsx b/src/pages/HomePage.tsx similarity index 81% rename from src/views/HomePage.tsx rename to src/pages/HomePage.tsx index 2a5ab65a..a2b54afd 100644 --- a/src/views/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -6,12 +6,12 @@ import { MWQuery } from "@/backend/metadata/types/mw"; import { WideContainer } from "@/components/layout/WideContainer"; import { useDebounce } from "@/hooks/useDebounce"; import { useSearchQuery } from "@/hooks/useSearchQuery"; -import { HomeLayout } from "@/views/layouts/HomeLayout"; -import { BookmarksPart } from "@/views/parts/home/BookmarksPart"; -import { HeroPart } from "@/views/parts/home/HeroPart"; -import { WatchingPart } from "@/views/parts/home/WatchingPart"; -import { SearchListPart } from "@/views/parts/search/SearchListPart"; -import { SearchLoadingPart } from "@/views/parts/search/SearchLoadingPart"; +import { HomeLayout } from "@/pages/layouts/HomeLayout"; +import { BookmarksPart } from "@/pages/parts/home/BookmarksPart"; +import { HeroPart } from "@/pages/parts/home/HeroPart"; +import { WatchingPart } from "@/pages/parts/home/WatchingPart"; +import { SearchListPart } from "@/pages/parts/search/SearchListPart"; +import { SearchLoadingPart } from "@/pages/parts/search/SearchLoadingPart"; function useSearch(search: MWQuery) { const [searching, setSearching] = useState(false); diff --git a/src/views/SearchPage.tsx b/src/pages/SearchPage.tsx similarity index 97% rename from src/views/SearchPage.tsx rename to src/pages/SearchPage.tsx index 64ab09e9..94b3b40e 100644 --- a/src/views/SearchPage.tsx +++ b/src/pages/SearchPage.tsx @@ -9,7 +9,7 @@ import { SectionHeading } from "@/components/layout/SectionHeading"; import { MediaGrid } from "@/components/media/MediaGrid"; import { WatchedMediaCard } from "@/components/media/WatchedMediaCard"; import { useLoading } from "@/hooks/useLoading"; -import { SearchLoadingPart } from "@/views/parts/search/SearchLoadingPart"; +import { SearchLoadingPart } from "@/pages/parts/search/SearchLoadingPart"; function SearchSuffix(props: { failed?: boolean; results?: number }) { const { t } = useTranslation(); diff --git a/src/views/developer/EmbedTesterView.tsx b/src/pages/developer/EmbedTesterView.tsx similarity index 100% rename from src/views/developer/EmbedTesterView.tsx rename to src/pages/developer/EmbedTesterView.tsx diff --git a/src/views/developer/ProviderTesterView.tsx b/src/pages/developer/ProviderTesterView.tsx similarity index 100% rename from src/views/developer/ProviderTesterView.tsx rename to src/pages/developer/ProviderTesterView.tsx diff --git a/src/views/developer/TestView.tsx b/src/pages/developer/TestView.tsx similarity index 100% rename from src/views/developer/TestView.tsx rename to src/pages/developer/TestView.tsx diff --git a/src/views/developer/VideoTesterView.tsx b/src/pages/developer/VideoTesterView.tsx similarity index 100% rename from src/views/developer/VideoTesterView.tsx rename to src/pages/developer/VideoTesterView.tsx diff --git a/src/views/errors/NotFoundPage.tsx b/src/pages/errors/NotFoundPage.tsx similarity index 91% rename from src/views/errors/NotFoundPage.tsx rename to src/pages/errors/NotFoundPage.tsx index d906fb3a..a944e05f 100644 --- a/src/views/errors/NotFoundPage.tsx +++ b/src/pages/errors/NotFoundPage.tsx @@ -4,7 +4,7 @@ import { IconPatch } from "@/components/buttons/IconPatch"; import { Icons } from "@/components/Icon"; import { ArrowLink } from "@/components/text/ArrowLink"; import { Title } from "@/components/text/Title"; -import { ErrorWrapperPart } from "@/views/parts/errors/ErrorWrapperPart"; +import { ErrorWrapperPart } from "@/pages/parts/errors/ErrorWrapperPart"; export function NotFoundPage() { const { t } = useTranslation(); diff --git a/src/views/layouts/HomeLayout.tsx b/src/pages/layouts/HomeLayout.tsx similarity index 100% rename from src/views/layouts/HomeLayout.tsx rename to src/pages/layouts/HomeLayout.tsx diff --git a/src/views/layouts/PageLayout.tsx b/src/pages/layouts/PageLayout.tsx similarity index 100% rename from src/views/layouts/PageLayout.tsx rename to src/pages/layouts/PageLayout.tsx diff --git a/src/views/media/MediaErrorView.tsx b/src/pages/media/MediaErrorView.tsx similarity index 100% rename from src/views/media/MediaErrorView.tsx rename to src/pages/media/MediaErrorView.tsx diff --git a/src/views/media/MediaScrapeLog.tsx b/src/pages/media/MediaScrapeLog.tsx similarity index 100% rename from src/views/media/MediaScrapeLog.tsx rename to src/pages/media/MediaScrapeLog.tsx diff --git a/src/views/media/MediaView.tsx b/src/pages/media/MediaView.tsx similarity index 98% rename from src/views/media/MediaView.tsx rename to src/pages/media/MediaView.tsx index 060340fe..85030371 100644 --- a/src/views/media/MediaView.tsx +++ b/src/pages/media/MediaView.tsx @@ -16,6 +16,8 @@ import { Loading } from "@/components/layout/Loading"; import { useGoBack } from "@/hooks/useGoBack"; import { useLoading } from "@/hooks/useLoading"; import { SelectedMediaData, useScrape } from "@/hooks/useScrape"; +import { ErrorWrapperPart } from "@/pages/parts/errors/ErrorWrapperPart"; +import { MediaNotFoundPart } from "@/pages/parts/errors/MediaNotFoundPart"; import { useWatchedItem } from "@/state/watched"; import { MetaController } from "@/video/components/controllers/MetaController"; import { ProgressListenerController } from "@/video/components/controllers/ProgressListenerController"; @@ -24,8 +26,6 @@ import { SourceController } from "@/video/components/controllers/SourceControlle import { VideoPlayerHeader } from "@/video/components/parts/VideoPlayerHeader"; import { VideoPlayer } from "@/video/components/VideoPlayer"; import { VideoPlayerMeta } from "@/video/state/types"; -import { ErrorWrapperPart } from "@/views/parts/errors/ErrorWrapperPart"; -import { MediaNotFoundPart } from "@/views/parts/errors/MediaNotFoundPart"; import { MediaFetchErrorView } from "./MediaErrorView"; import { MediaScrapeLog } from "./MediaScrapeLog"; diff --git a/src/views/parts/errors/ErrorWrapperPart.tsx b/src/pages/parts/errors/ErrorWrapperPart.tsx similarity index 100% rename from src/views/parts/errors/ErrorWrapperPart.tsx rename to src/pages/parts/errors/ErrorWrapperPart.tsx diff --git a/src/views/parts/errors/MediaNotFoundPart.tsx b/src/pages/parts/errors/MediaNotFoundPart.tsx similarity index 100% rename from src/views/parts/errors/MediaNotFoundPart.tsx rename to src/pages/parts/errors/MediaNotFoundPart.tsx diff --git a/src/views/parts/errors/ProviderNotFoundPart.tsx b/src/pages/parts/errors/ProviderNotFoundPart.tsx similarity index 100% rename from src/views/parts/errors/ProviderNotFoundPart.tsx rename to src/pages/parts/errors/ProviderNotFoundPart.tsx diff --git a/src/views/parts/home/BookmarksPart.tsx b/src/pages/parts/home/BookmarksPart.tsx similarity index 100% rename from src/views/parts/home/BookmarksPart.tsx rename to src/pages/parts/home/BookmarksPart.tsx diff --git a/src/views/parts/home/HeroPart.tsx b/src/pages/parts/home/HeroPart.tsx similarity index 100% rename from src/views/parts/home/HeroPart.tsx rename to src/pages/parts/home/HeroPart.tsx diff --git a/src/views/parts/home/WatchingPart.tsx b/src/pages/parts/home/WatchingPart.tsx similarity index 100% rename from src/views/parts/home/WatchingPart.tsx rename to src/pages/parts/home/WatchingPart.tsx diff --git a/src/views/parts/search/SearchListPart.tsx b/src/pages/parts/search/SearchListPart.tsx similarity index 97% rename from src/views/parts/search/SearchListPart.tsx rename to src/pages/parts/search/SearchListPart.tsx index 7e0db1e6..9d39805c 100644 --- a/src/views/parts/search/SearchListPart.tsx +++ b/src/pages/parts/search/SearchListPart.tsx @@ -9,7 +9,7 @@ import { SectionHeading } from "@/components/layout/SectionHeading"; import { MediaGrid } from "@/components/media/MediaGrid"; import { WatchedMediaCard } from "@/components/media/WatchedMediaCard"; import { useLoading } from "@/hooks/useLoading"; -import { SearchLoadingPart } from "@/views/parts/search/SearchLoadingPart"; +import { SearchLoadingPart } from "@/pages/parts/search/SearchLoadingPart"; function SearchSuffix(props: { failed?: boolean; results?: number }) { const { t } = useTranslation(); diff --git a/src/views/parts/search/SearchLoadingPart.tsx b/src/pages/parts/search/SearchLoadingPart.tsx similarity index 100% rename from src/views/parts/search/SearchLoadingPart.tsx rename to src/pages/parts/search/SearchLoadingPart.tsx diff --git a/src/setup/App.tsx b/src/setup/App.tsx index e5c5bb1f..318ca4ac 100644 --- a/src/setup/App.tsx +++ b/src/setup/App.tsx @@ -11,13 +11,13 @@ import { import { convertLegacyUrl, isLegacyUrl } from "@/backend/metadata/getmeta"; import { generateQuickSearchMediaUrl } from "@/backend/metadata/tmdb"; import { BannerContextProvider } from "@/hooks/useBanner"; +import { NotFoundPage } from "@/pages/errors/NotFoundPage"; +import { HomePage } from "@/pages/HomePage"; +import { MediaView } from "@/pages/media/MediaView"; import { Layout } from "@/setup/Layout"; import { BookmarkContextProvider } from "@/state/bookmark"; import { SettingsProvider } from "@/state/settings"; import { WatchedContextProvider } from "@/state/watched"; -import { NotFoundPage } from "@/views/errors/NotFoundPage"; -import { HomePage } from "@/views/HomePage"; -import { MediaView } from "@/views/media/MediaView"; function LegacyUrlView({ children }: { children: ReactElement }) { const location = useLocation(); @@ -92,13 +92,13 @@ function App() { import("@/views/DeveloperPage"))} + component={lazy(() => import("@/pages/DeveloperPage"))} /> import("@/views/developer/VideoTesterView") + () => import("@/pages/developer/VideoTesterView") )} /> {/* developer routes that can abuse workers are disabled in production */} @@ -108,7 +108,7 @@ function App() { exact path="/dev/test" component={lazy( - () => import("@/views/developer/TestView") + () => import("@/pages/developer/TestView") )} /> @@ -116,14 +116,14 @@ function App() { exact path="/dev/providers" component={lazy( - () => import("@/views/developer/ProviderTesterView") + () => import("@/pages/developer/ProviderTesterView") )} /> import("@/views/developer/EmbedTesterView") + () => import("@/pages/developer/EmbedTesterView") )} />