feat: unify authentication pages
This commit is contained in:
8 files changed
+110
-80
No files matched your search
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Alert, Button, Group, Paper, Stack, Text, TextInput, ThemeIcon, Title } from "@mantine/core";
|
||||
import { Alert, Button, Stack, Text, TextInput } from "@mantine/core";
|
||||
import { IconArrowRight, IconShieldCheck, IconUserPlus } from "@tabler/icons-react";
|
||||
import type { z } from "zod/v4";
|
||||
|
||||
@@ -17,10 +17,9 @@ import { groupCreateSchema } from "@homarr/validation/group";
|
||||
import { userInitSchema } from "@homarr/validation/user";
|
||||
|
||||
import { didCredentialsSignInFail } from "./account-recovery";
|
||||
import { OnboardingBackdrop } from "./onboarding-backdrop";
|
||||
import { OnboardingAuthShell } from "./onboarding-auth-shell";
|
||||
import type { OnboardingStudioProps } from "./types";
|
||||
import { useOnboardingSounds } from "./use-onboarding-sounds";
|
||||
import classes from "./onboarding-studio.module.css";
|
||||
|
||||
const AccountShell = ({
|
||||
title,
|
||||
@@ -31,29 +30,9 @@ const AccountShell = ({
|
||||
description: string;
|
||||
children: React.ReactNode;
|
||||
}) => (
|
||||
<main className={classes.page}>
|
||||
<OnboardingBackdrop />
|
||||
<div className={classes.shell}>
|
||||
<Stack mih="calc(100dvh - 6rem)" justify="center" align="center">
|
||||
<Paper className={classes.studio} radius="lg" p={{ base: "lg", sm: "xl" }} w="100%" maw="36rem">
|
||||
<Stack gap="xl">
|
||||
<Group wrap="nowrap" align="flex-start">
|
||||
<ThemeIcon size="xl" radius="lg" variant="light">
|
||||
<IconShieldCheck size={24} />
|
||||
</ThemeIcon>
|
||||
<Stack gap={4}>
|
||||
<Title order={1} size="h2">
|
||||
{title}
|
||||
</Title>
|
||||
<Text c="dimmed">{description}</Text>
|
||||
</Stack>
|
||||
</Group>
|
||||
{children}
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</div>
|
||||
</main>
|
||||
<OnboardingAuthShell title={title} description={description} icon={<IconShieldCheck size={24} />}>
|
||||
{children}
|
||||
</OnboardingAuthShell>
|
||||
);
|
||||
|
||||
export const AccountSetup = ({ environment }: OnboardingStudioProps) => {
|
||||
|
||||
Reference in new issue
Block a user