feat: unify authentication pages

This commit is contained in:
Thomas Camlong committed 2026-08-14 21:18:06 +02:00
1 parent 95489b692c
commit 409e8ed71a
8 files changed
+110 -80

No files matched your search

+5 -26
View File
@@ -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) => {