From a381ba6320e85c80751f0f2ea87526277e57cb05 Mon Sep 17 00:00:00 2001 From: Ed L Date: Sat, 10 Sep 2022 20:08:09 +0100 Subject: [PATCH] feat: revamp onboarding --- .../components/legacy/Onboarding.module.scss | 27 ++----- .../modals/components/legacy/Onboarding.tsx | 81 ++++++++++--------- .../legacy/assets/onboarding_background.svg | 2 + 3 files changed, 52 insertions(+), 58 deletions(-) create mode 100644 src/controllers/modals/components/legacy/assets/onboarding_background.svg diff --git a/src/controllers/modals/components/legacy/Onboarding.module.scss b/src/controllers/modals/components/legacy/Onboarding.module.scss index 42ebfbdd..87a63c10 100644 --- a/src/controllers/modals/components/legacy/Onboarding.module.scss +++ b/src/controllers/modals/components/legacy/Onboarding.module.scss @@ -12,34 +12,19 @@ flex-direction: column; div { - flex: 1; + &.container { + max-width: 750px; + flex-grow: 1; + align-items: left; + } &.header { gap: 8px; - padding: 3em; + padding-top: 5em; display: flex; - text-align: center; - - h1 { - margin: 0; - } - - img { - max-height: 80px; - } } &.form { - flex-grow: 1; - max-width: 420px; - - img { - margin: auto; - display: block; - max-height: 420px; - border-radius: var(--border-radius); - } - input { width: 100%; } diff --git a/src/controllers/modals/components/legacy/Onboarding.tsx b/src/controllers/modals/components/legacy/Onboarding.tsx index bc3f22c3..eb726801 100644 --- a/src/controllers/modals/components/legacy/Onboarding.tsx +++ b/src/controllers/modals/components/legacy/Onboarding.tsx @@ -6,7 +6,8 @@ import { useState } from "preact/hooks"; import { Button, Preloader } from "@revoltchat/ui"; -import wideSVG from "/assets/wide.svg"; +// import wideSVG from "/assets/wide.svg"; +import background from "./assets/onboarding_background.svg"; import FormField from "../../../../pages/login/FormField"; import { takeError } from "../../../client/jsx/error"; @@ -36,43 +37,49 @@ export function OnboardingModal({ return (
-
-

- -
- -

+
+
+

{"Welcome to Revolt."}

+
+
+ {loading ? ( + + ) : ( + <> +

+ {"It's time to choose a username."} +
+ { + "Others will be able to find, recognise and mention you with this name, so choose wisely." + } +
+ { + "You can change it at any time in your User Settings." + } +

+
+ }> +
+ +
+ +
+ + )} +
-
- {loading ? ( - - ) : ( - <> -

- -

-
- }> -
- -
- -
- - )} -
-
+
); } diff --git a/src/controllers/modals/components/legacy/assets/onboarding_background.svg b/src/controllers/modals/components/legacy/assets/onboarding_background.svg new file mode 100644 index 00000000..45975c95 --- /dev/null +++ b/src/controllers/modals/components/legacy/assets/onboarding_background.svg @@ -0,0 +1,2 @@ + +