mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
feat: use password input component
This commit is contained in:
@ -23,6 +23,7 @@ import {
|
|||||||
FormMessage,
|
FormMessage,
|
||||||
} from '@documenso/ui/primitives/form/form';
|
} from '@documenso/ui/primitives/form/form';
|
||||||
import { Input } from '@documenso/ui/primitives/input';
|
import { Input } from '@documenso/ui/primitives/input';
|
||||||
|
import { PasswordInput } from '@documenso/ui/primitives/password-input';
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
export const ZDisableTwoFactorAuthenticationForm = z.object({
|
export const ZDisableTwoFactorAuthenticationForm = z.object({
|
||||||
@ -106,6 +107,10 @@ export const DisableAuthenticatorAppDialog = ({
|
|||||||
onDisableTwoFactorAuthenticationFormSubmit,
|
onDisableTwoFactorAuthenticationFormSubmit,
|
||||||
)}
|
)}
|
||||||
className="flex flex-col gap-y-4"
|
className="flex flex-col gap-y-4"
|
||||||
|
>
|
||||||
|
<fieldset
|
||||||
|
className="flex flex-col gap-y-4"
|
||||||
|
disabled={isDisableTwoFactorAuthenticationSubmitting}
|
||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
name="password"
|
name="password"
|
||||||
@ -114,9 +119,8 @@ export const DisableAuthenticatorAppDialog = ({
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel className="text-muted-foreground">Password</FormLabel>
|
<FormLabel className="text-muted-foreground">Password</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<PasswordInput
|
||||||
{...field}
|
{...field}
|
||||||
type="password"
|
|
||||||
autoComplete="current-password"
|
autoComplete="current-password"
|
||||||
value={field.value ?? ''}
|
value={field.value ?? ''}
|
||||||
/>
|
/>
|
||||||
@ -139,6 +143,7 @@ export const DisableAuthenticatorAppDialog = ({
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<div className="flex w-full items-center justify-between">
|
<div className="flex w-full items-center justify-between">
|
||||||
<Button type="button" variant="ghost" onClick={() => onOpenChange(false)}>
|
<Button type="button" variant="ghost" onClick={() => onOpenChange(false)}>
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import {
|
|||||||
FormMessage,
|
FormMessage,
|
||||||
} from '@documenso/ui/primitives/form/form';
|
} from '@documenso/ui/primitives/form/form';
|
||||||
import { Input } from '@documenso/ui/primitives/input';
|
import { Input } from '@documenso/ui/primitives/input';
|
||||||
|
import { PasswordInput } from '@documenso/ui/primitives/password-input';
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
import { RecoveryCodeList } from './recovery-code-list';
|
import { RecoveryCodeList } from './recovery-code-list';
|
||||||
@ -178,9 +179,8 @@ export const EnableAuthenticatorAppDialog = ({
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel className="text-muted-foreground">Password</FormLabel>
|
<FormLabel className="text-muted-foreground">Password</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<PasswordInput
|
||||||
{...field}
|
{...field}
|
||||||
type="password"
|
|
||||||
autoComplete="current-password"
|
autoComplete="current-password"
|
||||||
value={field.value ?? ''}
|
value={field.value ?? ''}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import {
|
|||||||
FormLabel,
|
FormLabel,
|
||||||
FormMessage,
|
FormMessage,
|
||||||
} from '@documenso/ui/primitives/form/form';
|
} from '@documenso/ui/primitives/form/form';
|
||||||
import { Input } from '@documenso/ui/primitives/input';
|
import { PasswordInput } from '@documenso/ui/primitives/password-input';
|
||||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||||
|
|
||||||
import { RecoveryCodeList } from './recovery-code-list';
|
import { RecoveryCodeList } from './recovery-code-list';
|
||||||
@ -108,9 +108,8 @@ export const ViewRecoveryCodesDialog = ({ open, onOpenChange }: ViewRecoveryCode
|
|||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel className="text-muted-foreground">Password</FormLabel>
|
<FormLabel className="text-muted-foreground">Password</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<PasswordInput
|
||||||
{...field}
|
{...field}
|
||||||
type="password"
|
|
||||||
autoComplete="current-password"
|
autoComplete="current-password"
|
||||||
value={field.value ?? ''}
|
value={field.value ?? ''}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user