mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-04 08:05:42 +00:00 
			
		
		
		
	feat: add custom forgot password message
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
import { TextInput, PasswordInput, Button } from "@mantine/core";
 | 
			
		||||
import { TextInput, PasswordInput, Button, Anchor, Group, Text } from "@mantine/core";
 | 
			
		||||
import { useForm, zodResolver } from "@mantine/form";
 | 
			
		||||
import { LoginFormValues, loginSchema } from "../../schemas/login-schema";
 | 
			
		||||
import { useTranslation } from "react-i18next";
 | 
			
		||||
@@ -26,16 +26,25 @@ export const LoginForm = (props: LoginFormProps) => {
 | 
			
		||||
      <TextInput
 | 
			
		||||
        label={t("loginUsername")}
 | 
			
		||||
        placeholder="username"
 | 
			
		||||
        required
 | 
			
		||||
        disabled={isPending}
 | 
			
		||||
        required
 | 
			
		||||
        withAsterisk={false}
 | 
			
		||||
        key={form.key("username")}
 | 
			
		||||
        {...form.getInputProps("username")}
 | 
			
		||||
      />
 | 
			
		||||
      <Group justify="space-between" mb={5} mt="md">
 | 
			
		||||
        <Text component="label" htmlFor=".password-input" size="sm" fw={500}>
 | 
			
		||||
        {t("loginPassword")}
 | 
			
		||||
        </Text>
 | 
			
		||||
 | 
			
		||||
        <Anchor href="#" onClick={() => window.location.replace("/forgot-password")} pt={2} fw={500} fz="xs">
 | 
			
		||||
          {t('forgotPasswordTitle')}
 | 
			
		||||
        </Anchor>
 | 
			
		||||
      </Group>
 | 
			
		||||
      <PasswordInput
 | 
			
		||||
        label={t("loginPassword")}
 | 
			
		||||
        className="password-input"
 | 
			
		||||
        placeholder="password"
 | 
			
		||||
        required
 | 
			
		||||
        mt="md"
 | 
			
		||||
        disabled={isPending}
 | 
			
		||||
        key={form.key("password")}
 | 
			
		||||
        {...form.getInputProps("password")}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user