💄 Prettier repository
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import {
|
||||
Button,
|
||||
Container,
|
||||
createStyles,
|
||||
Group,
|
||||
Text,
|
||||
Title,
|
||||
createStyles,
|
||||
useMantineTheme,
|
||||
} from '@mantine/core';
|
||||
import React from 'react';
|
||||
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import Link from 'next/link';
|
||||
import React from 'react';
|
||||
|
||||
import { getServerSideTranslations } from '../tools/server/getServerSideTranslations';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
|
||||
@@ -2,6 +2,7 @@ import { setCookie } from 'cookies-next';
|
||||
import fs from 'fs';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import path from 'path';
|
||||
|
||||
import { LoadConfigComponent } from '../components/Config/LoadConfig';
|
||||
import { Dashboard } from '../components/Dashboard/Dashboard';
|
||||
import Layout from '../components/layout/Layout';
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
import { ColorScheme, ColorSchemeProvider, MantineProvider, MantineTheme } from '@mantine/core';
|
||||
import { useColorScheme, useHotkeys, useLocalStorage } from '@mantine/hooks';
|
||||
import { ModalsProvider } from '@mantine/modals';
|
||||
import Consola from 'consola';
|
||||
import { Notifications } from '@mantine/notifications';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister';
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client';
|
||||
import Consola from 'consola';
|
||||
import { getCookie } from 'cookies-next';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import { appWithTranslation } from 'next-i18next';
|
||||
import { AppProps } from 'next/app';
|
||||
import Head from 'next/head';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Notifications } from '@mantine/notifications';
|
||||
import 'video.js/dist/video-js.css';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client';
|
||||
import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister';
|
||||
import { api } from '~/utils/api';
|
||||
|
||||
import nextI18nextConfig from '../../next-i18next.config';
|
||||
import { ChangeAppPositionModal } from '../components/Dashboard/Modals/ChangePosition/ChangeAppPositionModal';
|
||||
import { ChangeWidgetPositionModal } from '../components/Dashboard/Modals/ChangePosition/ChangeWidgetPositionModal';
|
||||
import { EditAppModal } from '../components/Dashboard/Modals/EditAppModal/EditAppModal';
|
||||
@@ -22,20 +25,17 @@ import { WidgetsEditModal } from '../components/Dashboard/Tiles/Widgets/WidgetsE
|
||||
import { WidgetsRemoveModal } from '../components/Dashboard/Tiles/Widgets/WidgetsRemoveModal';
|
||||
import { CategoryEditModal } from '../components/Dashboard/Wrappers/Category/CategoryEditModal';
|
||||
import { ConfigProvider } from '../config/provider';
|
||||
import { useEditModeInformationStore } from '../hooks/useEditModeInformation';
|
||||
import '../styles/global.scss';
|
||||
import { usePackageAttributesStore } from '../tools/client/zustands/usePackageAttributesStore';
|
||||
import { ColorTheme } from '../tools/color';
|
||||
import { queryClient } from '../tools/server/configurations/tanstack/queryClient.tool';
|
||||
import {
|
||||
getServiceSidePackageAttributes,
|
||||
ServerSidePackageAttributesType,
|
||||
getServiceSidePackageAttributes,
|
||||
} from '../tools/server/getPackageVersion';
|
||||
import { theme } from '../tools/server/theme/theme';
|
||||
|
||||
import { useEditModeInformationStore } from '../hooks/useEditModeInformation';
|
||||
import '../styles/global.scss';
|
||||
import nextI18nextConfig from '../../next-i18next.config';
|
||||
import { api } from '~/utils/api';
|
||||
|
||||
function App(
|
||||
this: any,
|
||||
props: AppProps<{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import fs from 'fs';
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import Consola from 'consola';
|
||||
|
||||
import fs from 'fs';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import path from 'path';
|
||||
|
||||
import { getConfig } from '../../../tools/config/getConfig';
|
||||
import { BackendConfigType, ConfigType } from '../../../types/config';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import fs from 'fs';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
// Get all the configs in the /data/configs folder
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import DockerSingleton from '../DockerSingleton';
|
||||
|
||||
const docker = DockerSingleton.getInstance();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import DockerSingleton from './DockerSingleton';
|
||||
|
||||
async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import { JsdelivrIconsRepository } from '../../../tools/server/images/jsdelivr-icons-repository';
|
||||
import { LocalIconsRepository } from '../../../tools/server/images/local-icons-repository';
|
||||
import { UnpkgIconsRepository } from '../../../tools/server/images/unpkg-icons-repository';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import fs from 'fs';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import { backendMigrateConfig } from '../../tools/config/backendMigrateConfig';
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import axios from 'axios';
|
||||
|
||||
import Consola from 'consola';
|
||||
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import { z } from 'zod';
|
||||
import { AppIntegrationType, IntegrationType } from '../../../types/app';
|
||||
import { getConfig } from '../../../tools/config/getConfig';
|
||||
import { checkIntegrationsType } from '~/tools/client/app-properties';
|
||||
|
||||
import { getConfig } from '../../../tools/config/getConfig';
|
||||
import { AppIntegrationType, IntegrationType } from '../../../types/app';
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
// Filter out if the reuqest is a POST or a GET
|
||||
if (req.method === 'GET') {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { IDashDotTile } from '../../../../widgets/dashDot/DashDotTile';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { IDashDotTile } from '../../../../widgets/dashDot/DashDotTile';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Consola from 'consola';
|
||||
import { describe, it, vi, expect } from 'vitest';
|
||||
import { createMocks } from 'node-mocks-http';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import GetSummary from './summary';
|
||||
import { ConfigType } from '../../../../types/config';
|
||||
import GetSummary from './summary';
|
||||
|
||||
const mockedGetConfig = vi.fn();
|
||||
|
||||
|
||||
@@ -1,28 +1,23 @@
|
||||
import { Deluge } from '@ctrl/deluge';
|
||||
import { QBittorrent } from '@ctrl/qbittorrent';
|
||||
import { Transmission } from '@ctrl/transmission';
|
||||
import { AllClientData } from '@ctrl/shared-torrent';
|
||||
|
||||
import { Transmission } from '@ctrl/transmission';
|
||||
import Consola from 'consola';
|
||||
|
||||
import { getCookie } from 'cookies-next';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import { Client } from 'sabnzbd-api';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { NzbgetQueueItem, NzbgetStatus } from '../../../../server/api/routers/usenet/nzbget/types';
|
||||
import { ConfigAppType, IntegrationField } from '../../../../types/app';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { UsenetQueueItem } from '../../../../widgets/useNet/types';
|
||||
import {
|
||||
NormalizedDownloadAppStat,
|
||||
NormalizedDownloadQueueResponse,
|
||||
} from '../../../../types/api/downloads/queue/NormalizedDownloadQueueResponse';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
import { ConfigAppType, IntegrationField } from '../../../../types/app';
|
||||
import { UsenetQueueItem } from '../../../../widgets/useNet/types';
|
||||
|
||||
const Get = async (request: NextApiRequest, response: NextApiResponse) => {
|
||||
const configName = getCookie('config-name', { req: request });
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import Consola from 'consola';
|
||||
|
||||
import { createMocks } from 'node-mocks-http';
|
||||
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import 'vitest-fetch-mock';
|
||||
|
||||
import { ConfigType } from '../../../../types/config';
|
||||
|
||||
import MediaRequestsRoute from './index';
|
||||
|
||||
const mockedGetConfig = vi.fn();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { getCookie } from 'cookies-next';
|
||||
import Consola from 'consola';
|
||||
import { getCookie } from 'cookies-next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
|
||||
import { MediaRequest } from '../../../../widgets/media-requests/media-request-types';
|
||||
import { MediaRequestListWidget } from '../../../../widgets/media-requests/MediaRequestListTile';
|
||||
import { checkIntegrationsType } from '~/tools/client/app-properties';
|
||||
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { MediaRequestListWidget } from '../../../../widgets/media-requests/MediaRequestListTile';
|
||||
import { MediaRequest } from '../../../../widgets/media-requests/media-request-types';
|
||||
|
||||
const Get = async (request: NextApiRequest, response: NextApiResponse) => {
|
||||
const configName = getCookie('config-name', { req: request });
|
||||
const config = getConfig(configName?.toString() ?? 'default');
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
import { Jellyfin } from '@jellyfin/sdk';
|
||||
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models';
|
||||
import { getSessionApi } from '@jellyfin/sdk/lib/utils/api/session-api';
|
||||
import { getSystemApi } from '@jellyfin/sdk/lib/utils/api/system-api';
|
||||
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models';
|
||||
|
||||
import Consola from 'consola';
|
||||
|
||||
import { getCookie } from 'cookies-next';
|
||||
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { checkIntegrationsType, findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
import { ConfigAppType } from '../../../../types/app';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { PlexClient } from '../../../../tools/server/sdk/plex/plexClient';
|
||||
import { GenericMediaServer } from '../../../../types/api/media-server/media-server';
|
||||
import { MediaServersResponseType } from '../../../../types/api/media-server/response';
|
||||
import {
|
||||
GenericCurrentlyPlaying,
|
||||
GenericSessionInfo,
|
||||
} from '../../../../types/api/media-server/session-info';
|
||||
import { PlexClient } from '../../../../tools/server/sdk/plex/plexClient';
|
||||
import { checkIntegrationsType, findAppProperty } from '~/tools/client/app-properties';
|
||||
import { ConfigAppType } from '../../../../types/app';
|
||||
|
||||
const jellyfin = new Jellyfin({
|
||||
clientInfo: {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { getCookie } from 'cookies-next';
|
||||
import axios from 'axios';
|
||||
import Consola from 'consola';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { getCookie } from 'cookies-next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import type { MediaType } from '../../../../modules/overseerr/SearchResult';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
|
||||
async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
// Get the slug of the request
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import { getCookie } from 'cookies-next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
|
||||
async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios, { AxiosError } from 'axios';
|
||||
import https from 'https';
|
||||
import Consola from 'consola';
|
||||
import https from 'https';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import xss from 'xss';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import Consola from 'consola';
|
||||
import { getCookie } from 'cookies-next';
|
||||
import { decode, encode } from 'html-entities';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import Parser from 'rss-parser';
|
||||
import xss from 'xss';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
|
||||
@@ -3,11 +3,12 @@ import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { Client } from 'sabnzbd-api';
|
||||
import { NzbgetHistoryItem } from '../../../../server/api/routers/usenet/nzbget/types';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { NzbgetHistoryItem } from '../../../../server/api/routers/usenet/nzbget/types';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { UsenetHistoryItem } from '../../../../widgets/useNet/types';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { Client } from 'sabnzbd-api';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { NzbgetStatus } from '../../../../server/api/routers/usenet/nzbget/types';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { Client } from 'sabnzbd-api';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
export interface UsenetPauseRequestParams {
|
||||
|
||||
@@ -3,11 +3,12 @@ import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { Client } from 'sabnzbd-api';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { UsenetQueueItem } from '../../../../widgets/useNet/types';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { NzbgetQueueItem, NzbgetStatus } from '../../../../server/api/routers/usenet/nzbget/types';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { UsenetQueueItem } from '../../../../widgets/useNet/types';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { Client } from 'sabnzbd-api';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { findAppProperty } from '~/tools/client/app-properties';
|
||||
|
||||
import { NzbgetClient } from '../../../../server/api/routers/usenet/nzbget/nzbget-client';
|
||||
import { getConfig } from '../../../../tools/config/getConfig';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
export interface UsenetResumeRequestParams {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createNextApiHandler } from '@trpc/server/adapters/next';
|
||||
import Consola from 'consola';
|
||||
import { createTRPCContext } from '~/server/api/trpc';
|
||||
import { rootRouter } from '~/server/api/root';
|
||||
import { createTRPCContext } from '~/server/api/trpc';
|
||||
|
||||
// export API handler
|
||||
export default createNextApiHandler({
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import React from 'react';
|
||||
import { PasswordInput, Paper, Title, Text, Container, Button } from '@mantine/core';
|
||||
import { setCookie } from 'cookies-next';
|
||||
import { showNotification, updateNotification } from '@mantine/notifications';
|
||||
import axios from 'axios';
|
||||
import { IconCheck, IconX } from '@tabler/icons-react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { Button, Container, Paper, PasswordInput, Text, Title } from '@mantine/core';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { showNotification, updateNotification } from '@mantine/notifications';
|
||||
import { IconCheck, IconX } from '@tabler/icons-react';
|
||||
import axios from 'axios';
|
||||
import { setCookie } from 'cookies-next';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
||||
import { useRouter } from 'next/router';
|
||||
import React from 'react';
|
||||
|
||||
import { loginNamespaces } from '../tools/server/translation-namespaces';
|
||||
|
||||
// TODO: Add links to the wiki articles about the login process.
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import fs from 'fs';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import {
|
||||
Alert,
|
||||
Anchor,
|
||||
@@ -11,7 +6,6 @@ import {
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
createStyles,
|
||||
Group,
|
||||
Header,
|
||||
List,
|
||||
@@ -25,6 +19,7 @@ import {
|
||||
Text,
|
||||
ThemeIcon,
|
||||
Title,
|
||||
createStyles,
|
||||
useMantineColorScheme,
|
||||
useMantineTheme,
|
||||
} from '@mantine/core';
|
||||
@@ -36,8 +31,13 @@ import {
|
||||
IconMoonStars,
|
||||
IconSun,
|
||||
} from '@tabler/icons-react';
|
||||
import { motion } from 'framer-motion';
|
||||
import axios from 'axios';
|
||||
import { motion } from 'framer-motion';
|
||||
import fs from 'fs';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import { Logo } from '../components/layout/Logo';
|
||||
import { usePrimaryGradient } from '../components/layout/useGradient';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user