From 62769c1cad9918b5fba5d359125a362817f81738 Mon Sep 17 00:00:00 2001 From: Paul Makles <paulmakles@gmail.com> Date: Mon, 26 Apr 2021 10:34:37 +0100 Subject: [PATCH] Add new onboarding page. --- email draft.txt | 15 ++++++++++++ legal | 2 +- pages/index.tsx | 5 ++-- pages/onboarding.tsx | 52 ++++++++++++++++++++++++++++++++++++++++ styles/Legal.module.scss | 16 +++++++++++++ 5 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 email draft.txt create mode 100644 pages/onboarding.tsx diff --git a/email draft.txt b/email draft.txt new file mode 100644 index 0000000..bb12d96 --- /dev/null +++ b/email draft.txt @@ -0,0 +1,15 @@ +Hi, +we're ready to accept you into the Revolt beta! + +Your unique invite code is <code>abc</code>. + +For more information on signing up, see https://revolt.chat/onboarding?code=abc. + +If you have any problems, feel free to reply to this email to open a support ticket. + +Thanks, +Paul + +-- +Revolt +Email: contact@revolt.chat - Web: https://revolt.chat diff --git a/legal b/legal index 8f2a35e..587d133 160000 --- a/legal +++ b/legal @@ -1 +1 @@ -Subproject commit 8f2a35ed202a17ac536468c3697c0d7a3a743498 +Subproject commit 587d133232e7c739cffd449c4e011d0519a0a6c4 diff --git a/pages/index.tsx b/pages/index.tsx index cdd318f..83be4ff 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -33,11 +33,12 @@ export default function Home() { <script async defer data-domain='revolt.chat' src='https://plausible.insrt.uk/js/plausible.js' /> - { // Firefox only: Scroll snapping. + { // Disabled scroll snapping. + /* // Firefox only: Scroll snapping. // Doesn't work properly with Chromium. typeof window !== 'undefined' && typeof (window as any).InstallTrigger !== 'undefined' && - <style dangerouslySetInnerHTML={{ __html: `html { scroll-snap-type: y mandatory; }` }} /> } + <style dangerouslySetInnerHTML={{ __html: `html { scroll-snap-type: y mandatory; }` }} /> */ } </Head> <main> <a className={styles.feedback} href={URLs.Feedback} target="_blank"> diff --git a/pages/onboarding.tsx b/pages/onboarding.tsx new file mode 100644 index 0000000..3d1bbf4 --- /dev/null +++ b/pages/onboarding.tsx @@ -0,0 +1,52 @@ +import Head from 'next/head'; +import { Footer } from '../components/Footer'; +import { Navbar } from '../components/Navbar'; +import styles from '../styles/Legal.module.scss'; +import { useRouter } from 'next/dist/client/router'; +import { URLs } from '../urls'; +import { ExternalLink } from '@styled-icons/feather'; + +export default function Onboarding() { + const { query } = useRouter(); + const { code } = query; + + return ( + <div> + <Head> + <title>Welcome to Revolt</title> + <link rel="icon" href="/favicon.ico" /> + <meta name="viewport" content="width=device-width, initial-scale=0.9, user-scalable=0" /> + </Head> + <main> + <Navbar /> + <div className={styles.content}> + <h1 className={styles.title}>Welcome to Revolt</h1> + <p> + If you've been linked to this page, you likely applied to join the beta and have now been invited to sign up. To sign up, use the invite code below from the app or click the button below to be taken straight to the account creation screen. + </p> + { code && <p> + You've been given an invite code: <code className={styles.inviteCode}>{ code }</code> + </p> } + <span> + <a className="button red" + target="_blank" + href={code ? `${URLs.App}/login/create?code=${code}` : URLs.App}> + <ExternalLink size={24} /> Open App + </a> + </span> + <h3>Having problems?</h3> + <p> + We have a number of channels you can contact us directly through for help. + </p> + <ul> + <li>Email support: <a href="mailto:contact@revolt.chat">contact@revolt.chat</a></li> + <li>Online support: <a href="https://help.revolt.chat" target="_blank">help.revolt.chat</a></li> + <li>Matrix channel: <a href="https://matrix.to/#revolt-chat:clustor.net" target="_blank">#revolt-chat:clustor.net</a></li> + <li>Discord server: <a href="https://discord.gg/AWFZeCc" target="_blank">discord.gg/AWFZeCc</a></li> + </ul> + </div> + <Footer /> + </main> + </div> + ); +} diff --git a/styles/Legal.module.scss b/styles/Legal.module.scss index 39b166f..63724b5 100644 --- a/styles/Legal.module.scss +++ b/styles/Legal.module.scss @@ -3,3 +3,19 @@ padding: 20px; max-width: 720px; } + +.title { + font-size: 3em; + color: var(--accent); +} + +.inviteCode { + padding: 0.4rem; + user-select: all; + border-radius: 6px; + margin-left: 0.4rem; + background: white; + color: var(--accent); + display: inline-block; + font-family: "Inter", sans-serif; +} -- GitLab