refactor: absolute imports with path alias (#2960) [skip ci]

This commit is contained in:
Ryan Cohen
2022-08-22 11:02:46 +09:00
committed by GitHub
parent 4b855b8114
commit c6a133d4e5
317 changed files with 1741 additions and 1665 deletions

View File

@@ -1,7 +1,7 @@
import PageTitle from '@app/components/Common/PageTitle';
import { ArrowCircleRightIcon } from '@heroicons/react/outline';
import Link from 'next/link';
import { defineMessages, useIntl } from 'react-intl';
import PageTitle from '../components/Common/PageTitle';
const messages = defineMessages({
errormessagewithcode: '{statusCode} - {error}',

View File

@@ -1,3 +1,19 @@
import Layout from '@app/components/Layout';
import LoadingBar from '@app/components/LoadingBar';
import PWAHeader from '@app/components/PWAHeader';
import ServiceWorkerSetup from '@app/components/ServiceWorkerSetup';
import StatusChecker from '@app/components/StatusChecker';
import Toast from '@app/components/Toast';
import ToastContainer from '@app/components/ToastContainer';
import { InteractionProvider } from '@app/context/InteractionContext';
import type { AvailableLocale } from '@app/context/LanguageContext';
import { LanguageContext } from '@app/context/LanguageContext';
import { SettingsProvider } from '@app/context/SettingsContext';
import { UserContext } from '@app/context/UserContext';
import type { User } from '@app/hooks/useUser';
import '@app/styles/globals.css';
import { polyfillIntl } from '@app/utils/polyfillIntl';
import type { PublicSettingsResponse } from '@server/interfaces/api/settingsInterfaces';
import axios from 'axios';
import type { AppInitialProps, AppProps } from 'next/app';
import App from 'next/app';
@@ -6,22 +22,6 @@ import { useEffect, useState } from 'react';
import { IntlProvider } from 'react-intl';
import { ToastProvider } from 'react-toast-notifications';
import { SWRConfig } from 'swr';
import type { PublicSettingsResponse } from '../../server/interfaces/api/settingsInterfaces';
import Layout from '../components/Layout';
import LoadingBar from '../components/LoadingBar';
import PWAHeader from '../components/PWAHeader';
import ServiceWorkerSetup from '../components/ServiceWorkerSetup';
import StatusChecker from '../components/StatusChecker';
import Toast from '../components/Toast';
import ToastContainer from '../components/ToastContainer';
import { InteractionProvider } from '../context/InteractionContext';
import type { AvailableLocale } from '../context/LanguageContext';
import { LanguageContext } from '../context/LanguageContext';
import { SettingsProvider } from '../context/SettingsContext';
import { UserContext } from '../context/UserContext';
import type { User } from '../hooks/useUser';
import '../styles/globals.css';
import { polyfillIntl } from '../utils/polyfillIntl';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const loadLocaleData = (locale: AvailableLocale): Promise<any> => {

View File

@@ -1,9 +1,9 @@
import PageTitle from '@app/components/Common/PageTitle';
import type { Undefinable } from '@app/utils/typeHelpers';
import { ArrowCircleRightIcon } from '@heroicons/react/outline';
import type { NextPage } from 'next';
import Link from 'next/link';
import { defineMessages, useIntl } from 'react-intl';
import PageTitle from '../components/Common/PageTitle';
import type { Undefinable } from '../utils/typeHelpers';
interface ErrorProps {
statusCode?: number;

View File

@@ -1,7 +1,7 @@
import CollectionDetails from '@app/components/CollectionDetails';
import type { Collection } from '@server/models/Collection';
import axios from 'axios';
import type { GetServerSideProps, NextPage } from 'next';
import type { Collection } from '../../../../server/models/Collection';
import CollectionDetails from '../../../components/CollectionDetails';
interface CollectionPageProps {
collection?: Collection;

View File

@@ -1,5 +1,5 @@
import DiscoverMovieGenre from '@app/components/Discover/DiscoverMovieGenre';
import type { NextPage } from 'next';
import DiscoverMovieGenre from '../../../../../components/Discover/DiscoverMovieGenre';
const DiscoverMoviesGenrePage: NextPage = () => {
return <DiscoverMovieGenre />;

View File

@@ -1,5 +1,5 @@
import MovieGenreList from '@app/components/Discover/MovieGenreList';
import type { NextPage } from 'next';
import MovieGenreList from '../../../components/Discover/MovieGenreList';
const MovieGenresPage: NextPage = () => {
return <MovieGenreList />;

View File

@@ -1,5 +1,5 @@
import DiscoverMovies from '@app/components/Discover/DiscoverMovies';
import type { NextPage } from 'next';
import DiscoverMovies from '../../../components/Discover/DiscoverMovies';
const DiscoverMoviesPage: NextPage = () => {
return <DiscoverMovies />;

View File

@@ -1,5 +1,5 @@
import DiscoverMovieLanguage from '@app/components/Discover/DiscoverMovieLanguage';
import type { NextPage } from 'next';
import DiscoverMovieLanguage from '../../../../../components/Discover/DiscoverMovieLanguage';
const DiscoverMovieLanguagePage: NextPage = () => {
return <DiscoverMovieLanguage />;

View File

@@ -1,5 +1,5 @@
import DiscoverMovieStudio from '@app/components/Discover/DiscoverStudio';
import type { NextPage } from 'next';
import DiscoverMovieStudio from '../../../../../components/Discover/DiscoverStudio';
const DiscoverMoviesStudioPage: NextPage = () => {
return <DiscoverMovieStudio />;

View File

@@ -1,5 +1,5 @@
import UpcomingMovies from '@app/components/Discover/Upcoming';
import type { NextPage } from 'next';
import UpcomingMovies from '../../../components/Discover/Upcoming';
const UpcomingMoviesPage: NextPage = () => {
return <UpcomingMovies />;

View File

@@ -1,5 +1,5 @@
import Trending from '@app/components/Discover/Trending';
import type { NextPage } from 'next';
import Trending from '../../components/Discover/Trending';
const TrendingPage: NextPage = () => {
return <Trending />;

View File

@@ -1,5 +1,5 @@
import DiscoverTvGenre from '@app/components/Discover/DiscoverTvGenre';
import type { NextPage } from 'next';
import DiscoverTvGenre from '../../../../../components/Discover/DiscoverTvGenre';
const DiscoverTvGenrePage: NextPage = () => {
return <DiscoverTvGenre />;

View File

@@ -1,5 +1,5 @@
import TvGenreList from '@app/components/Discover/TvGenreList';
import type { NextPage } from 'next';
import TvGenreList from '../../../components/Discover/TvGenreList';
const TvGenresPage: NextPage = () => {
return <TvGenreList />;

View File

@@ -1,5 +1,5 @@
import DiscoverTv from '@app/components/Discover/DiscoverTv';
import type { NextPage } from 'next';
import DiscoverTv from '../../../components/Discover/DiscoverTv';
const DiscoverTvPage: NextPage = () => {
return <DiscoverTv />;

View File

@@ -1,5 +1,5 @@
import DiscoverTvLanguage from '@app/components/Discover/DiscoverTvLanguage';
import type { NextPage } from 'next';
import DiscoverTvLanguage from '../../../../../components/Discover/DiscoverTvLanguage';
const DiscoverTvLanguagePage: NextPage = () => {
return <DiscoverTvLanguage />;

View File

@@ -1,5 +1,5 @@
import DiscoverNetwork from '@app/components/Discover/DiscoverNetwork';
import type { NextPage } from 'next';
import DiscoverNetwork from '../../../../../components/Discover/DiscoverNetwork';
const DiscoverTvNetworkPage: NextPage = () => {
return <DiscoverNetwork />;

View File

@@ -1,5 +1,5 @@
import DiscoverTvUpcoming from '@app/components/Discover/DiscoverTvUpcoming';
import type { NextPage } from 'next';
import DiscoverTvUpcoming from '../../../components/Discover/DiscoverTvUpcoming';
const DiscoverTvPage: NextPage = () => {
return <DiscoverTvUpcoming />;

View File

@@ -1,5 +1,5 @@
import DiscoverWatchlist from '@app/components/Discover/DiscoverWatchlist';
import type { NextPage } from 'next';
import DiscoverWatchlist from '../../components/Discover/DiscoverWatchlist';
const WatchlistPage: NextPage = () => {
return <DiscoverWatchlist />;

View File

@@ -1,5 +1,5 @@
import Discover from '@app/components/Discover';
import type { NextPage } from 'next';
import Discover from '../components/Discover';
const Index: NextPage = () => {
return <Discover />;

View File

@@ -1,7 +1,7 @@
import IssueDetails from '@app/components/IssueDetails';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import IssueDetails from '../../../components/IssueDetails';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const IssuePage: NextPage = () => {
useRouteGuard(

View File

@@ -1,7 +1,7 @@
import IssueList from '@app/components/IssueList';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import IssueList from '../../components/IssueList';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const IssuePage: NextPage = () => {
useRouteGuard(

View File

@@ -1,5 +1,5 @@
import Login from '@app/components/Login';
import type { NextPage } from 'next';
import Login from '../../components/Login';
const LoginPage: NextPage = () => {
return <Login />;

View File

@@ -1,4 +1,4 @@
import LoadingSpinner from '../../../components/Common/LoadingSpinner';
import LoadingSpinner from '@app/components/Common/LoadingSpinner';
const PlexLoading = () => {
return (

View File

@@ -1,5 +1,5 @@
import MovieCast from '@app/components/MovieDetails/MovieCast';
import type { NextPage } from 'next';
import MovieCast from '../../../components/MovieDetails/MovieCast';
const MovieCastPage: NextPage = () => {
return <MovieCast />;

View File

@@ -1,5 +1,5 @@
import MovieCrew from '@app/components/MovieDetails/MovieCrew';
import type { NextPage } from 'next';
import MovieCrew from '../../../components/MovieDetails/MovieCrew';
const MovieCrewPage: NextPage = () => {
return <MovieCrew />;

View File

@@ -1,7 +1,7 @@
import MovieDetails from '@app/components/MovieDetails';
import type { MovieDetails as MovieDetailsType } from '@server/models/Movie';
import axios from 'axios';
import type { NextPage } from 'next';
import type { MovieDetails as MovieDetailsType } from '../../../../server/models/Movie';
import MovieDetails from '../../../components/MovieDetails';
interface MoviePageProps {
movie?: MovieDetailsType;

View File

@@ -1,5 +1,5 @@
import MovieRecommendations from '@app/components/MovieDetails/MovieRecommendations';
import type { NextPage } from 'next';
import MovieRecommendations from '../../../components/MovieDetails/MovieRecommendations';
const MovieRecommendationsPage: NextPage = () => {
return <MovieRecommendations />;

View File

@@ -1,5 +1,5 @@
import MovieSimilar from '@app/components/MovieDetails/MovieSimilar';
import type { NextPage } from 'next';
import MovieSimilar from '../../../components/MovieDetails/MovieSimilar';
const MovieSimilarPage: NextPage = () => {
return <MovieSimilar />;

View File

@@ -1,5 +1,5 @@
import PersonDetails from '@app/components/PersonDetails';
import type { NextPage } from 'next';
import PersonDetails from '../../../components/PersonDetails';
const MoviePage: NextPage = () => {
return <PersonDetails />;

View File

@@ -1,5 +1,5 @@
import UserProfile from '@app/components/UserProfile';
import type { NextPage } from 'next';
import UserProfile from '../../components/UserProfile';
const UserPage: NextPage = () => {
return <UserProfile />;

View File

@@ -1,6 +1,6 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserGeneralSettings from '@app/components/UserProfile/UserSettings/UserGeneralSettings';
import type { NextPage } from 'next';
import UserSettings from '../../../components/UserProfile/UserSettings';
import UserGeneralSettings from '../../../components/UserProfile/UserSettings/UserGeneralSettings';
const UserSettingsPage: NextPage = () => {
return (

View File

@@ -1,6 +1,6 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserGeneralSettings from '@app/components/UserProfile/UserSettings/UserGeneralSettings';
import type { NextPage } from 'next';
import UserSettings from '../../../components/UserProfile/UserSettings';
import UserGeneralSettings from '../../../components/UserProfile/UserSettings/UserGeneralSettings';
const UserSettingsMainPage: NextPage = () => {
return (

View File

@@ -1,7 +1,7 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsDiscord from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsDiscord from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,7 +1,7 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsEmail from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsEmail from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,7 +1,7 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushbullet from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushbullet from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,7 +1,7 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushover from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushover from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,7 +1,7 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsTelegram from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsTelegram from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,7 +1,7 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserWebPushSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserWebPushSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush';
const WebPushProfileNotificationsPage: NextPage = () => {
return (

View File

@@ -1,6 +1,6 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserPasswordChange from '@app/components/UserProfile/UserSettings/UserPasswordChange';
import type { NextPage } from 'next';
import UserSettings from '../../../components/UserProfile/UserSettings';
import UserPasswordChange from '../../../components/UserProfile/UserSettings/UserPasswordChange';
const UserPassswordPage: NextPage = () => {
return (

View File

@@ -1,6 +1,6 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserPermissions from '@app/components/UserProfile/UserSettings/UserPermissions';
import type { NextPage } from 'next';
import UserSettings from '../../../components/UserProfile/UserSettings';
import UserPermissions from '../../../components/UserProfile/UserSettings/UserPermissions';
const UserPermissionsPage: NextPage = () => {
return (

View File

@@ -1,5 +1,5 @@
import RequestList from '@app/components/RequestList';
import type { NextPage } from 'next';
import RequestList from '../../components/RequestList';
const RequestsPage: NextPage = () => {
return <RequestList />;

View File

@@ -1,5 +1,5 @@
import ResetPassword from '@app/components/ResetPassword';
import type { NextPage } from 'next';
import ResetPassword from '../../../components/ResetPassword';
const ResetPasswordPage: NextPage = () => {
return <ResetPassword />;

View File

@@ -1,5 +1,5 @@
import RequestResetLink from '@app/components/ResetPassword/RequestResetLink';
import type { NextPage } from 'next';
import RequestResetLink from '../../components/ResetPassword/RequestResetLink';
const RequestResetLinkPage: NextPage = () => {
return <RequestResetLink />;

View File

@@ -1,4 +1,4 @@
import Search from '../components/Search';
import Search from '@app/components/Search';
const SearchPage = () => {
return <Search />;

View File

@@ -1,8 +1,8 @@
import SettingsAbout from '@app/components/Settings/SettingsAbout';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsAbout from '../../components/Settings/SettingsAbout';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const SettingsAboutPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,8 +1,8 @@
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsMain from '@app/components/Settings/SettingsMain';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsMain from '../../components/Settings/SettingsMain';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const SettingsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,8 +1,8 @@
import SettingsJobs from '@app/components/Settings/SettingsJobsCache';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsJobs from '../../components/Settings/SettingsJobsCache';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const SettingsMainPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,8 +1,8 @@
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsLogs from '@app/components/Settings/SettingsLogs';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsLogs from '../../components/Settings/SettingsLogs';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const SettingsLogsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,8 +1,8 @@
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsMain from '@app/components/Settings/SettingsMain';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsMain from '../../components/Settings/SettingsMain';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const SettingsMainPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsDiscord from '@app/components/Settings/Notifications/NotificationsDiscord';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsDiscord from '../../../components/Settings/Notifications/NotificationsDiscord';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsEmail from '@app/components/Settings/Notifications/NotificationsEmail';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsEmail from '../../../components/Settings/Notifications/NotificationsEmail';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsGotify from '@app/components/Settings/Notifications/NotificationsGotify';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsGotify from '../../../components/Settings/Notifications/NotificationsGotify';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsLunaSea from '@app/components/Settings/Notifications/NotificationsLunaSea';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsLunaSea from '../../../components/Settings/Notifications/NotificationsLunaSea';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsPushbullet from '@app/components/Settings/Notifications/NotificationsPushbullet';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsPushbullet from '../../../components/Settings/Notifications/NotificationsPushbullet';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsPushover from '@app/components/Settings/Notifications/NotificationsPushover';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsPushover from '../../../components/Settings/Notifications/NotificationsPushover';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsSlack from '@app/components/Settings/Notifications/NotificationsSlack';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsSlack from '../../../components/Settings/Notifications/NotificationsSlack';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsSlackPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsTelegram from '@app/components/Settings/Notifications/NotificationsTelegram';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsTelegram from '../../../components/Settings/Notifications/NotificationsTelegram';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsWebhook from '@app/components/Settings/Notifications/NotificationsWebhook';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsWebhook from '../../../components/Settings/Notifications/NotificationsWebhook';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,9 +1,9 @@
import NotificationsWebPush from '@app/components/Settings/Notifications/NotificationsWebPush';
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsNotifications from '@app/components/Settings/SettingsNotifications';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import NotificationsWebPush from '../../../components/Settings/Notifications/NotificationsWebPush';
import SettingsLayout from '../../../components/Settings/SettingsLayout';
import SettingsNotifications from '../../../components/Settings/SettingsNotifications';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const NotificationsWebPushPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,8 +1,8 @@
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsPlex from '@app/components/Settings/SettingsPlex';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsPlex from '../../components/Settings/SettingsPlex';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const PlexSettingsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,8 +1,8 @@
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsServices from '@app/components/Settings/SettingsServices';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsServices from '../../components/Settings/SettingsServices';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const ServicesSettingsPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,8 +1,8 @@
import SettingsLayout from '@app/components/Settings/SettingsLayout';
import SettingsUsers from '@app/components/Settings/SettingsUsers';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsUsers from '../../components/Settings/SettingsUsers';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const SettingsUsersPage: NextPage = () => {
useRouteGuard(Permission.ADMIN);

View File

@@ -1,5 +1,5 @@
import Setup from '@app/components/Setup';
import type { NextPage } from 'next';
import Setup from '../components/Setup';
const SetupPage: NextPage = () => {
return <Setup />;

View File

@@ -1,5 +1,5 @@
import TvCast from '@app/components/TvDetails/TvCast';
import type { NextPage } from 'next';
import TvCast from '../../../components/TvDetails/TvCast';
const TvCastPage: NextPage = () => {
return <TvCast />;

View File

@@ -1,5 +1,5 @@
import TvCrew from '@app/components/TvDetails/TvCrew';
import type { NextPage } from 'next';
import TvCrew from '../../../components/TvDetails/TvCrew';
const TvCrewPage: NextPage = () => {
return <TvCrew />;

View File

@@ -1,7 +1,7 @@
import TvDetails from '@app/components/TvDetails';
import type { TvDetails as TvDetailsType } from '@server/models/Tv';
import axios from 'axios';
import type { NextPage } from 'next';
import type { TvDetails as TvDetailsType } from '../../../../server/models/Tv';
import TvDetails from '../../../components/TvDetails';
interface TvPageProps {
tv?: TvDetailsType;

View File

@@ -1,5 +1,5 @@
import TvRecommendations from '@app/components/TvDetails/TvRecommendations';
import type { NextPage } from 'next';
import TvRecommendations from '../../../components/TvDetails/TvRecommendations';
const TvRecommendationsPage: NextPage = () => {
return <TvRecommendations />;

View File

@@ -1,5 +1,5 @@
import TvSimilar from '@app/components/TvDetails/TvSimilar';
import type { NextPage } from 'next';
import TvSimilar from '../../../components/TvDetails/TvSimilar';
const TvSimilarPage: NextPage = () => {
return <TvSimilar />;

View File

@@ -1,5 +1,5 @@
import UserProfile from '@app/components/UserProfile';
import type { NextPage } from 'next';
import UserProfile from '../../../components/UserProfile';
const UserPage: NextPage = () => {
return <UserProfile />;

View File

@@ -1,7 +1,7 @@
import RequestList from '@app/components/RequestList';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import RequestList from '../../../components/RequestList';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const UserRequestsPage: NextPage = () => {
useRouteGuard([Permission.MANAGE_REQUESTS, Permission.REQUEST_VIEW], {

View File

@@ -1,8 +1,8 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserGeneralSettings from '@app/components/UserProfile/UserSettings/UserGeneralSettings';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserGeneralSettings from '../../../../components/UserProfile/UserSettings/UserGeneralSettings';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
const UserSettingsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,8 +1,8 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserGeneralSettings from '@app/components/UserProfile/UserSettings/UserGeneralSettings';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserGeneralSettings from '../../../../components/UserProfile/UserSettings/UserGeneralSettings';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
const UserSettingsMainPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,9 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsDiscord from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsDiscord from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord';
import useRouteGuard from '../../../../../hooks/useRouteGuard';
import { Permission } from '../../../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,9 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsEmail from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsEmail from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail';
import useRouteGuard from '../../../../../hooks/useRouteGuard';
import { Permission } from '../../../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,9 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushbullet from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushbullet from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet';
import useRouteGuard from '../../../../../hooks/useRouteGuard';
import { Permission } from '../../../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,9 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushover from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushover from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover';
import useRouteGuard from '../../../../../hooks/useRouteGuard';
import { Permission } from '../../../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,9 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsTelegram from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsTelegram from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram';
import useRouteGuard from '../../../../../hooks/useRouteGuard';
import { Permission } from '../../../../../hooks/useUser';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,9 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserNotificationSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings';
import UserWebPushSettings from '@app/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserWebPushSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush';
import useRouteGuard from '../../../../../hooks/useRouteGuard';
import { Permission } from '../../../../../hooks/useUser';
const WebPushNotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,8 +1,8 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserPasswordChange from '@app/components/UserProfile/UserSettings/UserPasswordChange';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserPasswordChange from '../../../../components/UserProfile/UserSettings/UserPasswordChange';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
const UserPassswordPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,8 +1,8 @@
import UserSettings from '@app/components/UserProfile/UserSettings';
import UserPermissions from '@app/components/UserProfile/UserSettings/UserPermissions';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserPermissions from '../../../../components/UserProfile/UserSettings/UserPermissions';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
const UserPermissionsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,7 +1,7 @@
import UserList from '@app/components/UserList';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
import UserList from '../../components/UserList';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const UsersPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);