Merge remote-tracking branch 'overseerr/develop' into develop

This commit is contained in:
notfakie
2022-09-01 18:11:15 +12:00
473 changed files with 15548 additions and 8433 deletions

View File

@@ -1,8 +1,7 @@
import PageTitle from '@app/components/Common/PageTitle';
import { ArrowCircleRightIcon } from '@heroicons/react/outline';
import Link from 'next/link';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import PageTitle from '../components/Common/PageTitle';
const messages = defineMessages({
errormessagewithcode: '{statusCode} - {error}',
@@ -10,7 +9,7 @@ const messages = defineMessages({
returnHome: 'Return Home',
});
const Custom404: React.FC = () => {
const Custom404 = () => {
const intl = useIntl();
return (

View File

@@ -1,29 +1,34 @@
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 { MediaServerType } from '@server/constants/server';
import type { PublicSettingsResponse } from '@server/interfaces/api/settingsInterfaces';
import axios from 'axios';
import App, { AppInitialProps, AppProps } from 'next/app';
import type { AppInitialProps, AppProps } from 'next/app';
import App from 'next/app';
import Head from 'next/head';
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { IntlProvider } from 'react-intl';
import { ToastProvider } from 'react-toast-notifications';
import { SWRConfig } from 'swr';
import { MediaServerType } from '../../server/constants/server';
import { 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/StatusChacker';
import Toast from '../components/Toast';
import ToastContainer from '../components/ToastContainer';
import { InteractionProvider } from '../context/InteractionContext';
import { AvailableLocale, LanguageContext } from '../context/LanguageContext';
import { SettingsProvider } from '../context/SettingsContext';
import { UserContext } from '../context/UserContext';
import { User } from '../hooks/useUser';
import '../styles/globals.css';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
switch (locale) {
case 'ar':
return import('../i18n/locale/ar.json');
case 'ca':
return import('../i18n/locale/ca.json');
case 'cs':
@@ -38,12 +43,14 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
return import('../i18n/locale/es.json');
case 'fr':
return import('../i18n/locale/fr.json');
case 'hu':
return import('../i18n/locale/hu.json');
case 'it':
return import('../i18n/locale/it.json');
case 'ja':
return import('../i18n/locale/ja.json');
case 'hu':
return import('../i18n/locale/hu.json');
case 'lt':
return import('../i18n/locale/lt.json');
case 'nb-NO':
return import('../i18n/locale/nb_NO.json');
case 'nl':
@@ -119,6 +126,9 @@ const CoreApp: Omit<NextAppComponentType, 'origGetInitialProps'> = ({
<SWRConfig
value={{
fetcher: (url) => axios.get(url).then((res) => res.data),
fallback: {
'/api/v1/auth/me': user,
},
}}
>
<LanguageContext.Provider value={{ locale: currentLocale, setLocale }}>
@@ -237,6 +247,7 @@ CoreApp.getInitialProps = async (initialProps) => {
: currentSettings.locale;
const messages = await loadLocaleData(locale as AvailableLocale);
await polyfillIntl(locale);
return { ...appInitialProps, user, messages, locale, currentSettings };
};

View File

@@ -1,12 +1,5 @@
import Document, {
DocumentContext,
DocumentInitialProps,
Head,
Html,
Main,
NextScript,
} from 'next/document';
import React from 'react';
import type { DocumentContext, DocumentInitialProps } from 'next/document';
import Document, { Head, Html, Main, NextScript } from 'next/document';
class MyDocument extends Document {
static async getInitialProps(

View File

@@ -1,10 +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 React from 'react';
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,8 +1,7 @@
import CollectionDetails from '@app/components/CollectionDetails';
import type { Collection } from '@server/models/Collection';
import axios from 'axios';
import { GetServerSideProps, NextPage } from 'next';
import React from 'react';
import type { Collection } from '../../../../server/models/Collection';
import CollectionDetails from '../../../components/CollectionDetails';
import type { GetServerSideProps, NextPage } from 'next';
interface CollectionPageProps {
collection?: Collection;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,5 @@
import React from 'react';
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,6 +1,5 @@
import React from 'react';
import { NextPage } from 'next';
import DiscoverTvGenre from '../../../../../components/Discover/DiscoverTvGenre';
import DiscoverTvGenre from '@app/components/Discover/DiscoverTvGenre';
import type { NextPage } from 'next';
const DiscoverTvGenrePage: NextPage = () => {
return <DiscoverTvGenre />;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,6 @@
import React from 'react';
import LoadingSpinner from '../../../components/Common/LoadingSpinner';
import LoadingSpinner from '@app/components/Common/LoadingSpinner';
const PlexLoading: React.FC = () => {
const PlexLoading = () => {
return (
<div>
<LoadingSpinner />

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,8 @@
import RequestList from '@app/components/RequestList';
import type { NextPage } from 'next';
const UserRequestsPage: NextPage = () => {
return <RequestList />;
};
export default UserRequestsPage;

View File

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

View File

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

View File

@@ -1,8 +1,7 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsDiscord from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord';
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';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,8 +1,7 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsEmail from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail';
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';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,8 +1,7 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushbullet from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet';
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';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,8 +1,7 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsPushover from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover';
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';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,8 +1,7 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserNotificationsTelegram from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram';
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';
const NotificationsPage: NextPage = () => {
return (

View File

@@ -1,8 +1,7 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings';
import UserWebPushSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush';
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';
const WebPushProfileNotificationsPage: NextPage = () => {
return (

View File

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

View File

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

View File

@@ -0,0 +1,8 @@
import DiscoverWatchlist from '@app/components/Discover/DiscoverWatchlist';
import type { NextPage } from 'next';
const UserWatchlistPage: NextPage = () => {
return <DiscoverWatchlist />;
};
export default UserWatchlistPage;

View File

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

View File

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

View File

@@ -1,6 +1,5 @@
import React from 'react';
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,7 +1,6 @@
import React from 'react';
import Search from '../components/Search';
import Search from '@app/components/Search';
const SearchPage: React.FC = () => {
const SearchPage = () => {
return <Search />;
};

View File

@@ -1,12 +1,11 @@
import { NextPage } from 'next';
import React from 'react';
import SettingsAbout from '../../components/Settings/SettingsAbout';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
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';
const SettingsAboutPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsAbout />

View File

@@ -1,12 +1,11 @@
import React from 'react';
import { 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';
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';
const SettingsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsMain />

View File

@@ -1,9 +1,8 @@
import React from 'react';
import SettingsJellyfin from '@app/components/Settings/SettingsJellyfin';
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 SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsJellyfin from '../../components/Settings/SettingsJellyfin';
import { Permission } from '../../hooks/useUser';
import useRouteGuard from '../../hooks/useRouteGuard';
const JellyfinSettingsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);

View File

@@ -1,12 +1,11 @@
import React from 'react';
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 SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsJobs from '../../components/Settings/SettingsJobsCache';
import { Permission } from '../../hooks/useUser';
import useRouteGuard from '../../hooks/useRouteGuard';
const SettingsMainPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsJobs />

View File

@@ -1,12 +1,11 @@
import { NextPage } from 'next';
import React from 'react';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsLogs from '../../components/Settings/SettingsLogs';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
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';
const SettingsLogsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsLogs />

View File

@@ -1,12 +1,11 @@
import React from 'react';
import { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsMain from '../../components/Settings/SettingsMain';
import { Permission } from '../../hooks/useUser';
import useRouteGuard from '../../hooks/useRouteGuard';
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';
const SettingsMainPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsMain />

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsSlackPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,13 +1,12 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsWebPushPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsNotifications>

View File

@@ -1,12 +1,11 @@
import React from 'react';
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 { Permission } from '../../hooks/useUser';
import useRouteGuard from '../../hooks/useRouteGuard';
const PlexSettingsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsPlex />

View File

@@ -1,12 +1,11 @@
import React from 'react';
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 { Permission } from '../../hooks/useUser';
import useRouteGuard from '../../hooks/useRouteGuard';
const ServicesSettingsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsServices />

View File

@@ -1,12 +1,11 @@
import React from 'react';
import { NextPage } from 'next';
import SettingsLayout from '../../components/Settings/SettingsLayout';
import SettingsUsers from '../../components/Settings/SettingsUsers';
import { Permission } from '../../hooks/useUser';
import useRouteGuard from '../../hooks/useRouteGuard';
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';
const SettingsUsersPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_SETTINGS);
useRouteGuard(Permission.ADMIN);
return (
<SettingsLayout>
<SettingsUsers />

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,9 +1,8 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserGeneralSettings from '../../../../components/UserProfile/UserSettings/UserGeneralSettings';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
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';
const UserSettingsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,8 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserGeneralSettings from '../../../../components/UserProfile/UserSettings/UserGeneralSettings';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
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';
const UserSettingsMainPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,10 +1,9 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,10 +1,9 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,10 +1,9 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,10 +1,9 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,10 +1,9 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const NotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,10 +1,9 @@
import { NextPage } from 'next';
import React from 'react';
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';
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';
const WebPushNotificationsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,8 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserPasswordChange from '../../../../components/UserProfile/UserSettings/UserPasswordChange';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
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';
const UserPassswordPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -1,9 +1,8 @@
import { NextPage } from 'next';
import React from 'react';
import UserSettings from '../../../../components/UserProfile/UserSettings';
import UserPermissions from '../../../../components/UserProfile/UserSettings/UserPermissions';
import useRouteGuard from '../../../../hooks/useRouteGuard';
import { Permission } from '../../../../hooks/useUser';
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';
const UserPermissionsPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);

View File

@@ -0,0 +1,13 @@
import DiscoverWatchlist from '@app/components/Discover/DiscoverWatchlist';
import useRouteGuard from '@app/hooks/useRouteGuard';
import { Permission } from '@app/hooks/useUser';
import type { NextPage } from 'next';
const UserRequestsPage: NextPage = () => {
useRouteGuard([Permission.MANAGE_REQUESTS, Permission.WATCHLIST_VIEW], {
type: 'or',
});
return <DiscoverWatchlist />;
};
export default UserRequestsPage;

View File

@@ -1,8 +1,7 @@
import React from 'react';
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);