diff --git a/src/routes/Login.tsx b/src/routes/Login.tsx index 1a027f8d0..0c8d27425 100644 --- a/src/routes/Login.tsx +++ b/src/routes/Login.tsx @@ -1,6 +1,6 @@ const { ipcRenderer } = require('electron'); -import React, { useCallback, useContext, useEffect } from 'react'; +import React, { useContext, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; import { AppContext } from '../context/App'; @@ -8,7 +8,7 @@ import { Logo } from '../components/Logo'; export const LoginRoute: React.FC = () => { const navigate = useNavigate(); - const { isLoggedIn, login } = useContext(AppContext); + const { isLoggedIn } = useContext(AppContext); useEffect(() => { if (isLoggedIn) { @@ -17,16 +17,17 @@ export const LoginRoute: React.FC = () => { } }, [isLoggedIn]); - const loginUser = useCallback(async () => { + // FIXME: Temporarily disable Login with GitHub (OAuth) as it's currently broken and requires a rewrite - see #485 #561 #747 + /* const loginUser = useCallback(async () => { try { await login(); } catch (err) { // Skip } - }, []); + }, []); */ const loginButtonClass = - 'w-48 py-2 my-2 bg-gray-300 font-semibold rounded text-xs text-center dark:text-black hover:bg-gray-500 hover:text-white focus:outline-none'; + 'w-50 px-2 py-2 my-2 bg-gray-300 font-semibold rounded text-xs text-center dark:text-black hover:bg-gray-500 hover:text-white focus:outline-none'; return (
@@ -36,6 +37,9 @@ export const LoginRoute: React.FC = () => { GitHub Notifications
on your menu bar.
+ { + // FIXME: Temporarily disable Login with GitHub (OAuth) as it's currently broken and requires a rewrite - see #485 #561 #747 + /* */ + } + + - - ); }; diff --git a/src/routes/LoginWithToken.tsx b/src/routes/LoginWithToken.tsx index a90609cf7..6103b9632 100644 --- a/src/routes/LoginWithToken.tsx +++ b/src/routes/LoginWithToken.tsx @@ -71,11 +71,11 @@ export const LoginWithToken: React.FC = () => { > personal access tokens {' '} - and create one with the{' '} + and create one with the {Constants.AUTH_SCOPE.length} scopes{' '} {Constants.AUTH_SCOPE.join(', ')}{' '} - scopes. + . } /> @@ -130,7 +130,9 @@ export const LoginWithToken: React.FC = () => { /> -

Login with an access token

+

+ Login with personal access token +

diff --git a/src/routes/__snapshots__/Login.test.tsx.snap b/src/routes/__snapshots__/Login.test.tsx.snap index 50030a864..4cabaaee7 100644 --- a/src/routes/__snapshots__/Login.test.tsx.snap +++ b/src/routes/__snapshots__/Login.test.tsx.snap @@ -56,30 +56,20 @@ exports[`routes/Login.tsx should render itself & its children 1`] = ` on your menu bar.
- `; diff --git a/src/routes/__snapshots__/LoginWithToken.test.tsx.snap b/src/routes/__snapshots__/LoginWithToken.test.tsx.snap index 8be1db86c..2bc673390 100644 --- a/src/routes/__snapshots__/LoginWithToken.test.tsx.snap +++ b/src/routes/__snapshots__/LoginWithToken.test.tsx.snap @@ -38,7 +38,7 @@ exports[`routes/LoginWithToken.tsx renders correctly 1`] = `

- Login with an access token + Login with personal access token

- and create one with the + and create one with the + 3 + scopes - scopes. + .