mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 19:51:32 +10:00
Compare commits
3 Commits
v2.0.12
...
fix/templa
| Author | SHA1 | Date | |
|---|---|---|---|
| a75e71700f | |||
| d121392f74 | |||
| 6aa56fe7e0 |
@ -44,7 +44,7 @@ export default function EnvelopeEditorHeader() {
|
|||||||
<nav className="bg-background border-border w-full border-b px-4 py-3 md:px-6">
|
<nav className="bg-background border-border w-full border-b px-4 py-3 md:px-6">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
<Link to="/">
|
<Link to={relativePath.basePath}>
|
||||||
<BrandingLogo className="h-6 w-auto" />
|
<BrandingLogo className="h-6 w-auto" />
|
||||||
</Link>
|
</Link>
|
||||||
<Separator orientation="vertical" className="h-6" />
|
<Separator orientation="vertical" className="h-6" />
|
||||||
|
|||||||
@ -22,12 +22,14 @@ import { useDebouncedValue } from '@documenso/lib/client-only/hooks/use-debounce
|
|||||||
import { useCurrentEnvelopeEditor } from '@documenso/lib/client-only/providers/envelope-editor-provider';
|
import { useCurrentEnvelopeEditor } from '@documenso/lib/client-only/providers/envelope-editor-provider';
|
||||||
import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation';
|
import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation';
|
||||||
import { useSession } from '@documenso/lib/client-only/providers/session';
|
import { useSession } from '@documenso/lib/client-only/providers/session';
|
||||||
|
import { isTemplateRecipientEmailPlaceholder } from '@documenso/lib/constants/template';
|
||||||
import {
|
import {
|
||||||
ZRecipientActionAuthTypesSchema,
|
ZRecipientActionAuthTypesSchema,
|
||||||
ZRecipientAuthOptionsSchema,
|
ZRecipientAuthOptionsSchema,
|
||||||
} from '@documenso/lib/types/document-auth';
|
} from '@documenso/lib/types/document-auth';
|
||||||
import { nanoid } from '@documenso/lib/universal/id';
|
import { nanoid } from '@documenso/lib/universal/id';
|
||||||
import { canRecipientBeModified as utilCanRecipientBeModified } from '@documenso/lib/utils/recipients';
|
import { canRecipientBeModified as utilCanRecipientBeModified } from '@documenso/lib/utils/recipients';
|
||||||
|
import { generateRecipientPlaceholder } from '@documenso/lib/utils/templates';
|
||||||
import { trpc } from '@documenso/trpc/react';
|
import { trpc } from '@documenso/trpc/react';
|
||||||
import { AnimateGenericFadeInOut } from '@documenso/ui/components/animate/animate-generic-fade-in-out';
|
import { AnimateGenericFadeInOut } from '@documenso/ui/components/animate/animate-generic-fade-in-out';
|
||||||
import { RecipientActionAuthSelect } from '@documenso/ui/components/recipient/recipient-action-auth-select';
|
import { RecipientActionAuthSelect } from '@documenso/ui/components/recipient/recipient-action-auth-select';
|
||||||
@ -82,7 +84,8 @@ const ZEnvelopeRecipientsForm = z.object({
|
|||||||
type TEnvelopeRecipientsForm = z.infer<typeof ZEnvelopeRecipientsForm>;
|
type TEnvelopeRecipientsForm = z.infer<typeof ZEnvelopeRecipientsForm>;
|
||||||
|
|
||||||
export const EnvelopeEditorRecipientForm = () => {
|
export const EnvelopeEditorRecipientForm = () => {
|
||||||
const { envelope, setRecipientsDebounced, updateEnvelope } = useCurrentEnvelopeEditor();
|
const { envelope, setRecipientsDebounced, updateEnvelope, isTemplate } =
|
||||||
|
useCurrentEnvelopeEditor();
|
||||||
|
|
||||||
const organisation = useCurrentOrganisation();
|
const organisation = useCurrentOrganisation();
|
||||||
|
|
||||||
@ -119,6 +122,7 @@ export const EnvelopeEditorRecipientForm = () => {
|
|||||||
role: RecipientRole.SIGNER,
|
role: RecipientRole.SIGNER,
|
||||||
signingOrder: 1,
|
signingOrder: 1,
|
||||||
actionAuth: [],
|
actionAuth: [],
|
||||||
|
...(isTemplate ? generateRecipientPlaceholder(1) : {}),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -234,6 +238,8 @@ export const EnvelopeEditorRecipientForm = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onAddSigner = () => {
|
const onAddSigner = () => {
|
||||||
|
const placeholderRecipientCount = signers.length > 1 ? signers.length + 1 : 2;
|
||||||
|
|
||||||
appendSigner({
|
appendSigner({
|
||||||
formId: nanoid(12),
|
formId: nanoid(12),
|
||||||
name: '',
|
name: '',
|
||||||
@ -241,7 +247,10 @@ export const EnvelopeEditorRecipientForm = () => {
|
|||||||
role: RecipientRole.SIGNER,
|
role: RecipientRole.SIGNER,
|
||||||
actionAuth: [],
|
actionAuth: [],
|
||||||
signingOrder: signers.length > 0 ? (signers[signers.length - 1]?.signingOrder ?? 0) + 1 : 1,
|
signingOrder: signers.length > 0 ? (signers[signers.length - 1]?.signingOrder ?? 0) + 1 : 1,
|
||||||
|
...(isTemplate ? generateRecipientPlaceholder(placeholderRecipientCount) : {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
void form.trigger('signers');
|
||||||
};
|
};
|
||||||
|
|
||||||
const onRemoveSigner = (index: number) => {
|
const onRemoveSigner = (index: number) => {
|
||||||
@ -806,7 +815,7 @@ export const EnvelopeEditorRecipientForm = () => {
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{!showAdvancedSettings && index === 0 && (
|
{!showAdvancedSettings && index === 0 && (
|
||||||
<FormLabel required>
|
<FormLabel required={!isTemplate}>
|
||||||
<Trans>Email</Trans>
|
<Trans>Email</Trans>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
)}
|
)}
|
||||||
@ -815,7 +824,12 @@ export const EnvelopeEditorRecipientForm = () => {
|
|||||||
<RecipientAutoCompleteInput
|
<RecipientAutoCompleteInput
|
||||||
type="email"
|
type="email"
|
||||||
placeholder={t`Email`}
|
placeholder={t`Email`}
|
||||||
value={field.value}
|
value={
|
||||||
|
isTemplate &&
|
||||||
|
isTemplateRecipientEmailPlaceholder(field.value)
|
||||||
|
? ''
|
||||||
|
: field.value
|
||||||
|
}
|
||||||
disabled={
|
disabled={
|
||||||
snapshot.isDragging ||
|
snapshot.isDragging ||
|
||||||
isSubmitting ||
|
isSubmitting ||
|
||||||
|
|||||||
11043
packages/lib/translations/ja/web.po
Normal file
11043
packages/lib/translations/ja/web.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ msgstr ""
|
|||||||
"Language: pl\n"
|
"Language: pl\n"
|
||||||
"Project-Id-Version: documenso-app\n"
|
"Project-Id-Version: documenso-app\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"PO-Revision-Date: 2025-11-12 06:14\n"
|
"PO-Revision-Date: 2025-11-17 02:33\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: Polish\n"
|
"Language-Team: Polish\n"
|
||||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
||||||
@ -8943,13 +8943,13 @@ msgstr "Tytuł nie może być pusty"
|
|||||||
#. placeholder {2}: recipient.email
|
#. placeholder {2}: recipient.email
|
||||||
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
||||||
msgid "To {0} this {1}, you need to be logged in as <0>{2}</0>"
|
msgid "To {0} this {1}, you need to be logged in as <0>{2}</0>"
|
||||||
msgstr ""
|
msgstr "Aby {0} ten {1}, musisz być zalogowany jako <0>{2}</0>"
|
||||||
|
|
||||||
#. placeholder {0}: actionVerb.toLowerCase()
|
#. placeholder {0}: actionVerb.toLowerCase()
|
||||||
#. placeholder {1}: actionTarget.toLowerCase()
|
#. placeholder {1}: actionTarget.toLowerCase()
|
||||||
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
||||||
msgid "To {0} this {1}, you need to be logged in."
|
msgid "To {0} this {1}, you need to be logged in."
|
||||||
msgstr ""
|
msgstr "Aby {0} ten {1}, musisz być zalogowany."
|
||||||
|
|
||||||
#: apps/remix/app/routes/_unauthenticated+/organisation.invite.$token.tsx
|
#: apps/remix/app/routes/_unauthenticated+/organisation.invite.$token.tsx
|
||||||
msgid "To accept this invitation you must create an account."
|
msgid "To accept this invitation you must create an account."
|
||||||
@ -10532,7 +10532,7 @@ msgstr "Nie możesz przesyłać zaszyfrowanych plików PDF"
|
|||||||
#: apps/remix/app/components/general/envelope/envelope-upload-button.tsx
|
#: apps/remix/app/components/general/envelope/envelope-upload-button.tsx
|
||||||
#: apps/remix/app/components/general/envelope/envelope-drop-zone-wrapper.tsx
|
#: apps/remix/app/components/general/envelope/envelope-drop-zone-wrapper.tsx
|
||||||
msgid "You cannot upload more than {maximumEnvelopeItemCount} items per envelope."
|
msgid "You cannot upload more than {maximumEnvelopeItemCount} items per envelope."
|
||||||
msgstr ""
|
msgstr "Nie możesz przesłać więcej niż {maximumEnvelopeItemCount} elementów na kopertę."
|
||||||
|
|
||||||
#: apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx
|
#: apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx
|
||||||
msgid "You currently have an inactive <0>{currentProductName}</0> subscription"
|
msgid "You currently have an inactive <0>{currentProductName}</0> subscription"
|
||||||
|
|||||||
11043
packages/lib/translations/zh/web.po
Normal file
11043
packages/lib/translations/zh/web.po
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user