When opening plex Oauth window, open an empty page then redirect to plex oauth (#127)

* feat(frontend): custom toast

* refactor(frontend): move toast width styling to globals

* feat(frontend): add loading spinner for browser popup
This commit is contained in:
Alex Zoitos
2020-10-10 09:00:40 -04:00
committed by GitHub
parent 608b96600a
commit 4d0c23c269
4 changed files with 21 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ const CoreApp: Omit<NextAppComponentType, 'origGetInitialProps'> = ({
setCookie(null, 'locale', currentLocale, { path: '/' });
}, [currentLocale]);
if (router.asPath === '/login') {
if (router.pathname.match(/(login|setup)/)) {
component = <Component {...pageProps} />;
} else {
component = (

View File

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

View File

@@ -0,0 +1,12 @@
import React from 'react';
import LoadingSpinner from '../../../components/Common/LoadingSpinner';
const PlexLoading: React.FC = () => {
return (
<div>
<LoadingSpinner />
</div>
);
};
export default PlexLoading;