Commit b0abf5ab authored by Grant's avatar Grant
Browse files

updated phrasing to prevent people from accidentally navigating away

parent 7ecae515
Loading
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -23,9 +23,14 @@ export default function RegisterPage() {
  const [error, setError] = useState<string>();
  const [creds, setCreds] = useState<{ email: string; password: string }>();

  if (import.meta.env.DEV) {
    // @ts-expect-error
    window.setCreds = setCreds;

    // @ts-expect-error
    window.setStage = setStage;
  }

  const tryLogin = useCallback(async () => {
    const cookieJwt = Cookies.get(LEMMY_UI_JWT_COOKIE_NAME);
    if (cookieJwt) {
+11 −1
Original line number Diff line number Diff line
import { Button, ProgressCircle, Typography } from "@heroui/react";
import { Alert, Button, ProgressCircle, Typography } from "@heroui/react";
import { useEffect } from "react";

export const ApplicationChecker = ({
@@ -17,6 +17,16 @@ export const ApplicationChecker = ({
  return (
    <>
      <ProgressCircle />
      <Alert status="accent">
        <Alert.Indicator />
        <Alert.Content>
          <Alert.Title>Don't leave quite yet!</Alert.Title>
          <Alert.Description>
            We're waiting for approval, this should take less than 2 minutes (if
            that)
          </Alert.Description>
        </Alert.Content>
      </Alert>
      <Typography type="h3">Waiting for approval...</Typography>
      <Typography type="body">This process should be automatic</Typography>
      <Button onPress={tryLogin}>Recheck Now</Button>
+28 −5
Original line number Diff line number Diff line
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEnvelope } from "@fortawesome/free-regular-svg-icons";
import { Button, Typography } from "@heroui/react";
import { Alert, Button, ProgressCircle, Typography } from "@heroui/react";
import { useEffect } from "react";

export const EmailVerification = ({
@@ -18,12 +18,35 @@ export const EmailVerification = ({

  return (
    <>
      <FontAwesomeIcon icon={faEnvelope} />
      <Typography type="h3">Check your email</Typography>
      <Typography type="h3" className="text-center">
        <FontAwesomeIcon icon={faEnvelope} className="mr-1" />
        Check your email
      </Typography>
      <Typography type="body">
        Click the link to verify your email then return here
        Click the link to verify your email then <strong>return here</strong>
      </Typography>
      <div className="flex flex-row items-center justify-center gap-2">
        <Button onPress={tryLogin}>Recheck Now</Button>
        <ProgressCircle isIndeterminate>
          <ProgressCircle.Track>
            <ProgressCircle.TrackCircle />
            <ProgressCircle.FillCircle />
          </ProgressCircle.Track>
        </ProgressCircle>
      </div>
      <Typography type="body"></Typography>
      <Alert status="warning">
        <Alert.Indicator />
        <Alert.Content>
          <Alert.Title>Don't close this page</Alert.Title>
          <Alert.Description>
            We're checking in the background for your email to be verified
            <br />
            <br />
            Once it's verified, we can continue
          </Alert.Description>
        </Alert.Content>
      </Alert>
    </>
  );
};