The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
feat: use password input component
nafees nazika9068336571c
diff --git a/apps/web/src/components/forms/2fa/disable-authenticator-app-dialog.tsx b/apps/web/src/components/forms/2fa/disable-authenticator-app-dialog.tsxindex eac574181..eafed5500 100644--- a/apps/web/src/components/forms/2fa/disable-authenticator-app-dialog.tsx+++ b/apps/web/src/components/forms/2fa/disable-authenticator-app-dialog.tsx@@ -23,6 +23,7 @@ import {FormMessage,} 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';export const ZDisableTwoFactorAuthenticationForm = z.object({@@ -107,38 +108,42 @@ export const DisableAuthenticatorAppDialog = ({)}className="flex flex-col gap-y-4">- <FormField- name="password"- control={disableTwoFactorAuthenticationForm.control}- render={({ field }) => (- <FormItem>- <FormLabel className="text-muted-foreground">Password</FormLabel>- <FormControl>- <Input- {...field}- type="password"- autoComplete="current-password"- value={field.value ?? ''}- />- </FormControl>- <FormMessage />- </FormItem>- )}- />-- <FormField- name="backupCode"- control={disableTwoFactorAuthenticationForm.control}- render={({ field }) => (- <FormItem>- <FormLabel className="text-muted-foreground">Backup Code</FormLabel>- <FormControl>- <Input {...field} type="text" value={field.value ?? ''} />- </FormControl>- <FormMessage />- </FormItem>- )}- />+ <fieldset+ className="flex flex-col gap-y-4"+ disabled={isDisableTwoFactorAuthenticationSubmitting}+ >+ <FormField+ name="password"+ control={disableTwoFactorAuthenticationForm.control}+ render={({ field }) => (+ <FormItem>+ <FormLabel className="text-muted-foreground">Password</FormLabel>+ <FormControl>+ <PasswordInput+ {...field}+ autoComplete="current-password"+ value={field.value ?? ''}+ />+ </FormControl>+ <FormMessage />+ </FormItem>+ )}+ />++ <FormField+ name="backupCode"+ control={disableTwoFactorAuthenticationForm.control}+ render={({ field }) => (+ <FormItem>+ <FormLabel className="text-muted-foreground">Backup Code</FormLabel>+ <FormControl>+ <Input {...field} type="text" value={field.value ?? ''} />+ </FormControl>+ <FormMessage />+ </FormItem>+ )}+ />+ </fieldset><div className="flex w-full items-center justify-between"><Button type="button" variant="ghost" onClick={() => onOpenChange(false)}>diff --git a/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx b/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsxindex 8bf835ef5..0db1c8b50 100644--- a/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx+++ b/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx@@ -27,6 +27,7 @@ import {FormMessage,} 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 { RecoveryCodeList } from './recovery-code-list';@@ -178,9 +179,8 @@ export const EnableAuthenticatorAppDialog = ({<FormItem><FormLabel className="text-muted-foreground">Password</FormLabel><FormControl>- <Input+ <PasswordInput{...field}- type="password"autoComplete="current-password"value={field.value ?? ''}/>diff --git a/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx b/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsxindex 6275f16d6..5590a6722 100644--- a/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx+++ b/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx@@ -22,7 +22,7 @@ import {FormLabel,FormMessage,} 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 { RecoveryCodeList } from './recovery-code-list';@@ -108,9 +108,8 @@ export const ViewRecoveryCodesDialog = ({ open, onOpenChange }: ViewRecoveryCode<FormItem><FormLabel className="text-muted-foreground">Password</FormLabel><FormControl>- <Input+ <PasswordInput{...field}- type="password"autoComplete="current-password"value={field.value ?? ''}/>