🔀 Merge Mantine v5.0 into Overseerr-integaration
This commit is contained in:
@@ -9,7 +9,6 @@ import { useHotkeys } from '@mantine/hooks';
|
||||
import { ModalsProvider } from '@mantine/modals';
|
||||
import { ConfigProvider } from '../tools/state';
|
||||
import { theme } from '../tools/theme';
|
||||
import { styles } from '../tools/styles';
|
||||
import { ColorTheme } from '../tools/color';
|
||||
|
||||
export default function App(this: any, props: AppProps & { colorScheme: ColorScheme }) {
|
||||
@@ -50,9 +49,6 @@ export default function App(this: any, props: AppProps & { colorScheme: ColorSch
|
||||
primaryShade,
|
||||
colorScheme,
|
||||
}}
|
||||
styles={{
|
||||
...styles,
|
||||
}}
|
||||
withGlobalStyles
|
||||
withNormalizeCSS
|
||||
>
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
import Document, { DocumentContext } from 'next/document';
|
||||
import { ServerStyles, createStylesServer } from '@mantine/next';
|
||||
import { createGetInitialProps } from '@mantine/next';
|
||||
import Document, { Head, Html, Main, NextScript } from 'next/document';
|
||||
|
||||
const stylesServer = createStylesServer();
|
||||
const getInitialProps = createGetInitialProps();
|
||||
|
||||
export default class _Document extends Document {
|
||||
static async getInitialProps(ctx: DocumentContext) {
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
// Add your app specific logic here
|
||||
static getInitialProps = getInitialProps;
|
||||
|
||||
return {
|
||||
...initialProps,
|
||||
styles: (
|
||||
<>
|
||||
{initialProps.styles}
|
||||
<ServerStyles html={initialProps.html} server={stylesServer} />
|
||||
</>
|
||||
),
|
||||
};
|
||||
render() {
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
10
src/pages/api/imageproxy.ts
Normal file
10
src/pages/api/imageproxy.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
const url = decodeURIComponent(req.query.url as string);
|
||||
const result = await fetch(url);
|
||||
const body = await result.body;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
body.pipe(res);
|
||||
};
|
||||
29
src/pages/api/modules/dashdot.ts
Normal file
29
src/pages/api/modules/dashdot.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
// Extract url from req.query as string
|
||||
const { url, base } = req.query;
|
||||
|
||||
// If no url is provided, return an error
|
||||
if (!url || !base) {
|
||||
return res.status(400).json({
|
||||
message: 'Missing required parameter in url',
|
||||
});
|
||||
}
|
||||
// Get the origin URL
|
||||
const response = await axios.get(url as string, { baseURL: base as string });
|
||||
// Return the response
|
||||
return res.status(200).json(response.data);
|
||||
}
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
// Filter out if the reuqest is a POST or a GET
|
||||
if (req.method === 'GET') {
|
||||
return Get(req, res);
|
||||
}
|
||||
return res.status(405).json({
|
||||
statusCode: 405,
|
||||
message: 'Method not allowed',
|
||||
});
|
||||
};
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import { PasswordInput, Anchor, Paper, Title, Text, Container, Group, Button } from '@mantine/core';
|
||||
import { setCookie } from 'cookies-next';
|
||||
import { useForm } from '@mantine/hooks';
|
||||
import { showNotification, updateNotification } from '@mantine/notifications';
|
||||
import axios from 'axios';
|
||||
import { IconCheck, IconX } from '@tabler/icons';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useForm } from '@mantine/form';
|
||||
|
||||
// TODO: Add links to the wiki articles about the login process.
|
||||
export default function AuthenticationTitle() {
|
||||
|
||||
Reference in New Issue
Block a user