Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: auto translate access screen
Marc Seitz2265b11ce00e
diff --git a/components/ui/input-otp.tsx b/components/ui/input-otp.tsxindex 5d9ee806..2cd1a6d5 100644--- a/components/ui/input-otp.tsx+++ b/components/ui/input-otp.tsx@@ -12,8 +12,9 @@ const InputOTP = React.forwardRef<<OTPInputref={ref}data-1p-ignore+ translate="no"containerClassName={cn(- "flex items-center gap-2 has-[:disabled]:opacity-50",+ "flex items-center gap-2 has-[:disabled]:opacity-50 notranslate",containerClassName,)}className={cn("disabled:cursor-not-allowed", className)}diff --git a/components/view/access-form/custom-fields-section.tsx b/components/view/access-form/custom-fields-section.tsxindex 174e78e9..ec8caeae 100644--- a/components/view/access-form/custom-fields-section.tsx+++ b/components/view/access-form/custom-fields-section.tsx@@ -62,8 +62,9 @@ export default function CustomFieldsSection({placeholder={field.placeholder || "+1 123 456 7890"}defaultCountry="US"disabled={field.disabled}+ translate="no"className={cn(- "flex w-full rounded-md border-0 bg-black text-gray-500 placeholder:text-gray-400 sm:text-sm sm:leading-6",+ "notranslate flex w-full rounded-md border-0 bg-black text-gray-500 placeholder:text-gray-400 sm:text-sm sm:leading-6",)}style={{@@ -102,8 +103,9 @@ export default function CustomFieldsSection({data-1p-ignorerequired={field.required}disabled={field.disabled}+ translate="no"className={cn(- "flex w-full rounded-md border-0 bg-black py-1.5 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6",+ "notranslate flex w-full rounded-md border-0 bg-black py-1.5 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6",isLongText && "min-h-[100px] resize-none",)}style={{diff --git a/components/view/access-form/email-section.tsx b/components/view/access-form/email-section.tsxindex aeea8dba..de891969 100644--- a/components/view/access-form/email-section.tsx+++ b/components/view/access-form/email-section.tsx@@ -109,8 +109,9 @@ export default function EmailSection({autoComplete="email"autoFocusrequired+ translate="no"className={cn(- "flex w-full rounded-md border-0 bg-black py-1.5 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6",+ "notranslate flex w-full rounded-md border-0 bg-black py-1.5 text-gray-500 shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6",emailError && isDirty && "ring-red-500",)}style={{diff --git a/components/view/access-form/email-verification-form.tsx b/components/view/access-form/email-verification-form.tsxindex 0ba08297..77b7d053 100644--- a/components/view/access-form/email-verification-form.tsx+++ b/components/view/access-form/email-verification-form.tsx@@ -1,5 +1,7 @@import { useEffect, useState } from "react";+import { useMediaQuery } from "@/lib/utils/use-media-query";+import { Button } from "@/components/ui/button";import {InputOTP,@@ -8,8 +10,6 @@ import {} from "@/components/ui/input-otp";import { DEFAULT_ACCESS_FORM_TYPE } from "@/components/view/access-form";-import { useMediaQuery } from "@/lib/utils/use-media-query";-const REGEXP_ONLY_DIGITS = "^\\d+$";export default function EmailVerificationMessage({@@ -57,7 +57,7 @@ export default function EmailVerificationMessage({{data.email}</strong></p>- <form onSubmit={onSubmitHandler}>+ <form onSubmit={onSubmitHandler} translate="no"><InputOTPmaxLength={6}pattern={REGEXP_ONLY_DIGITS}diff --git a/components/view/access-form/index.tsx b/components/view/access-form/index.tsxindex 7332ecf5..fb3c2dd2 100644--- a/components/view/access-form/index.tsx+++ b/components/view/access-form/index.tsx@@ -141,7 +141,7 @@ export default function AccessForm({</div><div className="mt-10 sm:mx-auto sm:w-full sm:max-w-md">- <form className="space-y-4" onSubmit={onSubmitHandler}>+ <form className="space-y-4" onSubmit={onSubmitHandler} translate="no">{requireAgreement && agreementContent && requireName ? (<NameSection {...{ data, setData, brand }} />) : null}diff --git a/components/view/access-form/name-section.tsx b/components/view/access-form/name-section.tsxindex 5980de2f..3221884e 100644--- a/components/view/access-form/name-section.tsx+++ b/components/view/access-form/name-section.tsx@@ -54,7 +54,8 @@ export default function NameSection({autoCorrect="off"autoComplete="off"autoFocus- className="flex w-full rounded-md border-0 bg-black py-1.5 text-white shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"+ translate="no"+ className="notranslate flex w-full rounded-md border-0 bg-black py-1.5 text-white shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"style={{backgroundColor:brand && brand.accentColor ? brand.accentColor : "black",diff --git a/components/view/access-form/password-section.tsx b/components/view/access-form/password-section.tsxindex 3fb77730..b12fc213 100644--- a/components/view/access-form/password-section.tsx+++ b/components/view/access-form/password-section.tsx@@ -2,11 +2,11 @@ import { Dispatch, SetStateAction, useState } from "react";import { Brand, DataroomBrand } from "@prisma/client";+import { determineTextColor } from "@/lib/utils/determine-text-color";+import Eye from "@/components/shared/icons/eye";import EyeOff from "@/components/shared/icons/eye-off";-import { determineTextColor } from "@/lib/utils/determine-text-color";-import { DEFAULT_ACCESS_FORM_TYPE } from ".";export default function PasswordSection({@@ -39,7 +39,8 @@ export default function PasswordSection({type={showPassword ? "text" : "password"}autoCorrect="off"autoComplete="off"- className="flex w-full rounded-md border-0 bg-black py-1.5 text-white shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"+ translate="no"+ className="notranslate flex w-full rounded-md border-0 bg-black py-1.5 text-white shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"style={{backgroundColor:brand && brand.accentColor ? brand.accentColor : "black",