From 4992862943e18cef9f15c4641e6058ba427a4487 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 22 May 2022 12:53:13 -0500 Subject: [PATCH 1/3] fetchMe: don't await verify_credentials if cached --- app/soapbox/actions/auth.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/soapbox/actions/auth.js b/app/soapbox/actions/auth.js index 79ff9d67f..a42bccdef 100644 --- a/app/soapbox/actions/auth.js +++ b/app/soapbox/actions/auth.js @@ -207,9 +207,12 @@ export function rememberAuthAccount(accountUrl) { export function loadCredentials(token, accountUrl) { return (dispatch, getState) => { - return dispatch(rememberAuthAccount(accountUrl)).finally(() => { - return dispatch(verifyCredentials(token, accountUrl)); - }); + return dispatch(rememberAuthAccount(accountUrl)) + .then(account => account) + .then(() => { + dispatch(verifyCredentials(token, accountUrl)); + }) + .catch(error => dispatch(verifyCredentials(token, accountUrl))); }; } From 2b7f4694da3309de8a59d43cff3c1ec7c414e3c5 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 22 May 2022 13:27:08 -0500 Subject: [PATCH 2/3] LoadingScreen: bump up spinner vertically to counteract optical illusion --- app/soapbox/components/loading-screen.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/soapbox/components/loading-screen.tsx b/app/soapbox/components/loading-screen.tsx index 92882f98f..ffa1fa8f9 100644 --- a/app/soapbox/components/loading-screen.tsx +++ b/app/soapbox/components/loading-screen.tsx @@ -10,7 +10,10 @@ const LoadingScreen: React.FC = () => {
- + {/* Bump up spinner vertically to counteract optical illusion. */} +
+ +
); From f2164f09d4e0d0dfe4eeb610ba101043c97bbd0b Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 24 May 2022 13:45:00 -0400 Subject: [PATCH 3/3] Add d-screen Tailwind utility --- app/soapbox/components/loading-screen.tsx | 6 ++---- app/styles/application.scss | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/soapbox/components/loading-screen.tsx b/app/soapbox/components/loading-screen.tsx index ffa1fa8f9..d132933a4 100644 --- a/app/soapbox/components/loading-screen.tsx +++ b/app/soapbox/components/loading-screen.tsx @@ -9,11 +9,9 @@ const LoadingScreen: React.FC = () => {
-
+
{/* Bump up spinner vertically to counteract optical illusion. */} -
- -
+
); diff --git a/app/styles/application.scss b/app/styles/application.scss index 03f8ff65d..660fb4a68 100644 --- a/app/styles/application.scss +++ b/app/styles/application.scss @@ -102,6 +102,10 @@ .shadow-inset { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); } + + .d-screen { + height: 100dvh; + } } @import 'forms';