website refactor
This commit is contained in:
@@ -5,13 +5,12 @@ import { AuthFooterLinks } from '@/components/auth/AuthFooterLinks';
|
||||
import { AuthForm } from '@/components/auth/AuthForm';
|
||||
import { ResetPasswordViewData } from '@/lib/builders/view-data/types/ResetPasswordViewData';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Link } from '@/ui/Link';
|
||||
import { LoadingSpinner } from '@/ui/LoadingSpinner';
|
||||
import { PasswordField } from '@/ui/PasswordField';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { AlertCircle, ArrowLeft, CheckCircle2, Shield } from 'lucide-react';
|
||||
import React from 'react';
|
||||
@@ -50,7 +49,7 @@ export function ResetPasswordTemplate({
|
||||
>
|
||||
{!viewData.showSuccess ? (
|
||||
<AuthForm onSubmit={formActions.handleSubmit}>
|
||||
<Stack gap={4}>
|
||||
<Group direction="column" gap={4} fullWidth>
|
||||
<PasswordField
|
||||
label="New Password"
|
||||
id="newPassword"
|
||||
@@ -78,15 +77,13 @@ export function ResetPasswordTemplate({
|
||||
showPassword={uiState.showConfirmPassword}
|
||||
onTogglePassword={() => formActions.setShowConfirmPassword(!uiState.showConfirmPassword)}
|
||||
/>
|
||||
</Stack>
|
||||
</Group>
|
||||
|
||||
{mutationState.error && (
|
||||
<Box p={4} bg="critical-red/10" border borderColor="critical-red/30" rounded="md">
|
||||
<Stack direction="row" align="start" gap={3}>
|
||||
<Icon icon={AlertCircle} size={4.5} color="var(--color-critical)" />
|
||||
<Text size="sm" color="text-critical-red">{mutationState.error}</Text>
|
||||
</Stack>
|
||||
</Box>
|
||||
<Group direction="row" align="start" gap={3} fullWidth>
|
||||
<Icon icon={AlertCircle} size={4.5} color="var(--color-critical)" />
|
||||
<Text size="sm" color="text-critical-red">{mutationState.error}</Text>
|
||||
</Group>
|
||||
)}
|
||||
|
||||
<Button
|
||||
@@ -99,26 +96,24 @@ export function ResetPasswordTemplate({
|
||||
{isSubmitting ? 'Resetting...' : 'Reset Password'}
|
||||
</Button>
|
||||
|
||||
<Box textAlign="center">
|
||||
<Group justify="center" fullWidth>
|
||||
<Link href={routes.auth.login}>
|
||||
<Stack direction="row" align="center" justify="center" gap={2} group>
|
||||
<Icon icon={ArrowLeft} size={3.5} color="var(--color-primary)" groupHoverScale />
|
||||
<Group direction="row" align="center" justify="center" gap={2}>
|
||||
<Icon icon={ArrowLeft} size={3.5} color="var(--color-primary)" />
|
||||
<Text size="sm" weight="bold" color="text-primary-accent">Back to Login</Text>
|
||||
</Stack>
|
||||
</Group>
|
||||
</Link>
|
||||
</Box>
|
||||
</Group>
|
||||
</AuthForm>
|
||||
) : (
|
||||
<Stack gap={6}>
|
||||
<Box p={4} bg="success-green/10" border borderColor="success-green/30" rounded="md">
|
||||
<Stack direction="row" align="start" gap={3}>
|
||||
<Icon icon={CheckCircle2} size={5} color="var(--color-success)" />
|
||||
<Box>
|
||||
<Text size="sm" color="text-success-green" weight="bold" block>Password Reset</Text>
|
||||
<Text size="xs" color="text-gray-400" block mt={1}>{viewData.successMessage}</Text>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Box>
|
||||
<Group direction="column" gap={6} fullWidth>
|
||||
<Group direction="row" align="start" gap={3} fullWidth>
|
||||
<Icon icon={CheckCircle2} size={5} color="var(--color-success)" />
|
||||
<Group direction="column" gap={1}>
|
||||
<Text size="sm" color="text-success-green" weight="bold" block>Password Reset</Text>
|
||||
<Text size="xs" color="text-gray-400" block>{viewData.successMessage}</Text>
|
||||
</Group>
|
||||
</Group>
|
||||
|
||||
<Button
|
||||
type="button"
|
||||
@@ -128,7 +123,7 @@ export function ResetPasswordTemplate({
|
||||
>
|
||||
Return to Login
|
||||
</Button>
|
||||
</Stack>
|
||||
</Group>
|
||||
)}
|
||||
|
||||
<AuthFooterLinks>
|
||||
|
||||
Reference in New Issue
Block a user