mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 18:51:37 +10:00
Compare commits
5 Commits
v2.0.12
...
fix/improv
| Author | SHA1 | Date | |
|---|---|---|---|
| d4e259a9a7 | |||
| 798b6bd750 | |||
| 8fbace0f61 | |||
| 1bbd04be9b | |||
| 6aa56fe7e0 |
@ -5,7 +5,7 @@ import { msg } from '@lingui/core/macro';
|
|||||||
import { Trans, useLingui } from '@lingui/react/macro';
|
import { Trans, useLingui } from '@lingui/react/macro';
|
||||||
import { FieldType, RecipientRole } from '@prisma/client';
|
import { FieldType, RecipientRole } from '@prisma/client';
|
||||||
import { FileTextIcon } from 'lucide-react';
|
import { FileTextIcon } from 'lucide-react';
|
||||||
import { Link } from 'react-router';
|
import { Link, useSearchParams } from 'react-router';
|
||||||
import { isDeepEqual } from 'remeda';
|
import { isDeepEqual } from 'remeda';
|
||||||
import { match } from 'ts-pattern';
|
import { match } from 'ts-pattern';
|
||||||
|
|
||||||
@ -65,6 +65,8 @@ const FieldSettingsTypeTranslations: Record<FieldType, MessageDescriptor> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const EnvelopeEditorFieldsPage = () => {
|
export const EnvelopeEditorFieldsPage = () => {
|
||||||
|
const [searchParams] = useSearchParams();
|
||||||
|
|
||||||
const { envelope, editorFields, relativePath } = useCurrentEnvelopeEditor();
|
const { envelope, editorFields, relativePath } = useCurrentEnvelopeEditor();
|
||||||
|
|
||||||
const { currentEnvelopeItem } = useCurrentEnvelopeRender();
|
const { currentEnvelopeItem } = useCurrentEnvelopeRender();
|
||||||
@ -208,6 +210,37 @@ export const EnvelopeEditorFieldsPage = () => {
|
|||||||
<section>
|
<section>
|
||||||
<Separator className="my-4" />
|
<Separator className="my-4" />
|
||||||
|
|
||||||
|
{searchParams.get('devmode') && (
|
||||||
|
<>
|
||||||
|
<div className="px-4">
|
||||||
|
<h3 className="text-foreground mb-3 text-sm font-semibold">
|
||||||
|
<Trans>Developer Mode</Trans>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div className="bg-muted/50 border-border text-foreground space-y-2 rounded-md border p-3 text-sm">
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Pos X: </span>
|
||||||
|
{selectedField.positionX.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Pos Y: </span>
|
||||||
|
{selectedField.positionY.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Width: </span>
|
||||||
|
{selectedField.width.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Height: </span>
|
||||||
|
{selectedField.height.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Separator className="my-4" />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="[&_label]:text-foreground/70 px-4 [&_label]:text-xs">
|
<div className="[&_label]:text-foreground/70 px-4 [&_label]:text-xs">
|
||||||
<h3 className="text-sm font-semibold">
|
<h3 className="text-sm font-semibold">
|
||||||
{t(FieldSettingsTypeTranslations[selectedField.type])}
|
{t(FieldSettingsTypeTranslations[selectedField.type])}
|
||||||
|
|||||||
@ -202,8 +202,12 @@ export default function CompletedSigningPage({ loaderData }: Route.ComponentProp
|
|||||||
</p>
|
</p>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<div className="mt-8 flex w-full max-w-sm items-center justify-center gap-4">
|
<div className="mt-8 flex w-full max-w-xs flex-col items-stretch gap-4 md:w-auto md:max-w-none md:flex-row md:items-center">
|
||||||
<DocumentShareButton documentId={document.id} token={recipient.token} />
|
<DocumentShareButton
|
||||||
|
documentId={document.id}
|
||||||
|
token={recipient.token}
|
||||||
|
className="w-full max-w-none md:flex-1"
|
||||||
|
/>
|
||||||
|
|
||||||
{isDocumentCompleted(document.status) && (
|
{isDocumentCompleted(document.status) && (
|
||||||
<EnvelopeDownloadDialog
|
<EnvelopeDownloadDialog
|
||||||
@ -212,13 +216,21 @@ export default function CompletedSigningPage({ loaderData }: Route.ComponentProp
|
|||||||
envelopeItems={document.envelopeItems}
|
envelopeItems={document.envelopeItems}
|
||||||
token={recipient?.token}
|
token={recipient?.token}
|
||||||
trigger={
|
trigger={
|
||||||
<Button type="button" variant="outline" className="flex-1">
|
<Button type="button" variant="outline" className="flex-1 md:flex-initial">
|
||||||
<DownloadIcon className="mr-2 h-5 w-5" />
|
<DownloadIcon className="mr-2 h-5 w-5" />
|
||||||
<Trans>Download</Trans>
|
<Trans>Download</Trans>
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{user && (
|
||||||
|
<Button asChild>
|
||||||
|
<Link to="/">
|
||||||
|
<Trans>Go Back Home</Trans>
|
||||||
|
</Link>
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -238,12 +250,6 @@ export default function CompletedSigningPage({ loaderData }: Route.ComponentProp
|
|||||||
<ClaimAccount defaultName={recipientName} defaultEmail={recipient.email} />
|
<ClaimAccount defaultName={recipientName} defaultEmail={recipient.email} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{user && (
|
|
||||||
<Link to="/" className="text-documenso-700 hover:text-documenso-600 mt-2">
|
|
||||||
<Trans>Go Back Home</Trans>
|
|
||||||
</Link>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,16 @@
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
export const SUPPORTED_LANGUAGE_CODES = ['de', 'en', 'fr', 'es', 'it', 'pl'] as const;
|
export const SUPPORTED_LANGUAGE_CODES = [
|
||||||
|
'de',
|
||||||
|
'en',
|
||||||
|
'fr',
|
||||||
|
'es',
|
||||||
|
'it',
|
||||||
|
'pl',
|
||||||
|
'ja',
|
||||||
|
'ko',
|
||||||
|
'zh',
|
||||||
|
] as const;
|
||||||
|
|
||||||
export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).catch('en');
|
export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).catch('en');
|
||||||
|
|
||||||
@ -54,6 +64,18 @@ export const SUPPORTED_LANGUAGES: Record<string, SupportedLanguage> = {
|
|||||||
short: 'pl',
|
short: 'pl',
|
||||||
full: 'Polish',
|
full: 'Polish',
|
||||||
},
|
},
|
||||||
|
ja: {
|
||||||
|
short: 'ja',
|
||||||
|
full: 'Japanese',
|
||||||
|
},
|
||||||
|
ko: {
|
||||||
|
short: 'ko',
|
||||||
|
full: 'Korean',
|
||||||
|
},
|
||||||
|
zh: {
|
||||||
|
short: 'zh',
|
||||||
|
full: 'Chinese',
|
||||||
|
},
|
||||||
} satisfies Record<SupportedLanguageCodes, SupportedLanguage>;
|
} satisfies Record<SupportedLanguageCodes, SupportedLanguage>;
|
||||||
|
|
||||||
export const isValidLanguageCode = (code: unknown): code is SupportedLanguageCodes =>
|
export const isValidLanguageCode = (code: unknown): code is SupportedLanguageCodes =>
|
||||||
|
|||||||
@ -31,26 +31,16 @@ export const viewedDocument = async ({
|
|||||||
type: EnvelopeType.DOCUMENT,
|
type: EnvelopeType.DOCUMENT,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
include: {
|
|
||||||
envelope: {
|
|
||||||
include: {
|
|
||||||
documentMeta: true,
|
|
||||||
recipients: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!recipient) {
|
if (!recipient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { envelope } = recipient;
|
|
||||||
|
|
||||||
await prisma.documentAuditLog.create({
|
await prisma.documentAuditLog.create({
|
||||||
data: createDocumentAuditLogData({
|
data: createDocumentAuditLogData({
|
||||||
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_VIEWED,
|
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_VIEWED,
|
||||||
envelopeId: envelope.id,
|
envelopeId: recipient.envelopeId,
|
||||||
user: {
|
user: {
|
||||||
name: recipient.name,
|
name: recipient.name,
|
||||||
email: recipient.email,
|
email: recipient.email,
|
||||||
@ -86,7 +76,7 @@ export const viewedDocument = async ({
|
|||||||
await tx.documentAuditLog.create({
|
await tx.documentAuditLog.create({
|
||||||
data: createDocumentAuditLogData({
|
data: createDocumentAuditLogData({
|
||||||
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED,
|
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED,
|
||||||
envelopeId: envelope.id,
|
envelopeId: recipient.envelopeId,
|
||||||
user: {
|
user: {
|
||||||
name: recipient.name,
|
name: recipient.name,
|
||||||
email: recipient.email,
|
email: recipient.email,
|
||||||
@ -103,6 +93,16 @@ export const viewedDocument = async ({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const envelope = await prisma.envelope.findUniqueOrThrow({
|
||||||
|
where: {
|
||||||
|
id: recipient.envelopeId,
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
documentMeta: true,
|
||||||
|
recipients: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
await triggerWebhook({
|
await triggerWebhook({
|
||||||
event: WebhookTriggerEvents.DOCUMENT_OPENED,
|
event: WebhookTriggerEvents.DOCUMENT_OPENED,
|
||||||
data: ZWebhookDocumentSchema.parse(mapEnvelopeToWebhookDocumentPayload(envelope)),
|
data: ZWebhookDocumentSchema.parse(mapEnvelopeToWebhookDocumentPayload(envelope)),
|
||||||
|
|||||||
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
@ -127,11 +127,11 @@ export const DocumentShareButton = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
disabled={!token || !documentId}
|
disabled={!token || !documentId}
|
||||||
className={cn('flex-1 text-[11px]', className)}
|
className={cn('w-full max-w-lg flex-1 text-[11px]', className)}
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
>
|
>
|
||||||
{!isLoading && <Sparkles className="mr-2 h-5 w-5" />}
|
{!isLoading && <Sparkles className="mr-2 h-5 w-5" />}
|
||||||
<Trans>Share Signature Card</Trans>
|
<Trans>Share</Trans>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
|
|||||||
Reference in New Issue
Block a user