From 10dde68875b1b1681ea45d0216aba553c97a1dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Mon, 11 Apr 2022 12:18:14 +0200 Subject: [PATCH 1/4] dashboard-v2: pin dropdown animation to toggle --- .../src/components/DropdownMenu/DropdownMenu.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/dashboard-v2/src/components/DropdownMenu/DropdownMenu.js b/packages/dashboard-v2/src/components/DropdownMenu/DropdownMenu.js index 86cbad5f..1bf6f001 100644 --- a/packages/dashboard-v2/src/components/DropdownMenu/DropdownMenu.js +++ b/packages/dashboard-v2/src/components/DropdownMenu/DropdownMenu.js @@ -7,13 +7,10 @@ import { ChevronDownIcon } from "../Icons"; const dropDown = keyframes` 0% { - transform: scaleY(0); - } - 80% { - transform: scaleY(1.1); + transform: rotateX(-90deg); } 100% { - transform: scaleY(1); + transform: rotateX(0deg); } `; @@ -35,10 +32,11 @@ const Flyout = styled.div.attrs(({ open }) => ({ bg-white shadow-md shadow-palette-200/50 ${open ? "visible" : "invisible"}`, }))` + transform-origin: top center; animation: ${({ open }) => open ? css` - ${dropDown} 0.1s ease-in-out + ${dropDown} .15s ease-in-out forwards; ` : "none"}; `; From ea8a63f328f6e7250e2e4495f0ba880c3eb630b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Mon, 11 Apr 2022 12:26:37 +0200 Subject: [PATCH 2/4] dashboard-v2: CSS fixes on signup page --- packages/dashboard-v2/src/pages/auth/signup.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/dashboard-v2/src/pages/auth/signup.js b/packages/dashboard-v2/src/pages/auth/signup.js index 4da915f1..e8e67354 100644 --- a/packages/dashboard-v2/src/pages/auth/signup.js +++ b/packages/dashboard-v2/src/pages/auth/signup.js @@ -73,11 +73,17 @@ const SignUpPage = () => { {settings.isSubscriptionRequired ? : } {state !== State.Success && ( - setState(State.Success)} onFailure={() => setState(State.Failure)} /> + <> + setState(State.Success)} onFailure={() => setState(State.Failure)} /> + +

+ Already have an account? Sign in +

+ )} {state === State.Success && ( -
+

Please check your inbox and confirm your email address.

You will be redirected to your dashboard shortly.

Click here to go there now. @@ -89,10 +95,6 @@ const SignUpPage = () => { )} )} - -

- Already have an account? Sign in -

); From 9cfea2266a1af23be1a0deb30533a5d55305b32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Mon, 11 Apr 2022 12:27:57 +0200 Subject: [PATCH 3/4] dashboard-v2: rename /signup to /registration --- .../dashboard-v2/src/pages/auth/{signup.js => registration.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/dashboard-v2/src/pages/auth/{signup.js => registration.js} (100%) diff --git a/packages/dashboard-v2/src/pages/auth/signup.js b/packages/dashboard-v2/src/pages/auth/registration.js similarity index 100% rename from packages/dashboard-v2/src/pages/auth/signup.js rename to packages/dashboard-v2/src/pages/auth/registration.js From d0935779098ebfd842ef6f76a09512b1c4a03074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Mon, 11 Apr 2022 12:37:14 +0200 Subject: [PATCH 4/4] dashboard-v2: move static elements of auth pages to AuthLayout --- .../src/components/forms/LoginForm.js | 2 +- .../dashboard-v2/src/layouts/AuthLayout.js | 9 +++- packages/dashboard-v2/src/pages/auth/login.js | 15 ++---- .../src/pages/auth/registration.js | 6 +-- .../src/pages/auth/reset-password.js | 37 ++++++-------- .../dashboard-v2/src/pages/user/confirm.js | 25 ++++------ .../dashboard-v2/src/pages/user/recover.js | 49 +++++++++---------- 7 files changed, 63 insertions(+), 80 deletions(-) diff --git a/packages/dashboard-v2/src/components/forms/LoginForm.js b/packages/dashboard-v2/src/components/forms/LoginForm.js index a5a1deeb..eeafc092 100644 --- a/packages/dashboard-v2/src/components/forms/LoginForm.js +++ b/packages/dashboard-v2/src/components/forms/LoginForm.js @@ -82,7 +82,7 @@ export const LoginForm = ({ onSuccess }) => {

- Don't have an account? Sign up + Don't have an account? Sign up

)} diff --git a/packages/dashboard-v2/src/layouts/AuthLayout.js b/packages/dashboard-v2/src/layouts/AuthLayout.js index 847562e5..8141e606 100644 --- a/packages/dashboard-v2/src/layouts/AuthLayout.js +++ b/packages/dashboard-v2/src/layouts/AuthLayout.js @@ -33,7 +33,14 @@ const AuthLayout = - {children} + +
+
+ Skynet +
+ {children} +
+
diff --git a/packages/dashboard-v2/src/pages/auth/login.js b/packages/dashboard-v2/src/pages/auth/login.js index 5812fd8f..8d51968d 100644 --- a/packages/dashboard-v2/src/pages/auth/login.js +++ b/packages/dashboard-v2/src/pages/auth/login.js @@ -22,16 +22,11 @@ const LoginPage = ({ location }) => { Sign In -
-
- Skynet -
- { - await refreshUserState(); - }} - /> -
+ { + await refreshUserState(); + }} + /> ); }; diff --git a/packages/dashboard-v2/src/pages/auth/registration.js b/packages/dashboard-v2/src/pages/auth/registration.js index e8e67354..b58562fd 100644 --- a/packages/dashboard-v2/src/pages/auth/registration.js +++ b/packages/dashboard-v2/src/pages/auth/registration.js @@ -61,11 +61,7 @@ const SignUpPage = () => { Sign Up -
-
- Skynet -
- +
{!settings.areAccountsEnabled && Accounts are not enabled on this portal.} {settings.areAccountsEnabled && ( diff --git a/packages/dashboard-v2/src/pages/auth/reset-password.js b/packages/dashboard-v2/src/pages/auth/reset-password.js index 88db338a..74c40203 100644 --- a/packages/dashboard-v2/src/pages/auth/reset-password.js +++ b/packages/dashboard-v2/src/pages/auth/reset-password.js @@ -20,30 +20,25 @@ const ResetPasswordPage = () => { Reset Password -
-
- Skynet -
- {state !== State.Success && ( - setState(State.Success)} onFailure={() => setState(State.Failure)} /> - )} + {state !== State.Success && ( + setState(State.Success)} onFailure={() => setState(State.Failure)} /> + )} - {state === State.Success && ( -

Please check your inbox for further instructions.

- )} + {state === State.Success && ( +

Please check your inbox for further instructions.

+ )} - {state === State.Failure && ( -

Something went wrong, please try again later.

- )} + {state === State.Failure && ( +

Something went wrong, please try again later.

+ )} -
-

- Suddenly remembered your password? Sign in -

-

- Don't actually have an account? Create one! -

-
+
+

+ Suddenly remembered your password? Sign in +

+

+ Don't actually have an account? Create one! +

); diff --git a/packages/dashboard-v2/src/pages/user/confirm.js b/packages/dashboard-v2/src/pages/user/confirm.js index b4ce6bc1..1430a4f9 100644 --- a/packages/dashboard-v2/src/pages/user/confirm.js +++ b/packages/dashboard-v2/src/pages/user/confirm.js @@ -57,23 +57,18 @@ const EmailConfirmationPage = ({ location }) => { Confirm E-mail Address -
-
- Skynet -
-
- {state === State.Pure &&

Please wait while we verify your account...

} +
+ {state === State.Pure &&

Please wait while we verify your account...

} - {state === State.Success && ( - <> -

All done!

-

You will be redirected to your dashboard shortly.

- Redirect now. - - )} + {state === State.Success && ( + <> +

All done!

+

You will be redirected to your dashboard shortly.

+ Redirect now. + + )} - {state === State.Failure &&

Something went wrong, please try again later.

} -
+ {state === State.Failure &&

Something went wrong, please try again later.

}
); diff --git a/packages/dashboard-v2/src/pages/user/recover.js b/packages/dashboard-v2/src/pages/user/recover.js index d8d02e8a..ddba982f 100644 --- a/packages/dashboard-v2/src/pages/user/recover.js +++ b/packages/dashboard-v2/src/pages/user/recover.js @@ -24,35 +24,30 @@ const RecoverPage = ({ location }) => { Recover Your Account -
-
- Skynet -
- {state !== State.Success && ( - { - setState(State.Success); - navigate("/"); - }} - onFailure={() => setState(State.Failure)} - /> - )} + {state !== State.Success && ( + { + setState(State.Success); + navigate("/"); + }} + onFailure={() => setState(State.Failure)} + /> + )} - {state === State.Success && ( -

- All done! You will be redirected to your dashboard shortly. -

- )} - - {state === State.Failure && ( -

Something went wrong, please try again later.

- )} - -

- Suddenly remembered your old password? Sign in + {state === State.Success && ( +

+ All done! You will be redirected to your dashboard shortly.

-
+ )} + + {state === State.Failure && ( +

Something went wrong, please try again later.

+ )} + +

+ Suddenly remembered your old password? Sign in +

); };