Compare commits

...

16 Commits

Author SHA1 Message Date
Mythie
7b06b68572 v1.7.1-rc.0 2024-09-10 23:15:02 +10:00
Catalin Pit
9ee89346b1 fix: template with empty advanced fields backend (#1340)
extension of https://github.com/documenso/documenso/pull/1339
2024-09-10 21:35:35 +10:00
Catalin Pit
77da7847d9 fix: template with empty advanced fields (#1339)
Templates can be created and sent with advanced fields that have empty
values. That will cause an error when the user tries to sign the
document.

For example, you can create a template with a checkbox field and save
it. Then, you can click the "Use template" button and send the document
by clicking "Send document." However, this shouldn't be possible if the
advanced field doesn't have any values.
2024-09-10 16:23:16 +10:00
Lucas Smith
c36306d2c9 feat: add authOptions to the API (#1338)
Add the authOptions property to the document and
recipient related API endpoints.

These were previously missing so the only way API
users could set the authOptions was via templates
and using the generateTemplate endpoint.
2024-09-10 15:07:40 +10:00
Etrenak
f6f893fbf7 fix: prefill advanced field settings in templates (#1332)
## Description

Seems like I was overconfident in #1323 and I did not test properly.
Currently, the advanced settings for a field in a **template** is not
pre-filled with the current fieldMeta, although it is correctly
pre-filled in a **draft document** (That's probably where I messed up my
testing).

In this PR, I propose to directly use the fieldMeta provided by the
field prop in `FieldAdvancedSettings`, instead of multiplying tRPCs to
request the fieldMeta while we already have it.

I apologize for the wasted time in reviewing my previous PR which was
only correcting the display of the field label in the template view.

## Testing Performed

- This time, I correctly checked that the advanced settings for a field
is correctly pre-filled both in a document draft and in a template.
- `npm run build` builds correctly.
2024-09-10 13:22:03 +10:00
Catalin Pit
e1b2206d28 fix: select field ux (#1334)
When the Select field has a default value, it automatically signs with
it. If you change it, you need to refresh the page to re-sign again with
that value. This PR improves the UX by making the default value
"selectable" in the dropdown menu.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Updated the `DropdownField` component to simplify the handling of
default values, ensuring the dropdown starts without a pre-selected
option.
- Improved the clarity of the placeholder text in the dropdown,
enhancing user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-10 13:15:47 +10:00
Catalin Pit
ad135b72d8 feat: marketing cta (#1335)
---
name: Pull Request
about: Submit changes to the project for review and inclusion
---

## Description

<!--- Describe the changes introduced by this pull request. -->
<!--- Explain what problem it solves or what feature/fix it adds. -->

## Related Issue

<!--- If this pull request is related to a specific issue, reference it
here using #issue_number. -->
<!--- For example, "Fixes #123" or "Addresses #456". -->

## Changes Made

<!--- Provide a summary of the changes made in this pull request. -->
<!--- Include any relevant technical details or architecture changes.
-->

- Change 1
- Change 2
- ...

## Testing Performed

<!--- Describe the testing that you have performed to validate these
changes. -->
<!--- Include information about test cases, testing environments, and
results. -->

- Tested feature X in scenario Y.
- Ran unit tests for component Z.
- Tested on browsers A, B, and C.
- ...

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [ ] I have tested these changes locally and they work as expected.
- [ ] I have added/updated tests that prove the effectiveness of these
changes.
- [ ] I have updated the documentation to reflect these changes, if
applicable.
- [ ] I have followed the project's coding style guidelines.
- [ ] I have addressed the code review feedback from the previous
submission, if applicable.

## Additional Notes

<!--- Provide any additional context or notes for the reviewers. -->
<!--- This might include details about design decisions, potential
concerns, or anything else relevant. -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new `CallToAction` component to enhance user engagement
in the self-hosting documentation.
- Added interactive call-to-action elements in the self-hosting
documentation pages to guide users towards specific actions.

- **Documentation**
- Updated self-hosting documentation to include the new call-to-action
feature, improving usability and interactivity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-10 12:42:12 +10:00
David Nguyen
e81023f8d4 fix: refactor dates (#1321)
## Description

Refactor the current date formatting system to utilize Lingui.

## Changes Made

- Remove redundant `LocaleData` component with Lingui dates

## Important notes

For the internal pages for certificates, default to en-US to format any
dates.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced internationalization support across various components by
utilizing the `i18n` object for date formatting.
- Streamlined locale management by removing cookie-based language
handling and adopting a more centralized approach.

- **Bug Fixes**
- Improved date formatting consistency by replacing the `LocaleDate`
component with direct calls to `i18n.date()` in multiple components.

- **Documentation**
- Updated localization strings in the `web.po` files to reflect recent
changes in the source code structure.

- **Chores**
- Minor formatting adjustments and code organization improvements across
various files to enhance readability and maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions <github-actions@documenso.com>
2024-09-10 12:38:08 +10:00
Mythie
bfb09e7928 v1.7.0 2024-09-09 11:20:33 +10:00
Mythie
d7e5aa1d26 v1.7.0-rc.5 2024-09-09 08:47:26 +10:00
Lucas Smith
8cb3ad4f3c chore: embedding blog post (#1329) 2024-09-06 22:11:55 +10:00
david-loe
6c3acb1c2d feat: add and use NEXT_PRIVATE_INTERNAL_WEBAPP_URL (#1298)
Introduces `NEXT_PRIVATE_INTERNAL_WEBAPP_URL` used for requesting the
app by itself (backend) [e.g. for background jobs]
2024-09-06 20:37:10 +10:00
Catalin Pit
3f82720383 feat: allow recipient to select signature color (#1325)
Allow users to select a colour for the signature. The allowed colours
are black, white, red, blue, and green.
2024-09-06 15:23:34 +10:00
Imran Khan
a6f93698b4 fix: changed the default file path for local certs (#1277)
Changed the default value of NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH env
variable
2024-09-06 14:09:25 +10:00
David Nguyen
bdc4ec1a31 chore: compile translations 2024-09-06 13:30:45 +10:00
Lucas Smith
bc471fcd9f chore: add translations (#1308)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Chores**
- Updated the metadata revision dates in multiple German translation
files for consistency.
- Added extraneous blank lines in multiple translation files for cleaner
formatting.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-09-06 12:54:18 +10:00
74 changed files with 2051 additions and 1732 deletions

View File

@@ -27,6 +27,8 @@ NEXT_PRIVATE_OIDC_SKIP_VERIFY=""
# [[URLS]]
NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000"
NEXT_PUBLIC_MARKETING_URL="http://localhost:3001"
# URL used by the web app to request itself (e.g. local background jobs)
NEXT_PRIVATE_INTERNAL_WEBAPP_URL="http://localhost:3000"
# [[DATABASE]]
NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"

View File

@@ -32,6 +32,9 @@ jobs:
- name: Run Playwright tests
run: npm run ci
env:
# Needed since we use next start which will set the NODE_ENV to production
NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH: './example/cert.p12'
- uses: actions/upload-artifact@v4
if: always()

View File

@@ -5,6 +5,8 @@ description: Learn how to self-host Documenso on your server or cloud infrastruc
import { Callout, Steps } from 'nextra/components';
import { CallToAction } from '@documenso/ui/components/call-to-action';
# Self Hosting
We support various deployment methods and are actively working on adding more. Please let us know if you have a specific deployment method in mind!
@@ -273,3 +275,5 @@ We offer several alternative deployment methods for Documenso if you need more o
## Koyeb
[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/documenso/documenso&branch=main&name=documenso-app&builder=dockerfile&dockerfile=/docker/Dockerfile)
<CallToAction className="mt-12" utmSource="self-hosting" />

View File

@@ -3,6 +3,10 @@ title: Getting Started with Self-Hosting
description: A step-by-step guide to setting up and hosting your own Documenso instance.
---
import { CallToAction } from '@documenso/ui/components/call-to-action';
# Getting Started with Self-Hosting
This is a step-by-step guide to setting up and hosting your own Documenso instance. Before getting started, [select the right license for you](/users/licenses).
<CallToAction className="mt-12" utmSource="self-hosting" />

View File

@@ -0,0 +1,72 @@
---
title: 'Introducing Embedding Support for Documenso'
description: 'Embedding is now here! Learn how we built it and how it can be used to bring e-signing to your own applications.'
authorName: 'Lucas Smith'
authorImage: '/blog/blog-author-lucas.png'
authorRole: 'Co-Founder'
date: 2024-09-06
tags:
- Development
---
When we first launched Documenso, one of the most requested features was embedding. We knew it was important and aligned with our desire to not just be a e-signing application but to instead provide the e-signature infrastructure for the web and beyond.
With that said, we decided to hold off initially so we could focus on building a solid, well-featured core application. Looking back, this was definitely the right call. Embedding is only as good as the features behind it, and we didn't want to release something that wasn't ready to meet user and developer expectations.
Over the past year, we've been busy adding tons of new features and reaching new levels of compliance, like 21 CFR Part 11. We've also introduced [new fields](/blog/introducing-advanced-signing-fields), [built out an API](/blog/public-api), [added webhooks, integrations with Zapier](/blog/launch-week-2-day-4), and a lot more.
Now that we've laid a solid foundation, it's finally time to focus on embedding, the top-requested feature from both our users and those self-hosting our platform.
## Why Embedding Took Time
In previous projects, Ive often seen embedding built by bundling components for use in a clients website or app. This method gives users maximum flexibility for styling and behavior, while avoiding certain cross-origin issues. However, it can also introduce problems like code conflicts or performance bottlenecks. For example, third-party tools such as Google Tag Manager (GTM) or other marketing scripts can interfere with your SDK. Additionally, the SDK must remain lightweight to avoid slowing down the clients page.
For Documenso, we decided to explore a different approach. After carefully researching our options, we opted for an iframe-based solution. While iframes are typically less flexible—especially when it comes to theming or passing pre-filled data containing personally identifiable information (PII)—we identified ways to mitigate these concerns.
One of the biggest challenges was ensuring that we could pass sensitive data, like emails for pre-filling forms, without exposing PII to our server. To solve this, we used [fragment identifiers](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash) in the URL, which are processed client-side and never sent in network requests. This method ensures that PII is protected and not logged by our server or any intermediate web services.
### Using the PostMessage API for Communication
To maintain a high level of interactivity, our iframes communicate with the parent window using the [postMessage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage). This allows us to notify the parent app when specific events occur inside the iframe, creating a more dynamic user experience and bridging the gap between our iframe-based solution and typical fat SDKs.
Additionally, props are passed into the iframe via the [fragment identifier](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash) of the URL. This avoids the need for complex two-way data synchronization between the parent and child frames, making the system stable and more reliable.
### Building the Embeds with Mitosis
Given that our iframe solution is quite lightweight, we saw this as a great opportunity to experiment with [Mitosis](https://mitosis.builder.io/) which would let us do something truly special. For those unfamiliar, Mitosis is a project by Builder.io that lets you write components once and then transpile them into a variety of frameworks like React, Vue, and Svelte.
We used Mitosis to build two key components: a direct template embed and a document signing embed. The direct template allows users to use a template as if it were an evergreen document—meaning that, when someone completes the template, a new document is automatically generated. This is the use case we expect most users to adopt for embedding. For more advanced workflows, we also offer a document signing embed, which can handle multi-recipient workflows and other complex scenarios intended for use in deeper, rich integrations.
Mitosis allowed us to quickly target several popular frameworks, including [React](https://www.npmjs.com/package/@documenso/embed-react), [Preact](https://www.npmjs.com/package/@documenso/embed-preact), [Vue](https://www.npmjs.com/package/@documenso/embed-vue), [Svelte](https://www.npmjs.com/package/@documenso/embed-svelte), and [SolidJS](https://www.npmjs.com/package/@documenso/embed-solid).
I had also hoped to include Angular, but while Mitosis makes it really easy to transpile component, we still have to take care of bundling and packaging the resulting component ourselves. While the above frameworks can all be bundled using Vite.js, Angular still has it's own set of tooling that we would need to learn and use. Given this constraint we opted to put Angular on hold for now while we wait for the newer Vite.js support to mature.
### Challenges and Lessons with Mitosis and more
While our experience with Mitosis was largely positive, there were some challenges along the way. For instance, certain state properties with the same names as props caused issues during the transpilation process, leading to type errors and unexpected transpilation results with some targets.
This was also a challenge since our initial implementation of the two components had some minor separation of concerns which also resulted in some transpilation issues with some targets. We addressed this by removing the separation of concerns for now since it was mostly for show rather than out of necessity.
On top of that, packaging and publishing the embeds posed its own set of challenges, particularly given the growing complexity of JavaScript package management. Tools like [Publint](https://www.npmjs.com/package/publint) helped streamline the process by ensuring we followed best practices for both CommonJS and ESM formats.
### To the Future, The Documenso Platform
With the embedding feature now in place, we're excited to continue expanding Documenso's capabilities. Embeds are just the beginning of what we're calling the Documenso platform. Through our user research, we've learned that while many businesses appreciate having a flexible e-signature solution, they're even more interested in using our tools to build signing functionality directly into their own apps—without worrying about the technical complexities of compliance and security that come with e-signing.
Over the coming months, we'll be working on enhancing our API, strengthening integrations with tools like Zapier, and improving our webhook system. Our goal is to give users the ability to embed e-signatures and document management wherever they need it, whether that's through self-hosting or by using Documenso as a platform. We can't wait to see how our users and self-hosters leverage these new capabilities!
### Ready to Get Started?
If you're ready to embed document signing into your own app or website, check out our [Embedding Documentation](https://docs.documenso.com/developers/embedding?utm_source=blog&utm_campaign=introducing-embedding) to see how easy it is to get started. You'll find everything you need to get started today!
<video
src="/blog/introducing-embedding/embedding-demo.mp4"
className="aspect-video w-full"
autoPlay
loop
controls
/>
We're always here to help! If you have questions or need support, join our [Discord](https://documen.so/discord) or [book a demo](https://documen.so/book-a-demo). We'd love to hear how you're using Documenso or wanting to use Documenso to enhance your workflow.
Stay tuned for more updates as we continue to evolve the Documenso platform and make it even easier to bring document signing into your workflows.

View File

@@ -8,6 +8,80 @@ Check out what's new in the latest version and read our thoughts on it. For more
---
# Documenso v1.7.0: Embedded Signing, Copy and Paste, and More
We're thrilled to announce the release of Documenso v1.7.0, packed with exciting new features and improvements that enhance document signing flexibility, user experience, and global accessibility.
We're excited to see what you'll create with this release and we'd love to hear your feedback. Let's dive into the highlights:
## 🌟 Key Features
### Embedded Signing Experience
Take your document signing to the next level with our new embedded signing feature. Now you can seamlessly integrate Documenso's signing process directly into your own website or application, providing a smooth, branded experience for your users.
<video
src="/blog/introducing-embedding/embedding-demo.mp4"
className="aspect-video w-full"
controls
/>
Check out our [Embedding documentation](https://docs.documenso.com/developers/embedding) to learn more about how to get started.
### Copy and Paste Fields
Streamline your document preparation with our new copy and paste functionality for fields. This feature allows you to quickly duplicate fields across your document, saving time and ensuring consistency in your templates.
### Customizable Signature Colors
Recipients can now select a signature color from our list of available colors, supporting workflows where specific colors are required for each recipient, location, or document.
### Enhanced Internationalization (i18n)
Following on from our last release we've now expanded our i18n support to the main web application. We haven't yet added support for any additional languages but that will be coming quickly now that we have completed the hard work of wrapping all of our content in our new i18n system.
These enhancements make Documenso more accessible to users worldwide.
## 🔧 Other Improvements
- **API Enhancements**:
- New endpoint to prefill fields via API
- Updated createFields API endpoint for more flexibility
- Automatically set public profile URL for OIDC users
- **Security and Performance**:
- Document sealing moved to a background job for improved performance
- Disable 2FA with backup codes for enhanced account recovery options
- Extended lifespan for invites and confirmations
- **User Experience**:
- Updated email templates to reflect team-specific information
- Fixed issues with dialog closing on page refresh
- Improved field editing in document templates
- **Other Items**:
- Added Elestio as a one-click deploy option
- Updated README for manual self-hosting
- New environment variable for internal webapp URL configuration
## 📚 New Content
- [Advanced fields article to help you make the most of Documenso's capabilities](/blog/introducing-advanced-signing-fields)
- [Embedding blog post to guide you through how we implemented embedding](/blog/introducing-embedding)
## 👏 Community Contributions
A big thank you to our vibrant community! This release includes contributions from several new contributors, further enriching Documenso's capabilities.
We're excited to see how you'll use these new features to streamline your document workflows. As always, we appreciate your feedback and support in making Documenso the best open-source document signing solution available.
Enjoy exploring v1.7.0!
---
# Documenso v1.6.1: Internationalization, Enhanced OIDC, and More
We're excited to announce the release of Documenso v1.6.1, which brings several improvements to enhance your document signing experience. Here are the key updates:

View File

@@ -1,6 +1,6 @@
{
"name": "@documenso/marketing",
"version": "1.7.0-rc.4",
"version": "1.7.1-rc.0",
"private": true,
"license": "AGPL-3.0",
"scripts": {

View File

@@ -2,7 +2,8 @@ declare namespace NodeJS {
export interface ProcessEnv {
NEXT_PUBLIC_WEBAPP_URL?: string;
NEXT_PUBLIC_MARKETING_URL?: string;
NEXT_PRIVATE_INTERNAL_WEBAPP_URL?:string;
NEXT_PRIVATE_DATABASE_URL: string;
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID: string;

View File

@@ -1,7 +1,6 @@
import { Suspense } from 'react';
import { Caveat, Inter } from 'next/font/google';
import { cookies, headers } from 'next/headers';
import { AxiomWebVitals } from 'next-axiom';
import { PublicEnvScript } from 'next-runtime-env';
@@ -10,8 +9,6 @@ import { FeatureFlagProvider } from '@documenso/lib/client-only/providers/featur
import { I18nClientProvider } from '@documenso/lib/client-only/providers/i18n.client';
import { setupI18nSSR } from '@documenso/lib/client-only/providers/i18n.server';
import { NEXT_PUBLIC_MARKETING_URL } from '@documenso/lib/constants/app';
import type { SUPPORTED_LANGUAGE_CODES } from '@documenso/lib/constants/i18n';
import { ZSupportedLanguageCodeSchema } from '@documenso/lib/constants/i18n';
import { getAllAnonymousFlags } from '@documenso/lib/universal/get-feature-flag';
import { TrpcProvider } from '@documenso/trpc/react';
import { cn } from '@documenso/ui/lib/utils';
@@ -59,25 +56,7 @@ export function generateMetadata() {
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const flags = await getAllAnonymousFlags();
let overrideLang: (typeof SUPPORTED_LANGUAGE_CODES)[number] | undefined;
// Should be safe to remove when we upgrade NextJS.
// https://github.com/vercel/next.js/pull/65008
// Currently if the middleware sets the cookie, it's not accessible in the cookies
// during the same render.
// So we go the roundabout way of checking the header for the set-cookie value.
if (!cookies().get('i18n')) {
const setCookieValue = headers().get('set-cookie');
const i18nCookie = setCookieValue?.split(';').find((cookie) => cookie.startsWith('i18n='));
if (i18nCookie) {
const i18n = i18nCookie.split('=')[1];
overrideLang = ZSupportedLanguageCodeSchema.parse(i18n);
}
}
const { lang, i18n } = setupI18nSSR(overrideLang);
const { lang, locales, i18n } = setupI18nSSR();
return (
<html
@@ -105,7 +84,10 @@ export default async function RootLayout({ children }: { children: React.ReactNo
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<PlausibleProvider>
<TrpcProvider>
<I18nClientProvider initialLocale={lang} initialMessages={i18n.messages}>
<I18nClientProvider
initialLocaleData={{ lang, locales }}
initialMessages={i18n.messages}
>
{children}
</I18nClientProvider>
</TrpcProvider>

View File

@@ -2,10 +2,10 @@ import { cookies } from 'next/headers';
import type { NextRequest } from 'next/server';
import { NextResponse } from 'next/server';
import { extractSupportedLanguage } from '@documenso/lib/utils/i18n';
import { extractLocaleData } from '@documenso/lib/utils/i18n';
export default function middleware(req: NextRequest) {
const lang = extractSupportedLanguage({
const { lang } = extractLocaleData({
headers: req.headers,
cookies: cookies(),
});

View File

@@ -1,6 +1,6 @@
{
"name": "@documenso/web",
"version": "1.7.0-rc.4",
"version": "1.7.1-rc.0",
"private": true,
"license": "AGPL-3.0",
"scripts": {

View File

@@ -2,6 +2,7 @@ declare namespace NodeJS {
export interface ProcessEnv {
NEXT_PUBLIC_WEBAPP_URL?: string;
NEXT_PUBLIC_MARKETING_URL?: string;
NEXT_PRIVATE_INTERNAL_WEBAPP_URL?:string;
NEXT_PRIVATE_DATABASE_URL: string;

View File

@@ -12,7 +12,6 @@ import {
import { Badge } from '@documenso/ui/primitives/badge';
import { DocumentStatus } from '~/components/formatter/document-status';
import { LocaleDate } from '~/components/formatter/locale-date';
import { AdminActions } from './admin-actions';
import { RecipientItem } from './recipient-item';
@@ -25,7 +24,7 @@ type AdminDocumentDetailsPageProps = {
};
export default async function AdminDocumentDetailsPage({ params }: AdminDocumentDetailsPageProps) {
setupI18nSSR();
const { i18n } = setupI18nSSR();
const document = await getEntireDocument({ id: Number(params.id) });
@@ -46,12 +45,11 @@ export default async function AdminDocumentDetailsPage({ params }: AdminDocument
<div className="text-muted-foreground mt-4 text-sm">
<div>
<Trans>Created on</Trans>:{' '}
<LocaleDate date={document.createdAt} format={DateTime.DATETIME_MED} />
<Trans>Created on</Trans>: {i18n.date(document.createdAt, DateTime.DATETIME_MED)}
</div>
<div>
<Trans>Last updated at</Trans>:{' '}
<LocaleDate date={document.updatedAt} format={DateTime.DATETIME_MED} />
<Trans>Last updated at</Trans>: {i18n.date(document.updatedAt, DateTime.DATETIME_MED)}
</div>
</div>

View File

@@ -21,12 +21,11 @@ import { Input } from '@documenso/ui/primitives/input';
import { Tooltip, TooltipContent, TooltipTrigger } from '@documenso/ui/primitives/tooltip';
import { DocumentStatus } from '~/components/formatter/document-status';
import { LocaleDate } from '~/components/formatter/locale-date';
// export type AdminDocumentResultsProps = {};
export const AdminDocumentResults = () => {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const searchParams = useSearchParams();
@@ -62,7 +61,7 @@ export const AdminDocumentResults = () => {
{
header: _(msg`Created`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt),
},
{
header: _(msg`Title`),
@@ -122,7 +121,7 @@ export const AdminDocumentResults = () => {
{
header: 'Last updated',
accessorKey: 'updatedAt',
cell: ({ row }) => <LocaleDate date={row.original.updatedAt} />,
cell: ({ row }) => i18n.date(row.original.updatedAt),
},
] satisfies DataTableColumnDef<(typeof results)['data'][number]>[];
}, []);

View File

@@ -7,7 +7,6 @@ import { useLingui } from '@lingui/react';
import { DateTime } from 'luxon';
import { useIsMounted } from '@documenso/lib/client-only/hooks/use-is-mounted';
import { useLocale } from '@documenso/lib/client-only/providers/locale';
import type { Document, Recipient, User } from '@documenso/prisma/client';
export type DocumentPageViewInformationProps = {
@@ -24,21 +23,9 @@ export const DocumentPageViewInformation = ({
}: DocumentPageViewInformationProps) => {
const isMounted = useIsMounted();
const { locale } = useLocale();
const { _ } = useLingui();
const { _, i18n } = useLingui();
const documentInformation = useMemo(() => {
let createdValue = DateTime.fromJSDate(document.createdAt).toFormat('MMMM d, yyyy');
let lastModifiedValue = DateTime.fromJSDate(document.updatedAt).toRelative();
if (!isMounted) {
createdValue = DateTime.fromJSDate(document.createdAt)
.setLocale(locale)
.toFormat('MMMM d, yyyy');
lastModifiedValue = DateTime.fromJSDate(document.updatedAt).setLocale(locale).toRelative();
}
return [
{
description: msg`Uploaded by`,
@@ -46,15 +33,19 @@ export const DocumentPageViewInformation = ({
},
{
description: msg`Created`,
value: createdValue,
value: DateTime.fromJSDate(document.createdAt)
.setLocale(i18n.locales?.[0] || i18n.locale)
.toFormat('MMMM d, yyyy'),
},
{
description: msg`Last modified`,
value: lastModifiedValue,
value: DateTime.fromJSDate(document.updatedAt)
.setLocale(i18n.locales?.[0] || i18n.locale)
.toRelative(),
},
];
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isMounted, document, locale, userId]);
}, [isMounted, document, userId]);
return (
<section className="dark:bg-background text-foreground border-border bg-widget flex flex-col rounded-xl border">

View File

@@ -20,8 +20,6 @@ import { DataTablePagination } from '@documenso/ui/primitives/data-table-paginat
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
import { LocaleDate } from '~/components/formatter/locale-date';
export type DocumentLogsDataTableProps = {
documentId: number;
};
@@ -32,7 +30,7 @@ const dateFormat: DateTimeFormatOptions = {
};
export const DocumentLogsDataTable = ({ documentId }: DocumentLogsDataTableProps) => {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const searchParams = useSearchParams();
const updateSearchParams = useUpdateSearchParams();
@@ -78,7 +76,7 @@ export const DocumentLogsDataTable = ({ documentId }: DocumentLogsDataTableProps
{
header: _(msg`Time`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate format={dateFormat} date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt, dateFormat),
},
{
header: _(msg`User`),
@@ -106,9 +104,7 @@ export const DocumentLogsDataTable = ({ documentId }: DocumentLogsDataTableProps
header: _(msg`Action`),
accessorKey: 'type',
cell: ({ row }) => (
<span>
{uppercaseFistLetter(formatDocumentAuditLogAction(row.original).description)}
</span>
<span>{uppercaseFistLetter(formatDocumentAuditLogAction(row.original).description)}</span>
),
},
{

View File

@@ -9,7 +9,6 @@ import { DateTime } from 'luxon';
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
import { getDocumentById } from '@documenso/lib/server-only/document/get-document-by-id';
import { getLocale } from '@documenso/lib/server-only/headers/get-locale';
import { getRecipientsForDocument } from '@documenso/lib/server-only/recipient/get-recipients-for-document';
import { formatDocumentsPath } from '@documenso/lib/utils/teams';
import type { Recipient, Team } from '@documenso/prisma/client';
@@ -32,9 +31,7 @@ export type DocumentLogsPageViewProps = {
};
export const DocumentLogsPageView = async ({ params, team }: DocumentLogsPageViewProps) => {
const { _ } = useLingui();
const locale = getLocale();
const { _, i18n } = useLingui();
const { id } = params;
@@ -87,13 +84,13 @@ export const DocumentLogsPageView = async ({ params, team }: DocumentLogsPageVie
{
description: msg`Date created`,
value: DateTime.fromJSDate(document.createdAt)
.setLocale(locale)
.setLocale(i18n.locales?.[0] || i18n.locale)
.toLocaleString(DateTime.DATETIME_MED_WITH_SECONDS),
},
{
description: msg`Last updated`,
value: DateTime.fromJSDate(document.updatedAt)
.setLocale(locale)
.setLocale(i18n.locales?.[0] || i18n.locale)
.toLocaleString(DateTime.DATETIME_MED_WITH_SECONDS),
},
{

View File

@@ -18,7 +18,6 @@ import { DataTablePagination } from '@documenso/ui/primitives/data-table-paginat
import { StackAvatarsWithTooltip } from '~/components/(dashboard)/avatar/stack-avatars-with-tooltip';
import { DocumentStatus } from '~/components/formatter/document-status';
import { LocaleDate } from '~/components/formatter/locale-date';
import { DataTableActionButton } from './data-table-action-button';
import { DataTableActionDropdown } from './data-table-action-dropdown';
@@ -41,8 +40,9 @@ export const DocumentsDataTable = ({
showSenderColumn,
team,
}: DocumentsDataTableProps) => {
const { _, i18n } = useLingui();
const { data: session } = useSession();
const { _ } = useLingui();
const [isPending, startTransition] = useTransition();
@@ -53,12 +53,8 @@ export const DocumentsDataTable = ({
{
header: _(msg`Created`),
accessorKey: 'createdAt',
cell: ({ row }) => (
<LocaleDate
date={row.original.createdAt}
format={{ ...DateTime.DATETIME_SHORT, hourCycle: 'h12' }}
/>
),
cell: ({ row }) =>
i18n.date(row.original.createdAt, { ...DateTime.DATETIME_SHORT, hourCycle: 'h12' }),
},
{
header: _(msg`Title`),
@@ -88,8 +84,7 @@ export const DocumentsDataTable = ({
{
header: _(msg`Actions`),
cell: ({ row }) =>
(!row.original.deletedAt ||
row.original.status === ExtendedDocumentStatus.COMPLETED) && (
(!row.original.deletedAt || row.original.status === ExtendedDocumentStatus.COMPLETED) && (
<div className="flex items-center gap-x-4">
<DataTableActionButton team={team} row={row.original} />
<DataTableActionDropdown team={team} row={row.original} />

View File

@@ -16,8 +16,6 @@ import { type Stripe } from '@documenso/lib/server-only/stripe';
import { getSubscriptionsByUserId } from '@documenso/lib/server-only/subscription/get-subscriptions-by-user-id';
import { SubscriptionStatus } from '@documenso/prisma/client';
import { LocaleDate } from '~/components/formatter/locale-date';
import { BillingPlans } from './billing-plans';
import { BillingPortalButton } from './billing-portal-button';
@@ -26,7 +24,7 @@ export const metadata: Metadata = {
};
export default async function BillingSettingsPage() {
setupI18nSSR();
const { i18n } = setupI18nSSR();
let { user } = await getRequiredServerComponentSession();
@@ -104,12 +102,12 @@ export default async function BillingSettingsPage() {
{subscription.cancelAtPeriodEnd ? (
<span>
end on{' '}
<LocaleDate className="font-semibold" date={subscription.periodEnd} />.
<span className="font-semibold">{i18n.date(subscription.periodEnd)}.</span>
</span>
) : (
<span>
automatically renew on{' '}
<LocaleDate className="font-semibold" date={subscription.periodEnd} />.
<span className="font-semibold">{i18n.date(subscription.periodEnd)}.</span>
</span>
)}
</span>

View File

@@ -20,15 +20,13 @@ import { DataTablePagination } from '@documenso/ui/primitives/data-table-paginat
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
import { LocaleDate } from '~/components/formatter/locale-date';
const dateFormat: DateTimeFormatOptions = {
...DateTime.DATETIME_SHORT,
hourCycle: 'h12',
};
export const UserSecurityActivityDataTable = () => {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const pathname = usePathname();
const router = useRouter();
@@ -71,7 +69,7 @@ export const UserSecurityActivityDataTable = () => {
{
header: _(msg`Date`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate format={dateFormat} date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt, dateFormat),
},
{
header: _(msg`Device`),

View File

@@ -7,11 +7,10 @@ import { getUserTokens } from '@documenso/lib/server-only/public-api/get-all-use
import { Button } from '@documenso/ui/primitives/button';
import DeleteTokenDialog from '~/components/(dashboard)/settings/token/delete-token-dialog';
import { LocaleDate } from '~/components/formatter/locale-date';
import { ApiTokenForm } from '~/components/forms/token';
export default async function ApiTokensPage() {
setupI18nSSR();
const { i18n } = setupI18nSSR();
const { user } = await getRequiredServerComponentSession();
@@ -65,13 +64,11 @@ export default async function ApiTokensPage() {
<h5 className="text-base">{token.name}</h5>
<p className="text-muted-foreground mt-2 text-xs">
<Trans>Created on</Trans>{' '}
<LocaleDate date={token.createdAt} format={DateTime.DATETIME_FULL} />
<Trans>Created on {i18n.date(token.createdAt, DateTime.DATETIME_FULL)}</Trans>
</p>
{token.expires ? (
<p className="text-muted-foreground mt-1 text-xs">
<Trans>Expires on</Trans>{' '}
<LocaleDate date={token.expires} format={DateTime.DATETIME_FULL} />
<Trans>Expires on {i18n.date(token.expires, DateTime.DATETIME_FULL)}</Trans>
</p>
) : (
<p className="text-muted-foreground mt-1 text-xs">

View File

@@ -16,10 +16,9 @@ import { Button } from '@documenso/ui/primitives/button';
import { SettingsHeader } from '~/components/(dashboard)/settings/layout/header';
import { CreateWebhookDialog } from '~/components/(dashboard)/settings/webhooks/create-webhook-dialog';
import { DeleteWebhookDialog } from '~/components/(dashboard)/settings/webhooks/delete-webhook-dialog';
import { LocaleDate } from '~/components/formatter/locale-date';
export default function WebhookPage() {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const { data: webhooks, isLoading } = trpc.webhook.getWebhooks.useQuery();
@@ -86,10 +85,7 @@ export default function WebhookPage() {
</p>
<p className="text-muted-foreground mt-2 text-xs">
<Trans>
Created on{' '}
<LocaleDate date={webhook.createdAt} format={DateTime.DATETIME_FULL} />
</Trans>
<Trans>Created on {i18n.date(webhook.createdAt, DateTime.DATETIME_FULL)}</Trans>
</p>
</div>

View File

@@ -17,7 +17,6 @@ import { DataTable } from '@documenso/ui/primitives/data-table';
import { DataTablePagination } from '@documenso/ui/primitives/data-table-pagination';
import { Tooltip, TooltipContent, TooltipTrigger } from '@documenso/ui/primitives/tooltip';
import { LocaleDate } from '~/components/formatter/locale-date';
import { TemplateType } from '~/components/formatter/template-type';
import { DataTableActionDropdown } from './data-table-action-dropdown';
@@ -48,7 +47,7 @@ export const TemplatesDataTable = ({
const updateSearchParams = useUpdateSearchParams();
const { _ } = useLingui();
const { _, i18n } = useLingui();
const { remaining } = useLimits();
const columns = useMemo(() => {
@@ -56,7 +55,7 @@ export const TemplatesDataTable = ({
{
header: _(msg`Created`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt),
},
{
header: _(msg`Title`),
@@ -81,8 +80,8 @@ export const TemplatesDataTable = ({
<p>
<Trans>
Public templates are connected to your public profile. Any modifications
to public templates will also appear in your public profile.
Public templates are connected to your public profile. Any modifications to
public templates will also appear in your public profile.
</Trans>
</p>
</li>
@@ -94,9 +93,9 @@ export const TemplatesDataTable = ({
<p>
<Trans>
Direct link templates contain one dynamic recipient placeholder. Anyone
with access to this link can sign the document, and it will then appear
on your documents page.
Direct link templates contain one dynamic recipient placeholder. Anyone with
access to this link can sign the document, and it will then appear on your
documents page.
</Trans>
</p>
</li>
@@ -109,8 +108,8 @@ export const TemplatesDataTable = ({
<p>
{teamId ? (
<Trans>
Team only templates are not linked anywhere and are visible only to
your team.
Team only templates are not linked anywhere and are visible only to your
team.
</Trans>
) : (
<Trans>Private templates can only be modified and viewed by you.</Trans>

View File

@@ -4,6 +4,7 @@ import { DateTime } from 'luxon';
import type { DateTimeFormatOptions } from 'luxon';
import { UAParser } from 'ua-parser-js';
import { APP_I18N_OPTIONS } from '@documenso/lib/constants/i18n';
import type { TDocumentAuditLog } from '@documenso/lib/types/document-audit-logs';
import { formatDocumentAuditLogAction } from '@documenso/lib/utils/document-audit-logs';
import {
@@ -15,8 +16,6 @@ import {
TableRow,
} from '@documenso/ui/primitives/table';
import { LocaleDate } from '~/components/formatter/locale-date';
export type AuditLogDataTableProps = {
logs: TDocumentAuditLog[];
};
@@ -49,7 +48,9 @@ export const AuditLogDataTable = ({ logs }: AuditLogDataTableProps) => {
{logs.map((log, i) => (
<TableRow className="break-inside-avoid" key={i}>
<TableCell>
<LocaleDate format={dateFormat} date={log.createdAt} />
{DateTime.fromJSDate(log.createdAt)
.setLocale(APP_I18N_OPTIONS.defaultLocale)
.toLocaleString(dateFormat)}
</TableCell>
<TableCell>

View File

@@ -2,7 +2,9 @@ import React from 'react';
import { redirect } from 'next/navigation';
import { setupI18nSSR } from '@documenso/lib/client-only/providers/i18n.server';
import { DateTime } from 'luxon';
import { APP_I18N_OPTIONS } from '@documenso/lib/constants/i18n';
import { RECIPIENT_ROLES_DESCRIPTION_ENG } from '@documenso/lib/constants/recipient-roles';
import { getEntireDocument } from '@documenso/lib/server-only/admin/get-entire-document';
import { decryptSecondaryData } from '@documenso/lib/server-only/crypto/decrypt';
@@ -10,7 +12,6 @@ import { findDocumentAuditLogs } from '@documenso/lib/server-only/document/find-
import { Card, CardContent } from '@documenso/ui/primitives/card';
import { Logo } from '~/components/branding/logo';
import { LocaleDate } from '~/components/formatter/locale-date';
import { AuditLogDataTable } from './data-table';
@@ -21,8 +22,6 @@ type AuditLogProps = {
};
export default async function AuditLog({ searchParams }: AuditLogProps) {
setupI18nSSR();
const { d } = searchParams;
if (typeof d !== 'string' || !d) {
@@ -89,7 +88,9 @@ export default async function AuditLog({ searchParams }: AuditLogProps) {
<span className="font-medium">Created At</span>
<span className="mt-1 block">
<LocaleDate date={document.createdAt} format="yyyy-mm-dd hh:mm:ss a (ZZZZ)" />
{DateTime.fromJSDate(document.createdAt)
.setLocale(APP_I18N_OPTIONS.defaultLocale)
.toFormat('yyyy-mm-dd hh:mm:ss a (ZZZZ)')}
</span>
</p>
@@ -97,7 +98,9 @@ export default async function AuditLog({ searchParams }: AuditLogProps) {
<span className="font-medium">Last Updated</span>
<span className="mt-1 block">
<LocaleDate date={document.updatedAt} format="yyyy-mm-dd hh:mm:ss a (ZZZZ)" />
{DateTime.fromJSDate(document.updatedAt)
.setLocale(APP_I18N_OPTIONS.defaultLocale)
.toFormat('yyyy-mm-dd hh:mm:ss a (ZZZZ)')}
</span>
</p>

View File

@@ -2,10 +2,11 @@ import React from 'react';
import { redirect } from 'next/navigation';
import { DateTime } from 'luxon';
import { match } from 'ts-pattern';
import { UAParser } from 'ua-parser-js';
import { setupI18nSSR } from '@documenso/lib/client-only/providers/i18n.server';
import { APP_I18N_OPTIONS } from '@documenso/lib/constants/i18n';
import {
RECIPIENT_ROLES_DESCRIPTION_ENG,
RECIPIENT_ROLE_SIGNING_REASONS_ENG,
@@ -27,7 +28,6 @@ import {
} from '@documenso/ui/primitives/table';
import { Logo } from '~/components/branding/logo';
import { LocaleDate } from '~/components/formatter/locale-date';
type SigningCertificateProps = {
searchParams: {
@@ -41,8 +41,6 @@ const FRIENDLY_SIGNING_REASONS = {
};
export default async function SigningCertificate({ searchParams }: SigningCertificateProps) {
setupI18nSSR();
const { d } = searchParams;
if (typeof d !== 'string' || !d) {
@@ -231,42 +229,33 @@ export default async function SigningCertificate({ searchParams }: SigningCertif
<p className="text-muted-foreground text-sm print:text-xs">
<span className="font-medium">Sent:</span>{' '}
<span className="inline-block">
{logs.EMAIL_SENT[0] ? (
<LocaleDate
date={logs.EMAIL_SENT[0].createdAt}
format="yyyy-MM-dd hh:mm:ss a (ZZZZ)"
/>
) : (
'Unknown'
)}
{logs.EMAIL_SENT[0]
? DateTime.fromJSDate(logs.EMAIL_SENT[0].createdAt)
.setLocale(APP_I18N_OPTIONS.defaultLocale)
.toFormat('yyyy-MM-dd hh:mm:ss a (ZZZZ)')
: 'Unknown'}
</span>
</p>
<p className="text-muted-foreground text-sm print:text-xs">
<span className="font-medium">Viewed:</span>{' '}
<span className="inline-block">
{logs.DOCUMENT_OPENED[0] ? (
<LocaleDate
date={logs.DOCUMENT_OPENED[0].createdAt}
format="yyyy-MM-dd hh:mm:ss a (ZZZZ)"
/>
) : (
'Unknown'
)}
{logs.DOCUMENT_OPENED[0]
? DateTime.fromJSDate(logs.DOCUMENT_OPENED[0].createdAt)
.setLocale(APP_I18N_OPTIONS.defaultLocale)
.toFormat('yyyy-MM-dd hh:mm:ss a (ZZZZ)')
: 'Unknown'}
</span>
</p>
<p className="text-muted-foreground text-sm print:text-xs">
<span className="font-medium">Signed:</span>{' '}
<span className="inline-block">
{logs.DOCUMENT_RECIPIENT_COMPLETED[0] ? (
<LocaleDate
date={logs.DOCUMENT_RECIPIENT_COMPLETED[0].createdAt}
format="yyyy-MM-dd hh:mm:ss a (ZZZZ)"
/>
) : (
'Unknown'
)}
{logs.DOCUMENT_RECIPIENT_COMPLETED[0]
? DateTime.fromJSDate(logs.DOCUMENT_RECIPIENT_COMPLETED[0].createdAt)
.setLocale(APP_I18N_OPTIONS.defaultLocale)
.toFormat('yyyy-MM-dd hh:mm:ss a (ZZZZ)')
: 'Unknown'}
</span>
</p>

View File

@@ -127,7 +127,7 @@ export const DropdownField = ({
await removeSignedFieldWithToken(payload);
}
setLocalChoice(parsedFieldMeta.defaultValue ?? '');
setLocalChoice('');
startTransition(() => router.refresh());
} catch (err) {
console.error(err);
@@ -179,7 +179,7 @@ export const DropdownField = ({
{!field.inserted && (
<p className="group-hover:text-primary text-muted-foreground flex flex-col items-center justify-center duration-200">
<Select value={parsedFieldMeta.defaultValue} onValueChange={handleSelectItem}>
<Select value={localChoice} onValueChange={handleSelectItem}>
<SelectTrigger
className={cn(
'text-muted-foreground z-10 h-full w-full border-none ring-0 focus:ring-0',
@@ -189,7 +189,7 @@ export const DropdownField = ({
},
)}
>
<SelectValue placeholder={`-- ${_(msg`Select`)} --`} />
<SelectValue placeholder={`${_(msg`Select`)}`} />
</SelectTrigger>
<SelectContent className="w-full ring-0 focus:ring-0" position="popper">
{parsedFieldMeta?.values?.map((item, index) => (

View File

@@ -12,7 +12,6 @@ import { getTeamByUrl } from '@documenso/lib/server-only/team/get-team';
import { Button } from '@documenso/ui/primitives/button';
import DeleteTokenDialog from '~/components/(dashboard)/settings/token/delete-token-dialog';
import { LocaleDate } from '~/components/formatter/locale-date';
import { ApiTokenForm } from '~/components/forms/token';
type ApiTokensPageProps = {
@@ -22,7 +21,7 @@ type ApiTokensPageProps = {
};
export default async function ApiTokensPage({ params }: ApiTokensPageProps) {
setupI18nSSR();
const { i18n } = setupI18nSSR();
const { teamUrl } = params;
@@ -98,13 +97,17 @@ export default async function ApiTokensPage({ params }: ApiTokensPageProps) {
<h5 className="text-base">{token.name}</h5>
<p className="text-muted-foreground mt-2 text-xs">
<Trans>Created on</Trans>{' '}
<LocaleDate date={token.createdAt} format={DateTime.DATETIME_FULL} />
<Trans>
Created on
{i18n.date(token.createdAt, DateTime.DATETIME_FULL)}
</Trans>
</p>
{token.expires ? (
<p className="text-muted-foreground mt-1 text-xs">
<Trans>Expires on</Trans>{' '}
<LocaleDate date={token.expires} format={DateTime.DATETIME_FULL} />
<Trans>
Expires on
{i18n.date(token.expires, DateTime.DATETIME_FULL)}
</Trans>
</p>
) : (
<p className="text-muted-foreground mt-1 text-xs">

View File

@@ -16,11 +16,10 @@ import { Button } from '@documenso/ui/primitives/button';
import { SettingsHeader } from '~/components/(dashboard)/settings/layout/header';
import { CreateWebhookDialog } from '~/components/(dashboard)/settings/webhooks/create-webhook-dialog';
import { DeleteWebhookDialog } from '~/components/(dashboard)/settings/webhooks/delete-webhook-dialog';
import { LocaleDate } from '~/components/formatter/locale-date';
import { useCurrentTeam } from '~/providers/team';
export default function WebhookPage() {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const team = useCurrentTeam();
@@ -91,10 +90,7 @@ export default function WebhookPage() {
</p>
<p className="text-muted-foreground mt-2 text-xs">
<Trans>
Created on{' '}
<LocaleDate date={webhook.createdAt} format={DateTime.DATETIME_FULL} />
</Trans>
<Trans>Created on {i18n.date(webhook.createdAt, DateTime.DATETIME_FULL)}</Trans>
</p>
</div>

View File

@@ -1,7 +1,6 @@
import { Suspense } from 'react';
import { Caveat, Inter } from 'next/font/google';
import { cookies, headers } from 'next/headers';
import { AxiomWebVitals } from 'next-axiom';
import { PublicEnvScript } from 'next-runtime-env';
@@ -9,12 +8,8 @@ import { PublicEnvScript } from 'next-runtime-env';
import { FeatureFlagProvider } from '@documenso/lib/client-only/providers/feature-flag';
import { I18nClientProvider } from '@documenso/lib/client-only/providers/i18n.client';
import { setupI18nSSR } from '@documenso/lib/client-only/providers/i18n.server';
import { LocaleProvider } from '@documenso/lib/client-only/providers/locale';
import { IS_APP_WEB_I18N_ENABLED, NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app';
import type { SUPPORTED_LANGUAGE_CODES } from '@documenso/lib/constants/i18n';
import { ZSupportedLanguageCodeSchema } from '@documenso/lib/constants/i18n';
import { getServerComponentAllFlags } from '@documenso/lib/server-only/feature-flags/get-server-component-feature-flag';
import { getLocale } from '@documenso/lib/server-only/headers/get-locale';
import { TrpcProvider } from '@documenso/trpc/react';
import { cn } from '@documenso/ui/lib/utils';
import { Toaster } from '@documenso/ui/primitives/toaster';
@@ -61,32 +56,7 @@ export function generateMetadata() {
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const flags = await getServerComponentAllFlags();
const locale = getLocale();
let overrideLang: (typeof SUPPORTED_LANGUAGE_CODES)[number] | undefined;
// Should be safe to remove when we upgrade NextJS.
// https://github.com/vercel/next.js/pull/65008
// Currently if the middleware sets the cookie, it's not accessible in the cookies
// during the same render.
// So we go the roundabout way of checking the header for the set-cookie value.
if (!cookies().get('i18n')) {
const setCookieValue = headers().get('set-cookie');
const i18nCookie = setCookieValue?.split(';').find((cookie) => cookie.startsWith('i18n='));
if (i18nCookie) {
const i18n = i18nCookie.split('=')[1];
overrideLang = ZSupportedLanguageCodeSchema.parse(i18n);
}
}
// Disable i18n for now until we get translations.
if (!IS_APP_WEB_I18N_ENABLED) {
overrideLang = 'en';
}
const { lang, i18n } = setupI18nSSR(overrideLang);
const { i18n, lang, locales } = setupI18nSSR();
return (
<html
@@ -110,21 +80,22 @@ export default async function RootLayout({ children }: { children: React.ReactNo
</Suspense>
<body>
<LocaleProvider locale={locale}>
<FeatureFlagProvider initialFlags={flags}>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<TooltipProvider>
<TrpcProvider>
<I18nClientProvider initialLocale={lang} initialMessages={i18n.messages}>
{children}
</I18nClientProvider>
</TrpcProvider>
</TooltipProvider>
</ThemeProvider>
<FeatureFlagProvider initialFlags={flags}>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<TooltipProvider>
<TrpcProvider>
<I18nClientProvider
initialLocaleData={{ lang, locales }}
initialMessages={i18n.messages}
>
{children}
</I18nClientProvider>
</TrpcProvider>
</TooltipProvider>
</ThemeProvider>
<Toaster />
</FeatureFlagProvider>
</LocaleProvider>
<Toaster />
</FeatureFlagProvider>
</body>
</html>
);

View File

@@ -22,12 +22,10 @@ import { DataTablePagination } from '@documenso/ui/primitives/data-table-paginat
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
import { LocaleDate } from '~/components/formatter/locale-date';
import { LeaveTeamDialog } from '../dialogs/leave-team-dialog';
export const CurrentUserTeamsDataTable = () => {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const searchParams = useSearchParams();
const updateSearchParams = useUpdateSearchParams();
@@ -91,7 +89,7 @@ export const CurrentUserTeamsDataTable = () => {
{
header: _(msg`Member Since`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt),
},
{
id: 'actions',

View File

@@ -18,13 +18,11 @@ import { DataTablePagination } from '@documenso/ui/primitives/data-table-paginat
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
import { LocaleDate } from '~/components/formatter/locale-date';
import { CreateTeamCheckoutDialog } from '../dialogs/create-team-checkout-dialog';
import { PendingUserTeamsDataTableActions } from './pending-user-teams-data-table-actions';
export const PendingUserTeamsDataTable = () => {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const searchParams = useSearchParams();
const updateSearchParams = useUpdateSearchParams();
@@ -79,7 +77,7 @@ export const PendingUserTeamsDataTable = () => {
{
header: _(msg`Created on`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt),
},
{
id: 'actions',

View File

@@ -27,8 +27,6 @@ import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
import { useToast } from '@documenso/ui/primitives/use-toast';
import { LocaleDate } from '~/components/formatter/locale-date';
export type TeamMemberInvitesDataTableProps = {
teamId: number;
};
@@ -37,7 +35,7 @@ export const TeamMemberInvitesDataTable = ({ teamId }: TeamMemberInvitesDataTabl
const searchParams = useSearchParams();
const updateSearchParams = useUpdateSearchParams();
const { _ } = useLingui();
const { _, i18n } = useLingui();
const { toast } = useToast();
const parsedSearchParams = ZBaseTableSearchParamsSchema.parse(
@@ -129,7 +127,7 @@ export const TeamMemberInvitesDataTable = ({ teamId }: TeamMemberInvitesDataTabl
{
header: _(msg`Invited At`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt),
},
{
header: _(msg`Actions`),

View File

@@ -29,8 +29,6 @@ import {
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
import { LocaleDate } from '~/components/formatter/locale-date';
import { DeleteTeamMemberDialog } from '../dialogs/delete-team-member-dialog';
import { UpdateTeamMemberDialog } from '../dialogs/update-team-member-dialog';
@@ -47,7 +45,7 @@ export const TeamMembersDataTable = ({
teamId,
teamName,
}: TeamMembersDataTableProps) => {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const searchParams = useSearchParams();
const updateSearchParams = useUpdateSearchParams();
@@ -114,7 +112,7 @@ export const TeamMembersDataTable = ({
{
header: _(msg`Member Since`),
accessorKey: 'createdAt',
cell: ({ row }) => <LocaleDate date={row.original.createdAt} />,
cell: ({ row }) => i18n.date(row.original.createdAt),
},
{
header: _(msg`Actions`),

View File

@@ -3,7 +3,9 @@
import { useMemo, useState } from 'react';
import { Trans } from '@lingui/macro';
import { useLingui } from '@lingui/react';
import { ArrowRightIcon, Loader } from 'lucide-react';
import { DateTime } from 'luxon';
import { match } from 'ts-pattern';
import { UAParser } from 'ua-parser-js';
@@ -18,8 +20,6 @@ import { Badge } from '@documenso/ui/primitives/badge';
import { Button } from '@documenso/ui/primitives/button';
import { Sheet, SheetContent, SheetTrigger } from '@documenso/ui/primitives/sheet';
import { LocaleDate } from '~/components/formatter/locale-date';
import { DocumentHistorySheetChanges } from './document-history-sheet-changes';
export type DocumentHistorySheetProps = {
@@ -37,6 +37,8 @@ export const DocumentHistorySheet = ({
onMenuOpenChange,
children,
}: DocumentHistorySheetProps) => {
const { i18n } = useLingui();
const [isUserDetailsVisible, setIsUserDetailsVisible] = useState(false);
const {
@@ -153,7 +155,9 @@ export const DocumentHistorySheet = ({
{formatDocumentAuditLogActionString(auditLog, userId)}
</p>
<p className="text-foreground/50 text-xs">
<LocaleDate date={auditLog.createdAt} format="d MMM, yyyy HH:MM a" />
{DateTime.fromJSDate(auditLog.createdAt)
.setLocale(i18n.locales?.[0] || i18n.locale)
.toFormat('d MMM, yyyy HH:MM a')}
</p>
</div>
</div>

View File

@@ -1,49 +0,0 @@
'use client';
import type { HTMLAttributes } from 'react';
import { useCallback, useEffect, useState } from 'react';
import type { DateTimeFormatOptions } from 'luxon';
import { DateTime } from 'luxon';
import { useLocale } from '@documenso/lib/client-only/providers/locale';
export type LocaleDateProps = HTMLAttributes<HTMLSpanElement> & {
date: string | number | Date;
format?: DateTimeFormatOptions | string;
};
/**
* Formats the date based on the user locale.
*
* Will use the estimated locale from the user headers on SSR, then will use
* the client browser locale once mounted.
*/
export const LocaleDate = ({ className, date, format, ...props }: LocaleDateProps) => {
const { locale } = useLocale();
const formatDateTime = useCallback(
(date: DateTime) => {
if (typeof format === 'string') {
return date.toFormat(format);
}
return date.toLocaleString(format);
},
[format],
);
const [localeDate, setLocaleDate] = useState(() =>
formatDateTime(DateTime.fromJSDate(new Date(date)).setLocale(locale)),
);
useEffect(() => {
setLocaleDate(formatDateTime(DateTime.fromJSDate(new Date(date))));
}, [date, format, formatDateTime]);
return (
<span className={className} {...props}>
{localeDate}
</span>
);
};

View File

@@ -52,8 +52,6 @@ import { useToast } from '@documenso/ui/primitives/use-toast';
import { useOptionalCurrentTeam } from '~/providers/team';
import { LocaleDate } from '../formatter/locale-date';
export type ManagePublicTemplateDialogProps = {
directTemplates: (Template & {
directLink: Pick<TemplateDirectLink, 'token' | 'enabled'>;
@@ -93,7 +91,7 @@ export const ManagePublicTemplateDialog = ({
onIsOpenChange,
...props
}: ManagePublicTemplateDialogProps) => {
const { _ } = useLingui();
const { _, i18n } = useLingui();
const { toast } = useToast();
const [open, onOpenChange] = useState(isOpen);
@@ -300,7 +298,7 @@ export const ManagePublicTemplateDialog = ({
</TableCell>
<TableCell className="text-muted-foreground text-sm">
<LocaleDate date={row.createdAt} />
{i18n.date(row.createdAt)}
</TableCell>
<TableCell>

View File

@@ -5,7 +5,7 @@ import { NextResponse } from 'next/server';
import { getToken } from 'next-auth/jwt';
import { TEAM_URL_ROOT_REGEX } from '@documenso/lib/constants/teams';
import { extractSupportedLanguage } from '@documenso/lib/utils/i18n';
import { extractLocaleData } from '@documenso/lib/utils/i18n';
import { formatDocumentsPath } from '@documenso/lib/utils/teams';
async function middleware(req: NextRequest): Promise<NextResponse> {
@@ -96,7 +96,7 @@ async function middleware(req: NextRequest): Promise<NextResponse> {
export default async function middlewareWrapper(req: NextRequest) {
const response = await middleware(req);
const lang = extractSupportedLanguage({
const { lang } = extractLocaleData({
headers: req.headers,
cookies: cookies(),
});

View File

@@ -74,6 +74,7 @@ docker run -d \
-e NEXT_PRIVATE_ENCRYPTION_KEY="<your-next-private-encryption-key>"
-e NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="<your-next-private-encryption-secondary-key>"
-e NEXT_PUBLIC_WEBAPP_URL="<your-next-public-webapp-url>"
-e NEXT_PRIVATE_INTERNAL_WEBAPP_URL="http://localhost:3000"
-e NEXT_PRIVATE_DATABASE_URL="<your-next-private-database-url>"
-e NEXT_PRIVATE_DIRECT_DATABASE_URL="<your-next-private-database-url>"
-e NEXT_PRIVATE_SMTP_TRANSPORT="<your-next-private-smtp-transport>"

View File

@@ -29,6 +29,7 @@ services:
- NEXT_PRIVATE_GOOGLE_CLIENT_ID=${NEXT_PRIVATE_GOOGLE_CLIENT_ID}
- NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=${NEXT_PRIVATE_GOOGLE_CLIENT_SECRET}
- NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL:?err}
- NEXT_PRIVATE_INTERNAL_WEBAPP_URL=${NEXT_PRIVATE_INTERNAL_WEBAPP_URL:-http://localhost:$PORT}
- NEXT_PUBLIC_MARKETING_URL=${NEXT_PUBLIC_MARKETING_URL:-https://documenso.com}
- NEXT_PRIVATE_DATABASE_URL=${NEXT_PRIVATE_DATABASE_URL:?err}
- NEXT_PRIVATE_DIRECT_DATABASE_URL=${NEXT_PRIVATE_DIRECT_DATABASE_URL:-${NEXT_PRIVATE_DATABASE_URL}}

8
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@documenso/root",
"version": "1.7.0-rc.4",
"version": "1.7.1-rc.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@documenso/root",
"version": "1.7.0-rc.4",
"version": "1.7.1-rc.0",
"workspaces": [
"apps/*",
"packages/*"
@@ -80,7 +80,7 @@
},
"apps/marketing": {
"name": "@documenso/marketing",
"version": "1.7.0-rc.4",
"version": "1.7.1-rc.0",
"license": "AGPL-3.0",
"dependencies": {
"@documenso/assets": "*",
@@ -424,7 +424,7 @@
},
"apps/web": {
"name": "@documenso/web",
"version": "1.7.0-rc.4",
"version": "1.7.1-rc.0",
"license": "AGPL-3.0",
"dependencies": {
"@documenso/api": "*",

View File

@@ -1,6 +1,6 @@
{
"private": true,
"version": "1.7.0-rc.4",
"version": "1.7.1-rc.0",
"scripts": {
"build": "turbo run build",
"build:web": "turbo run build --filter=@documenso/web",

View File

@@ -16,6 +16,7 @@ import { getDocumentById } from '@documenso/lib/server-only/document/get-documen
import { resendDocument } from '@documenso/lib/server-only/document/resend-document';
import { sendDocument } from '@documenso/lib/server-only/document/send-document';
import { updateDocument } from '@documenso/lib/server-only/document/update-document';
import { updateDocumentSettings } from '@documenso/lib/server-only/document/update-document-settings';
import { deleteField } from '@documenso/lib/server-only/field/delete-field';
import { getFieldById } from '@documenso/lib/server-only/field/get-field-by-id';
import { updateField } from '@documenso/lib/server-only/field/update-field';
@@ -295,6 +296,16 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
requestMetadata: extractNextApiRequestMetadata(args.req),
});
if (body.authOptions) {
await updateDocumentSettings({
documentId: document.id,
userId: user.id,
teamId: team?.id,
data: body.authOptions,
requestMetadata: extractNextApiRequestMetadata(args.req),
});
}
const recipients = await setRecipientsForDocument({
userId: user.id,
teamId: team?.id,
@@ -465,6 +476,16 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
});
}
if (body.authOptions) {
await updateDocumentSettings({
documentId: document.id,
userId: user.id,
teamId: team?.id,
data: body.authOptions,
requestMetadata: extractNextApiRequestMetadata(args.req),
});
}
return {
status: 200,
body: {
@@ -547,6 +568,16 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
});
}
if (body.authOptions) {
await updateDocumentSettings({
documentId: document.id,
userId: user.id,
teamId: team?.id,
data: body.authOptions,
requestMetadata: extractNextApiRequestMetadata(args.req),
});
}
return {
status: 200,
body: {
@@ -682,7 +713,7 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
createRecipient: authenticatedMiddleware(async (args, user, team) => {
const { id: documentId } = args.params;
const { name, email, role } = args.body;
const { name, email, role, authOptions } = args.body;
const document = await getDocumentById({
id: Number(documentId),
@@ -736,6 +767,7 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
email,
name,
role,
actionAuth: authOptions?.actionAuth ?? null,
},
],
requestMetadata: extractNextApiRequestMetadata(args.req),
@@ -767,7 +799,7 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
updateRecipient: authenticatedMiddleware(async (args, user, team) => {
const { id: documentId, recipientId } = args.params;
const { name, email, role } = args.body;
const { name, email, role, authOptions } = args.body;
const document = await getDocumentById({
id: Number(documentId),
@@ -801,6 +833,7 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
email,
name,
role,
actionAuth: authOptions?.actionAuth,
requestMetadata: extractNextApiRequestMetadata(args.req),
}).catch(() => null);

View File

@@ -5,6 +5,11 @@ import { DATE_FORMATS, DEFAULT_DOCUMENT_DATE_FORMAT } from '@documenso/lib/const
import '@documenso/lib/constants/time-zones';
import { DEFAULT_DOCUMENT_TIME_ZONE, TIME_ZONES } from '@documenso/lib/constants/time-zones';
import { ZUrlSchema } from '@documenso/lib/schemas/common';
import {
ZDocumentAccessAuthTypesSchema,
ZDocumentActionAuthTypesSchema,
ZRecipientActionAuthTypesSchema,
} from '@documenso/lib/types/document-auth';
import { ZFieldMetaSchema } from '@documenso/lib/types/field-meta';
import {
DocumentDataType,
@@ -120,6 +125,12 @@ export const ZCreateDocumentMutationSchema = z.object({
redirectUrl: z.string(),
})
.partial(),
authOptions: z
.object({
globalAccessAuth: ZDocumentAccessAuthTypesSchema.optional(),
globalActionAuth: ZDocumentActionAuthTypesSchema.optional(),
})
.optional(),
formValues: z.record(z.string(), z.union([z.string(), z.boolean(), z.number()])).optional(),
});
@@ -166,6 +177,12 @@ export const ZCreateDocumentFromTemplateMutationSchema = z.object({
})
.partial()
.optional(),
authOptions: z
.object({
globalAccessAuth: ZDocumentAccessAuthTypesSchema.optional(),
globalActionAuth: ZDocumentActionAuthTypesSchema.optional(),
})
.optional(),
formValues: z.record(z.string(), z.union([z.string(), z.boolean(), z.number()])).optional(),
});
@@ -223,6 +240,12 @@ export const ZGenerateDocumentFromTemplateMutationSchema = z.object({
})
.partial()
.optional(),
authOptions: z
.object({
globalAccessAuth: ZDocumentAccessAuthTypesSchema.optional(),
globalActionAuth: ZDocumentActionAuthTypesSchema.optional(),
})
.optional(),
formValues: z.record(z.string(), z.union([z.string(), z.boolean(), z.number()])).optional(),
});
@@ -254,6 +277,11 @@ export const ZCreateRecipientMutationSchema = z.object({
name: z.string().min(1),
email: z.string().email().min(1),
role: z.nativeEnum(RecipientRole).optional().default(RecipientRole.SIGNER),
authOptions: z
.object({
actionAuth: ZRecipientActionAuthTypesSchema.optional(),
})
.optional(),
});
/**

View File

@@ -5,19 +5,24 @@ import { useState } from 'react';
import { type Messages, setupI18n } from '@lingui/core';
import { I18nProvider } from '@lingui/react';
import type { I18nLocaleData } from '../../constants/i18n';
export function I18nClientProvider({
children,
initialLocale,
initialLocaleData,
initialMessages,
}: {
children: React.ReactNode;
initialLocale: string;
initialLocaleData: I18nLocaleData;
initialMessages: Messages;
}) {
const { lang, locales } = initialLocaleData;
const [i18n] = useState(() => {
return setupI18n({
locale: initialLocale,
messages: { [initialLocale]: initialMessages },
locale: lang,
locales: locales,
messages: { [lang]: initialMessages },
});
});

View File

@@ -1,26 +1,26 @@
import 'server-only';
import { cookies } from 'next/headers';
import { cookies, headers } from 'next/headers';
import type { I18n, Messages } from '@lingui/core';
import { setupI18n } from '@lingui/core';
import { setI18n } from '@lingui/react/server';
import { IS_APP_WEB, IS_APP_WEB_I18N_ENABLED } from '../../constants/app';
import { IS_APP_WEB } from '../../constants/app';
import { SUPPORTED_LANGUAGE_CODES } from '../../constants/i18n';
import { extractSupportedLanguage } from '../../utils/i18n';
import { extractLocaleData } from '../../utils/i18n';
type SupportedLocales = (typeof SUPPORTED_LANGUAGE_CODES)[number];
type SupportedLanguages = (typeof SUPPORTED_LANGUAGE_CODES)[number];
async function loadCatalog(locale: SupportedLocales): Promise<{
async function loadCatalog(lang: SupportedLanguages): Promise<{
[k: string]: Messages;
}> {
const { messages } = await import(
`../../translations/${locale}/${IS_APP_WEB ? 'web' : 'marketing'}.js`
`../../translations/${lang}/${IS_APP_WEB ? 'web' : 'marketing'}.js`
);
return {
[locale]: messages,
[lang]: messages,
};
}
@@ -31,18 +31,18 @@ export const allMessages = catalogs.reduce((acc, oneCatalog) => {
return { ...acc, ...oneCatalog };
}, {});
type AllI18nInstances = { [K in SupportedLocales]: I18n };
type AllI18nInstances = { [K in SupportedLanguages]: I18n };
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
export const allI18nInstances = SUPPORTED_LANGUAGE_CODES.reduce((acc, locale) => {
const messages = allMessages[locale] ?? {};
export const allI18nInstances = SUPPORTED_LANGUAGE_CODES.reduce((acc, lang) => {
const messages = allMessages[lang] ?? {};
const i18n = setupI18n({
locale,
messages: { [locale]: messages },
locale: lang,
messages: { [lang]: messages },
});
return { ...acc, [locale]: i18n };
return { ...acc, [lang]: i18n };
}, {}) as AllI18nInstances;
/**
@@ -50,24 +50,23 @@ export const allI18nInstances = SUPPORTED_LANGUAGE_CODES.reduce((acc, locale) =>
*
* https://lingui.dev/tutorials/react-rsc#pages-layouts-and-lingui
*/
export const setupI18nSSR = (overrideLang?: SupportedLocales) => {
let lang =
overrideLang ||
extractSupportedLanguage({
cookies: cookies(),
});
// Override web app to be English.
if (!IS_APP_WEB_I18N_ENABLED && IS_APP_WEB) {
lang = 'en';
}
export const setupI18nSSR = () => {
const { lang, locales } = extractLocaleData({
cookies: cookies(),
headers: headers(),
});
// Get and set a ready-made i18n instance for the given language.
const i18n = allI18nInstances[lang];
// Reactivate the i18n instance with the locale for date and number formatting.
i18n.activate(lang, locales);
setI18n(i18n);
return {
lang,
locales,
i18n,
};
};

View File

@@ -1,37 +0,0 @@
'use client';
import { createContext, useContext } from 'react';
export type LocaleContextValue = {
locale: string;
};
export const LocaleContext = createContext<LocaleContextValue | null>(null);
export const useLocale = () => {
const context = useContext(LocaleContext);
if (!context) {
throw new Error('useLocale must be used within a LocaleProvider');
}
return context;
};
export function LocaleProvider({
children,
locale,
}: {
children: React.ReactNode;
locale: string;
}) {
return (
<LocaleContext.Provider
value={{
locale: locale,
}}
>
{children}
</LocaleContext.Provider>
);
}

View File

@@ -1,15 +1,16 @@
import { env } from 'next-runtime-env';
export const IS_APP_WEB_I18N_ENABLED = false;
export const APP_DOCUMENT_UPLOAD_SIZE_LIMIT =
Number(process.env.NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT) || 50;
export const NEXT_PUBLIC_WEBAPP_URL = () => env('NEXT_PUBLIC_WEBAPP_URL');
export const NEXT_PUBLIC_MARKETING_URL = () => env('NEXT_PUBLIC_MARKETING_URL');
export const NEXT_PRIVATE_INTERNAL_WEBAPP_URL = process.env.NEXT_PRIVATE_INTERNAL_WEBAPP_URL ?? NEXT_PUBLIC_WEBAPP_URL();
export const IS_APP_MARKETING = process.env.NEXT_PUBLIC_PROJECT === 'marketing';
export const IS_APP_WEB = process.env.NEXT_PUBLIC_PROJECT === 'web';
export const IS_BILLING_ENABLED = () => env('NEXT_PUBLIC_FEATURE_BILLING_ENABLED') === 'true';
export const IS_APP_WEB_I18N_ENABLED = false;
export const APP_FOLDER = () => (IS_APP_MARKETING ? 'marketing' : 'web');

View File

@@ -6,9 +6,22 @@ export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).cat
export type SupportedLanguageCodes = (typeof SUPPORTED_LANGUAGE_CODES)[number];
export type I18nLocaleData = {
/**
* The supported language extracted from the locale.
*/
lang: SupportedLanguageCodes;
/**
* The preferred locales.
*/
locales: string[];
};
export const APP_I18N_OPTIONS = {
supportedLangs: SUPPORTED_LANGUAGE_CODES,
sourceLang: 'en',
defaultLocale: 'en-US',
} as const;
type SupportedLanguage = {

View File

@@ -6,7 +6,7 @@ import { json } from 'micro';
import { prisma } from '@documenso/prisma';
import { BackgroundJobStatus, Prisma } from '@documenso/prisma/client';
import { NEXT_PUBLIC_WEBAPP_URL } from '../../constants/app';
import { NEXT_PRIVATE_INTERNAL_WEBAPP_URL } from '../../constants/app';
import { sign } from '../../server-only/crypto/sign';
import { verify } from '../../server-only/crypto/verify';
import {
@@ -229,7 +229,7 @@ export class LocalJobProvider extends BaseJobProvider {
}) {
const { jobId, jobDefinitionId, data, isRetry } = options;
const endpoint = `${NEXT_PUBLIC_WEBAPP_URL()}/api/jobs/${jobDefinitionId}/${jobId}`;
const endpoint = `${NEXT_PRIVATE_INTERNAL_WEBAPP_URL}/api/jobs/${jobDefinitionId}/${jobId}`;
const signature = sign(data);
const headers: Record<string, string> = {

View File

@@ -5,7 +5,7 @@ import { getToken } from 'next-auth/jwt';
import { LOCAL_FEATURE_FLAGS } from '@documenso/lib/constants/feature-flags';
import PostHogServerClient from '@documenso/lib/server-only/feature-flags/get-post-hog-server-client';
import { NEXT_PUBLIC_MARKETING_URL, NEXT_PUBLIC_WEBAPP_URL } from '../../constants/app';
import { NEXT_PUBLIC_MARKETING_URL, NEXT_PUBLIC_WEBAPP_URL, NEXT_PRIVATE_INTERNAL_WEBAPP_URL } from '../../constants/app';
import { extractDistinctUserId, mapJwtToFlagProperties } from './get';
/**
@@ -46,6 +46,10 @@ export default async function handlerFeatureFlagAll(req: Request) {
if (origin.startsWith(NEXT_PUBLIC_MARKETING_URL() ?? 'http://localhost:3001')) {
res.headers.set('Access-Control-Allow-Origin', origin);
}
if (origin.startsWith(NEXT_PRIVATE_INTERNAL_WEBAPP_URL ?? 'http://localhost:3000')) {
res.headers.set('Access-Control-Allow-Origin', origin);
}
}
return res;

View File

@@ -7,7 +7,7 @@ import { getToken } from 'next-auth/jwt';
import { LOCAL_FEATURE_FLAGS, extractPostHogConfig } from '@documenso/lib/constants/feature-flags';
import PostHogServerClient from '@documenso/lib/server-only/feature-flags/get-post-hog-server-client';
import { NEXT_PUBLIC_MARKETING_URL, NEXT_PUBLIC_WEBAPP_URL } from '../../constants/app';
import { NEXT_PUBLIC_MARKETING_URL, NEXT_PUBLIC_WEBAPP_URL, NEXT_PRIVATE_INTERNAL_WEBAPP_URL } from '../../constants/app';
/**
* Evaluate a single feature flag based on the current user if possible.
@@ -67,6 +67,10 @@ export default async function handleFeatureFlagGet(req: Request) {
if (origin.startsWith(NEXT_PUBLIC_MARKETING_URL() ?? 'http://localhost:3001')) {
res.headers.set('Access-Control-Allow-Origin', origin);
}
if (origin.startsWith(NEXT_PRIVATE_INTERNAL_WEBAPP_URL ?? 'http://localhost:3000')) {
res.headers.set('Access-Control-Allow-Origin', origin);
}
}
return res;

View File

@@ -107,7 +107,10 @@ export const setFieldsForTemplate = async ({
}
}
if (field.type === FieldType.CHECKBOX && field.fieldMeta) {
if (field.type === FieldType.CHECKBOX) {
if (!field.fieldMeta) {
throw new Error('Checkbox field is missing required metadata');
}
const checkboxFieldParsedMeta = ZCheckboxFieldMeta.parse(field.fieldMeta);
const errors = validateCheckboxField(
checkboxFieldParsedMeta?.values?.map((item) => item.value) ?? [],
@@ -118,7 +121,10 @@ export const setFieldsForTemplate = async ({
}
}
if (field.type === FieldType.RADIO && field.fieldMeta) {
if (field.type === FieldType.RADIO) {
if (!field.fieldMeta) {
throw new Error('Radio field is missing required metadata');
}
const radioFieldParsedMeta = ZRadioFieldMeta.parse(field.fieldMeta);
const checkedRadioFieldValue = radioFieldParsedMeta.values?.find(
(option) => option.checked,
@@ -129,7 +135,10 @@ export const setFieldsForTemplate = async ({
}
}
if (field.type === FieldType.DROPDOWN && field.fieldMeta) {
if (field.type === FieldType.DROPDOWN) {
if (!field.fieldMeta) {
throw new Error('Dropdown field is missing required metadata');
}
const dropdownFieldParsedMeta = ZDropdownFieldMeta.parse(field.fieldMeta);
const errors = validateDropdownField(undefined, dropdownFieldParsedMeta);
if (errors.length > 0) {

View File

@@ -1,11 +0,0 @@
import { headers } from 'next/headers';
export const getLocale = () => {
const headerItems = headers();
const locales = headerItems.get('accept-language') ?? 'en-US';
const [locale] = locales.split(',');
return locale;
};

View File

@@ -1,9 +1,16 @@
import { isUserEnterprise } from '@documenso/ee/server-only/util/is-document-enterprise';
import { prisma } from '@documenso/prisma';
import type { RecipientRole, Team } from '@documenso/prisma/client';
import { AppError, AppErrorCode } from '../../errors/app-error';
import { DOCUMENT_AUDIT_LOG_TYPE } from '../../types/document-audit-logs';
import {
type TRecipientActionAuthTypes,
ZRecipientAuthOptionsSchema,
} from '../../types/document-auth';
import type { RequestMetadata } from '../../universal/extract-request-metadata';
import { createDocumentAuditLogData, diffRecipientChanges } from '../../utils/document-audit-logs';
import { createRecipientAuthOptions } from '../../utils/document-auth';
export type UpdateRecipientOptions = {
documentId: number;
@@ -11,6 +18,7 @@ export type UpdateRecipientOptions = {
email?: string;
name?: string;
role?: RecipientRole;
actionAuth?: TRecipientActionAuthTypes | null;
userId: number;
teamId?: number;
requestMetadata?: RequestMetadata;
@@ -22,6 +30,7 @@ export const updateRecipient = async ({
email,
name,
role,
actionAuth,
userId,
teamId,
requestMetadata,
@@ -48,6 +57,9 @@ export const updateRecipient = async ({
}),
},
},
include: {
Document: true,
},
});
let team: Team | null = null;
@@ -75,6 +87,22 @@ export const updateRecipient = async ({
throw new Error('Recipient not found');
}
if (actionAuth) {
const isDocumentEnterprise = await isUserEnterprise({
userId,
teamId,
});
if (!isDocumentEnterprise) {
throw new AppError(
AppErrorCode.UNAUTHORIZED,
'You do not have permission to set the action auth',
);
}
}
const recipientAuthOptions = ZRecipientAuthOptionsSchema.parse(recipient.authOptions);
const updatedRecipient = await prisma.$transaction(async (tx) => {
const persisted = await prisma.recipient.update({
where: {
@@ -84,6 +112,10 @@ export const updateRecipient = async ({
email: email?.toLowerCase() ?? recipient.email,
name: name ?? recipient.name,
role: role ?? recipient.role,
authOptions: createRecipientAuthOptions({
accessAuth: recipientAuthOptions.accessAuth,
actionAuth: actionAuth ?? null,
}),
},
});

View File

@@ -1,6 +1,6 @@
import type { WebhookTriggerEvents } from '@documenso/prisma/client';
import { NEXT_PUBLIC_WEBAPP_URL } from '../../../constants/app';
import { NEXT_PRIVATE_INTERNAL_WEBAPP_URL } from '../../../constants/app';
import { sign } from '../../crypto/sign';
import { getAllWebhooksByEventTrigger } from '../get-all-webhooks-by-event-trigger';
@@ -29,7 +29,7 @@ export const triggerWebhook = async ({ event, data, userId, teamId }: TriggerWeb
const signature = sign(body);
await Promise.race([
fetch(`${NEXT_PUBLIC_WEBAPP_URL()}/api/webhook/trigger`, {
fetch(`${NEXT_PRIVATE_INTERNAL_WEBAPP_URL}/api/webhook/trigger`, {
method: 'POST',
headers: {
'content-type': 'application/json',

View File

@@ -8,7 +8,7 @@ msgstr ""
"Language: de\n"
"Project-Id-Version: documenso-app\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-08-27 16:03\n"
"PO-Revision-Date: 2024-09-05 06:04\n"
"Last-Translator: \n"
"Language-Team: German\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -116,7 +116,7 @@ msgid "Advanced Options"
msgstr "Erweiterte Optionen"
#: packages/ui/primitives/document-flow/add-fields.tsx:510
#: packages/ui/primitives/template-flow/add-template-fields.tsx:370
#: packages/ui/primitives/template-flow/add-template-fields.tsx:402
msgid "Advanced settings"
msgstr "Erweiterte Einstellungen"
@@ -140,7 +140,15 @@ msgstr "Genehmiger"
msgid "Approving"
msgstr "Genehmigung"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:297
#: packages/ui/primitives/signature-pad/signature-pad.tsx:276
msgid "Black"
msgstr ""
#: packages/ui/primitives/signature-pad/signature-pad.tsx:290
msgid "Blue"
msgstr ""
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:287
#: packages/ui/primitives/document-flow/send-document-action-dialog.tsx:58
msgid "Cancel"
msgstr "Abbrechen"
@@ -167,7 +175,7 @@ msgid "Character Limit"
msgstr "Zeichenbeschränkung"
#: packages/ui/primitives/document-flow/add-fields.tsx:932
#: packages/ui/primitives/template-flow/add-template-fields.tsx:756
#: packages/ui/primitives/template-flow/add-template-fields.tsx:788
msgid "Checkbox"
msgstr "Checkbox"
@@ -179,7 +187,7 @@ msgstr "Checkbox-Werte"
msgid "Clear filters"
msgstr "Filter löschen"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:256
#: packages/ui/primitives/signature-pad/signature-pad.tsx:310
msgid "Clear Signature"
msgstr "Unterschrift löschen"
@@ -196,7 +204,7 @@ msgid "Configure Direct Recipient"
msgstr "Direkten Empfänger konfigurieren"
#: packages/ui/primitives/document-flow/add-fields.tsx:511
#: packages/ui/primitives/template-flow/add-template-fields.tsx:371
#: packages/ui/primitives/template-flow/add-template-fields.tsx:403
msgid "Configure the {0} field"
msgstr "Konfigurieren Sie das Feld {0}"
@@ -213,7 +221,7 @@ msgid "Custom Text"
msgstr "Benutzerdefinierter Text"
#: packages/ui/primitives/document-flow/add-fields.tsx:828
#: packages/ui/primitives/template-flow/add-template-fields.tsx:652
#: packages/ui/primitives/template-flow/add-template-fields.tsx:684
msgid "Date"
msgstr "Datum"
@@ -245,7 +253,7 @@ msgid "Drag & drop your PDF here."
msgstr "Ziehen Sie Ihr PDF hierher."
#: packages/ui/primitives/document-flow/add-fields.tsx:958
#: packages/ui/primitives/template-flow/add-template-fields.tsx:782
#: packages/ui/primitives/template-flow/add-template-fields.tsx:814
msgid "Dropdown"
msgstr "Dropdown"
@@ -257,7 +265,7 @@ msgstr "Dropdown-Optionen"
#: packages/ui/primitives/document-flow/add-signature.tsx:272
#: packages/ui/primitives/document-flow/add-signers.tsx:232
#: packages/ui/primitives/document-flow/add-signers.tsx:239
#: packages/ui/primitives/template-flow/add-template-fields.tsx:600
#: packages/ui/primitives/template-flow/add-template-fields.tsx:632
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:210
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:217
msgid "Email"
@@ -275,7 +283,7 @@ msgstr "Direktlink-Signierung aktivieren"
msgid "Enter password"
msgstr "Passwort eingeben"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:226
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:216
msgid "Error"
msgstr "Fehler"
@@ -284,7 +292,7 @@ msgstr "Fehler"
msgid "External ID"
msgstr "Externe ID"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:227
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:217
msgid "Failed to save settings."
msgstr "Einstellungen konnten nicht gespeichert werden."
@@ -312,6 +320,10 @@ msgstr "Globale Empfängerauthentifizierung"
msgid "Go Back"
msgstr "Zurück"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:297
msgid "Green"
msgstr ""
#: packages/lib/constants/recipient-roles.ts:72
msgid "I am a signer of this document"
msgstr "Ich bin ein Unterzeichner dieses Dokuments"
@@ -367,7 +379,7 @@ msgstr "Min"
#: packages/ui/primitives/document-flow/add-fields.tsx:802
#: packages/ui/primitives/document-flow/add-signature.tsx:298
#: packages/ui/primitives/document-flow/add-signers.tsx:265
#: packages/ui/primitives/template-flow/add-template-fields.tsx:626
#: packages/ui/primitives/template-flow/add-template-fields.tsx:658
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:245
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:251
msgid "Name"
@@ -386,12 +398,12 @@ msgid "Needs to view"
msgstr "Muss sehen"
#: packages/ui/primitives/document-flow/add-fields.tsx:613
#: packages/ui/primitives/template-flow/add-template-fields.tsx:465
#: packages/ui/primitives/template-flow/add-template-fields.tsx:497
msgid "No recipient matching this description was found."
msgstr "Kein passender Empfänger mit dieser Beschreibung gefunden."
#: packages/ui/primitives/document-flow/add-fields.tsx:629
#: packages/ui/primitives/template-flow/add-template-fields.tsx:481
#: packages/ui/primitives/template-flow/add-template-fields.tsx:513
msgid "No recipients with this role"
msgstr "Keine Empfänger mit dieser Rolle"
@@ -416,7 +428,7 @@ msgid "No value found."
msgstr "Kein Wert gefunden."
#: packages/ui/primitives/document-flow/add-fields.tsx:880
#: packages/ui/primitives/template-flow/add-template-fields.tsx:704
#: packages/ui/primitives/template-flow/add-template-fields.tsx:736
msgid "Number"
msgstr "Nummer"
@@ -451,7 +463,7 @@ msgid "Placeholder"
msgstr "Platzhalter"
#: packages/ui/primitives/document-flow/add-fields.tsx:906
#: packages/ui/primitives/template-flow/add-template-fields.tsx:730
#: packages/ui/primitives/template-flow/add-template-fields.tsx:762
msgid "Radio"
msgstr "Radio"
@@ -477,6 +489,10 @@ msgstr "Erhält Kopie"
msgid "Recipient action authentication"
msgstr "Empfängeraktion Authentifizierung"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:283
msgid "Red"
msgstr ""
#: packages/ui/primitives/document-flow/add-settings.tsx:298
#: packages/ui/primitives/template-flow/add-template-settings.tsx:332
msgid "Redirect URL"
@@ -498,11 +514,11 @@ msgstr "Pflichtfeld"
msgid "Rows per page"
msgstr "Zeilen pro Seite"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:296
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:286
msgid "Save"
msgstr "Speichern"
#: packages/ui/primitives/template-flow/add-template-fields.tsx:798
#: packages/ui/primitives/template-flow/add-template-fields.tsx:848
msgid "Save Template"
msgstr "Vorlage speichern"
@@ -552,7 +568,7 @@ msgstr "Unterschreiben"
#: packages/ui/primitives/document-flow/add-fields.tsx:724
#: packages/ui/primitives/document-flow/add-signature.tsx:323
#: packages/ui/primitives/document-flow/field-icon.tsx:52
#: packages/ui/primitives/template-flow/add-template-fields.tsx:548
#: packages/ui/primitives/template-flow/add-template-fields.tsx:580
msgid "Signature"
msgstr "Unterschrift"
@@ -598,7 +614,7 @@ msgid "Template title"
msgstr "Vorlagentitel"
#: packages/ui/primitives/document-flow/add-fields.tsx:854
#: packages/ui/primitives/template-flow/add-template-fields.tsx:678
#: packages/ui/primitives/template-flow/add-template-fields.tsx:710
msgid "Text"
msgstr "Text"
@@ -688,6 +704,7 @@ msgid "Title"
msgstr "Titel"
#: packages/ui/primitives/document-flow/add-fields.tsx:971
#: packages/ui/primitives/template-flow/add-template-fields.tsx:828
msgid "To proceed further, please set at least one value for the {0} field."
msgstr "Um fortzufahren, legen Sie bitte mindestens einen Wert für das Feld {0} fest."
@@ -733,6 +750,10 @@ msgstr "Viewer"
msgid "Viewing"
msgstr "Viewing"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:280
#~ msgid "White"
#~ msgstr ""
#: packages/ui/primitives/document-flow/send-document-action-dialog.tsx:44
msgid "You are about to send this document to the recipients. Are you sure you want to continue?"
msgstr "Sie sind dabei, dieses Dokument an die Empfänger zu senden. Sind Sie sicher, dass Sie fortfahren möchten?"

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@ msgstr ""
"Language: de\n"
"Project-Id-Version: documenso-app\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-08-27 16:03\n"
"PO-Revision-Date: 2024-09-05 06:04\n"
"Last-Translator: \n"
"Language-Team: German\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -111,7 +111,7 @@ msgid "Advanced Options"
msgstr "Advanced Options"
#: packages/ui/primitives/document-flow/add-fields.tsx:510
#: packages/ui/primitives/template-flow/add-template-fields.tsx:370
#: packages/ui/primitives/template-flow/add-template-fields.tsx:402
msgid "Advanced settings"
msgstr "Advanced settings"
@@ -135,7 +135,15 @@ msgstr "Approver"
msgid "Approving"
msgstr "Approving"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:297
#: packages/ui/primitives/signature-pad/signature-pad.tsx:276
msgid "Black"
msgstr "Black"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:290
msgid "Blue"
msgstr "Blue"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:287
#: packages/ui/primitives/document-flow/send-document-action-dialog.tsx:58
msgid "Cancel"
msgstr "Cancel"
@@ -162,7 +170,7 @@ msgid "Character Limit"
msgstr "Character Limit"
#: packages/ui/primitives/document-flow/add-fields.tsx:932
#: packages/ui/primitives/template-flow/add-template-fields.tsx:756
#: packages/ui/primitives/template-flow/add-template-fields.tsx:788
msgid "Checkbox"
msgstr "Checkbox"
@@ -174,7 +182,7 @@ msgstr "Checkbox values"
msgid "Clear filters"
msgstr "Clear filters"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:256
#: packages/ui/primitives/signature-pad/signature-pad.tsx:310
msgid "Clear Signature"
msgstr "Clear Signature"
@@ -191,7 +199,7 @@ msgid "Configure Direct Recipient"
msgstr "Configure Direct Recipient"
#: packages/ui/primitives/document-flow/add-fields.tsx:511
#: packages/ui/primitives/template-flow/add-template-fields.tsx:371
#: packages/ui/primitives/template-flow/add-template-fields.tsx:403
msgid "Configure the {0} field"
msgstr "Configure the {0} field"
@@ -208,7 +216,7 @@ msgid "Custom Text"
msgstr "Custom Text"
#: packages/ui/primitives/document-flow/add-fields.tsx:828
#: packages/ui/primitives/template-flow/add-template-fields.tsx:652
#: packages/ui/primitives/template-flow/add-template-fields.tsx:684
msgid "Date"
msgstr "Date"
@@ -240,7 +248,7 @@ msgid "Drag & drop your PDF here."
msgstr "Drag & drop your PDF here."
#: packages/ui/primitives/document-flow/add-fields.tsx:958
#: packages/ui/primitives/template-flow/add-template-fields.tsx:782
#: packages/ui/primitives/template-flow/add-template-fields.tsx:814
msgid "Dropdown"
msgstr "Dropdown"
@@ -252,7 +260,7 @@ msgstr "Dropdown options"
#: packages/ui/primitives/document-flow/add-signature.tsx:272
#: packages/ui/primitives/document-flow/add-signers.tsx:232
#: packages/ui/primitives/document-flow/add-signers.tsx:239
#: packages/ui/primitives/template-flow/add-template-fields.tsx:600
#: packages/ui/primitives/template-flow/add-template-fields.tsx:632
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:210
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:217
msgid "Email"
@@ -270,7 +278,7 @@ msgstr "Enable Direct Link Signing"
msgid "Enter password"
msgstr "Enter password"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:226
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:216
msgid "Error"
msgstr "Error"
@@ -279,7 +287,7 @@ msgstr "Error"
msgid "External ID"
msgstr "External ID"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:227
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:217
msgid "Failed to save settings."
msgstr "Failed to save settings."
@@ -307,6 +315,10 @@ msgstr "Global recipient action authentication"
msgid "Go Back"
msgstr "Go Back"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:297
msgid "Green"
msgstr "Green"
#: packages/lib/constants/recipient-roles.ts:72
msgid "I am a signer of this document"
msgstr "I am a signer of this document"
@@ -362,7 +374,7 @@ msgstr "Min"
#: packages/ui/primitives/document-flow/add-fields.tsx:802
#: packages/ui/primitives/document-flow/add-signature.tsx:298
#: packages/ui/primitives/document-flow/add-signers.tsx:265
#: packages/ui/primitives/template-flow/add-template-fields.tsx:626
#: packages/ui/primitives/template-flow/add-template-fields.tsx:658
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:245
#: packages/ui/primitives/template-flow/add-template-placeholder-recipients.tsx:251
msgid "Name"
@@ -381,12 +393,12 @@ msgid "Needs to view"
msgstr "Needs to view"
#: packages/ui/primitives/document-flow/add-fields.tsx:613
#: packages/ui/primitives/template-flow/add-template-fields.tsx:465
#: packages/ui/primitives/template-flow/add-template-fields.tsx:497
msgid "No recipient matching this description was found."
msgstr "No recipient matching this description was found."
#: packages/ui/primitives/document-flow/add-fields.tsx:629
#: packages/ui/primitives/template-flow/add-template-fields.tsx:481
#: packages/ui/primitives/template-flow/add-template-fields.tsx:513
msgid "No recipients with this role"
msgstr "No recipients with this role"
@@ -411,7 +423,7 @@ msgid "No value found."
msgstr "No value found."
#: packages/ui/primitives/document-flow/add-fields.tsx:880
#: packages/ui/primitives/template-flow/add-template-fields.tsx:704
#: packages/ui/primitives/template-flow/add-template-fields.tsx:736
msgid "Number"
msgstr "Number"
@@ -446,7 +458,7 @@ msgid "Placeholder"
msgstr "Placeholder"
#: packages/ui/primitives/document-flow/add-fields.tsx:906
#: packages/ui/primitives/template-flow/add-template-fields.tsx:730
#: packages/ui/primitives/template-flow/add-template-fields.tsx:762
msgid "Radio"
msgstr "Radio"
@@ -472,6 +484,10 @@ msgstr "Receives copy"
msgid "Recipient action authentication"
msgstr "Recipient action authentication"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:283
msgid "Red"
msgstr "Red"
#: packages/ui/primitives/document-flow/add-settings.tsx:298
#: packages/ui/primitives/template-flow/add-template-settings.tsx:332
msgid "Redirect URL"
@@ -493,11 +509,11 @@ msgstr "Required field"
msgid "Rows per page"
msgstr "Rows per page"
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:296
#: packages/ui/primitives/document-flow/field-item-advanced-settings.tsx:286
msgid "Save"
msgstr "Save"
#: packages/ui/primitives/template-flow/add-template-fields.tsx:798
#: packages/ui/primitives/template-flow/add-template-fields.tsx:848
msgid "Save Template"
msgstr "Save Template"
@@ -547,7 +563,7 @@ msgstr "Sign"
#: packages/ui/primitives/document-flow/add-fields.tsx:724
#: packages/ui/primitives/document-flow/add-signature.tsx:323
#: packages/ui/primitives/document-flow/field-icon.tsx:52
#: packages/ui/primitives/template-flow/add-template-fields.tsx:548
#: packages/ui/primitives/template-flow/add-template-fields.tsx:580
msgid "Signature"
msgstr "Signature"
@@ -593,7 +609,7 @@ msgid "Template title"
msgstr "Template title"
#: packages/ui/primitives/document-flow/add-fields.tsx:854
#: packages/ui/primitives/template-flow/add-template-fields.tsx:678
#: packages/ui/primitives/template-flow/add-template-fields.tsx:710
msgid "Text"
msgstr "Text"
@@ -683,6 +699,7 @@ msgid "Title"
msgstr "Title"
#: packages/ui/primitives/document-flow/add-fields.tsx:971
#: packages/ui/primitives/template-flow/add-template-fields.tsx:828
msgid "To proceed further, please set at least one value for the {0} field."
msgstr "To proceed further, please set at least one value for the {0} field."
@@ -728,6 +745,10 @@ msgstr "Viewer"
msgid "Viewing"
msgstr "Viewing"
#: packages/ui/primitives/signature-pad/signature-pad.tsx:280
#~ msgid "White"
#~ msgstr "White"
#: packages/ui/primitives/document-flow/send-document-action-dialog.tsx:44
msgid "You are about to send this document to the recipients. Are you sure you want to continue?"
msgstr "You are about to send this document to the recipients. Are you sure you want to continue?"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,7 @@ msgid "{0, plural, one {(1 character over)} other {(# characters over)}}"
msgstr "{0, plural, one {(1 character over)} other {(# characters over)}}"
#: apps/web/src/components/forms/public-profile-form.tsx:237
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:397
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:395
msgid "{0, plural, one {# character over the limit} other {# characters over the limit}}"
msgstr "{0, plural, one {# character over the limit} other {# characters over the limit}}"
@@ -67,7 +67,7 @@ msgstr "{0, plural, one {Waiting on 1 recipient} other {Waiting on # recipients}
msgid "{0, plural, zero {Select values} other {# selected...}}"
msgstr "{0, plural, zero {Select values} other {# selected...}}"
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:251
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:249
msgid "{0} direct signing templates"
msgstr "{0} direct signing templates"
@@ -100,7 +100,7 @@ msgid "{numberOfSeats, plural, one {# member} other {# members}}"
msgstr "{numberOfSeats, plural, one {# member} other {# members}}"
#: apps/web/src/components/forms/public-profile-form.tsx:231
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:391
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:389
msgid "{remaningLength, plural, one {# character remaining} other {# characters remaining}}"
msgstr "{remaningLength, plural, one {# character remaining} other {# characters remaining}}"
@@ -185,19 +185,19 @@ msgid "Account deleted"
msgstr "Account deleted"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:105
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:106
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:104
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:121
#: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:120
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118
msgid "Action"
msgstr "Action"
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:89
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:141
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:135
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:144
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:120
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:129
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:85
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:140
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:133
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:142
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:118
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:127
msgid "Actions"
msgstr "Actions"
@@ -294,7 +294,7 @@ msgstr "Add the subject and message you wish to send to signers."
msgid "Adding and removing seats will adjust your invoice accordingly."
msgstr "Adding and removing seats will adjust your invoice accordingly."
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:61
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:59
msgid "Admin Actions"
msgstr "Admin Actions"
@@ -507,8 +507,8 @@ msgstr "An error occurred while uploading your document."
#: apps/web/src/components/forms/v2/signup.tsx:160
#: apps/web/src/components/forms/v2/signup.tsx:183
#: apps/web/src/components/forms/v2/signup.tsx:197
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:143
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:180
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:141
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:178
msgid "An unknown error occurred"
msgstr "An unknown error occurred"
@@ -516,9 +516,9 @@ msgstr "An unknown error occurred"
msgid "Any payment methods attached to this team will remain attached to this team. Please contact us if you need to update this information."
msgstr "Any payment methods attached to this team will remain attached to this team. Please contact us if you need to update this information."
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:23
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:43
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:57
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:22
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:42
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:56
#: apps/web/src/components/(dashboard)/settings/layout/desktop-nav.tsx:90
#: apps/web/src/components/(dashboard)/settings/layout/mobile-nav.tsx:93
#: apps/web/src/components/(teams)/settings/layout/desktop-nav.tsx:81
@@ -559,7 +559,7 @@ msgstr "Are you sure you wish to delete this team?"
#: apps/web/src/components/(teams)/dialogs/delete-team-member-dialog.tsx:81
#: apps/web/src/components/(teams)/dialogs/leave-team-dialog.tsx:81
#: apps/web/src/components/(teams)/dialogs/remove-team-email-dialog.tsx:116
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:441
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:439
msgid "Are you sure?"
msgstr "Are you sure?"
@@ -619,7 +619,7 @@ msgstr "Banner Updated"
msgid "Basic details"
msgstr "Basic details"
#: apps/web/src/app/(dashboard)/settings/billing/page.tsx:74
#: apps/web/src/app/(dashboard)/settings/billing/page.tsx:72
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/billing/page.tsx:61
#: apps/web/src/components/(dashboard)/settings/layout/desktop-nav.tsx:117
#: apps/web/src/components/(dashboard)/settings/layout/mobile-nav.tsx:120
@@ -628,7 +628,7 @@ msgstr "Basic details"
msgid "Billing"
msgstr "Billing"
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:101
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:99
msgid "Browser"
msgstr "Browser"
@@ -682,7 +682,7 @@ msgstr "By enabling 2FA, you will be required to enter a code from your authenti
#: apps/web/src/components/(teams)/dialogs/update-team-member-dialog.tsx:187
#: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:257
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:163
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:452
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:450
msgid "Cancel"
msgstr "Cancel"
@@ -732,7 +732,7 @@ msgstr "Click here to get started"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recent-activity.tsx:78
#: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:118
#: apps/web/src/components/document/document-history-sheet.tsx:131
#: apps/web/src/components/document/document-history-sheet.tsx:133
msgid "Click here to retry"
msgstr "Click here to retry"
@@ -759,8 +759,8 @@ msgstr "Click to insert field"
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/team-transfer-status.tsx:121
#: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:180
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:102
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:321
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:425
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:319
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:423
msgid "Close"
msgstr "Close"
@@ -804,12 +804,12 @@ msgstr "Configure general settings for the document."
msgid "Configure general settings for the template."
msgstr "Configure general settings for the template."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:339
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:337
msgid "Configure template"
msgstr "Configure template"
#: apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsx:479
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:462
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:460
msgid "Confirm"
msgstr "Confirm"
@@ -848,7 +848,7 @@ msgstr "Content"
#: apps/web/src/app/(unauthenticated)/team/verify/email/[token]/page.tsx:143
#: apps/web/src/app/(unauthenticated)/team/verify/transfer/[token]/page.tsx:72
#: apps/web/src/app/(unauthenticated)/team/verify/transfer/[token]/page.tsx:122
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:330
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:328
msgid "Continue"
msgstr "Continue"
@@ -954,12 +954,12 @@ msgstr "Create your account and start using state-of-the-art document signing."
msgid "Create your account and start using state-of-the-art document signing. Open and beautiful signing is within your grasp."
msgstr "Create your account and start using state-of-the-art document signing. Open and beautiful signing is within your grasp."
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:63
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:48
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:62
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:35
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:54
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table.tsx:65
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:57
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:276
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:56
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:274
msgid "Created"
msgstr "Created"
@@ -967,21 +967,29 @@ msgstr "Created"
msgid "Created At"
msgstr "Created At"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:82
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:79
msgid "Created by"
msgstr "Created by"
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:49
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:68
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:101
#: apps/web/src/components/(teams)/tables/pending-user-teams-data-table.tsx:80
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:48
#: apps/web/src/components/(teams)/tables/pending-user-teams-data-table.tsx:78
msgid "Created on"
msgstr "Created on"
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:67
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:88
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:93
msgid "Created on {0}"
msgstr "Created on {0}"
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:89
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:94
msgid "Created on <0/>"
msgstr "Created on <0/>"
#~ msgid "Created on <0/>"
#~ msgstr "Created on <0/>"
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:100
msgid "Created on{0}"
msgstr "Created on{0}"
#: apps/web/src/components/forms/password.tsx:107
msgid "Current Password"
@@ -999,12 +1007,12 @@ msgstr "Daily"
msgid "Dark Mode"
msgstr "Dark Mode"
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:72
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:70
#: apps/web/src/app/(signing)/sign/[token]/date-field.tsx:148
msgid "Date"
msgstr "Date"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:88
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:85
msgid "Date created"
msgstr "Date created"
@@ -1021,12 +1029,12 @@ msgstr "Declined team invitation"
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:200
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:86
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:104
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:83
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:100
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:91
#: apps/web/src/app/(dashboard)/templates/delete-template-dialog.tsx:90
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:119
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:109
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:122
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:105
#: apps/web/src/components/(dashboard)/settings/token/delete-token-dialog.tsx:121
#: apps/web/src/components/(dashboard)/settings/webhooks/delete-webhook-dialog.tsx:109
#: apps/web/src/components/(teams)/dialogs/delete-team-dialog.tsx:167
@@ -1085,7 +1093,7 @@ msgstr "Delete Webhook"
msgid "Delete your account and all its contents, including completed documents. This action is irreversible and will cancel your subscription, so proceed with caution."
msgstr "Delete your account and all its contents, including completed documents. This action is irreversible and will cancel your subscription, so proceed with caution."
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:42
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41
msgid "Deleted"
msgstr "Deleted"
@@ -1097,11 +1105,11 @@ msgstr "Deleting account..."
#~ msgid "Deleting document"
#~ msgstr "Deleting document"
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:77
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:75
msgid "Device"
msgstr "Device"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:92
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:91
#: apps/web/src/app/(dashboard)/templates/template-direct-link-badge.tsx:46
msgid "direct link"
msgstr "direct link"
@@ -1126,7 +1134,7 @@ msgstr "Direct link signing has been disabled"
msgid "Direct link signing has been enabled"
msgstr "Direct link signing has been enabled"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:96
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:95
msgid "Direct link templates contain one dynamic recipient placeholder. Anyone with access to this link can sign the document, and it will then appear on your documents page."
msgstr "Direct link templates contain one dynamic recipient placeholder. Anyone with access to this link can sign the document, and it will then appear on your documents page."
@@ -1138,7 +1146,7 @@ msgstr "Direct template link deleted"
msgid "Direct template link usage exceeded ({0}/{1})"
msgstr "Direct template link usage exceeded ({0}/{1})"
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:419
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:417
msgid "Disable"
msgstr "Disable"
@@ -1152,8 +1160,8 @@ msgstr "Disable 2FA"
msgid "Disable Two Factor Authentication before deleting your account."
msgstr "Disable Two Factor Authentication before deleting your account."
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:75
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:80
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:74
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:79
msgid "Disabled"
msgstr "Disabled"
@@ -1177,7 +1185,7 @@ msgstr "Do you want to duplicate this template?"
msgid "Documenso will delete <0>all of your documents</0>, along with all of your completed documents, signatures, and all other resources belonging to your Account."
msgstr "Documenso will delete <0>all of your documents</0>, along with all of your completed documents, signatures, and all other resources belonging to your Account."
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:122
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:119
msgid "Document"
msgstr "Document"
@@ -1220,11 +1228,11 @@ msgid "Document Duplicated"
msgstr "Document Duplicated"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx:158
#: apps/web/src/components/document/document-history-sheet.tsx:102
#: apps/web/src/components/document/document-history-sheet.tsx:104
msgid "Document history"
msgstr "Document history"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:74
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:71
msgid "Document ID"
msgstr "Document ID"
@@ -1232,7 +1240,7 @@ msgstr "Document ID"
msgid "Document inbox"
msgstr "Document inbox"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:179
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:178
msgid "Document Limit Exceeded!"
msgstr "Document Limit Exceeded!"
@@ -1272,11 +1280,11 @@ msgstr "Document Signed"
msgid "Document signing process will be cancelled"
msgstr "Document signing process will be cancelled"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:78
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:75
msgid "Document status"
msgstr "Document status"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:70
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:67
msgid "Document title"
msgstr "Document title"
@@ -1373,10 +1381,10 @@ msgstr "Duplicate"
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:154
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:99
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:62
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/team-email-dropdown.tsx:77
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:104
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:100
msgid "Edit"
msgstr "Edit"
@@ -1448,9 +1456,9 @@ msgstr "Enable Direct Link Signing"
#: apps/web/src/app/(dashboard)/admin/site-settings/banner-form.tsx:123
#: apps/web/src/app/(dashboard)/settings/webhooks/[id]/page.tsx:138
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:75
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:74
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/[id]/page.tsx:142
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:80
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:79
#: apps/web/src/components/(dashboard)/settings/webhooks/create-webhook-dialog.tsx:166
msgid "Enabled"
msgstr "Enabled"
@@ -1532,14 +1540,22 @@ msgstr "Expired"
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:73
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:106
msgid "Expires on"
msgstr "Expires on"
#~ msgid "Expires on"
#~ msgstr "Expires on"
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:71
msgid "Expires on {0}"
msgstr "Expires on {0}"
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:75
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:108
#~ msgid "Expires on <0/>"
#~ msgstr "Expires on <0/>"
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:107
msgid "Expires on{0}"
msgstr "Expires on{0}"
#: apps/web/src/app/(dashboard)/admin/documents/[id]/admin-actions.tsx:42
msgid "Failed to reseal document"
msgstr "Failed to reseal document"
@@ -1633,7 +1649,7 @@ msgstr "Hey Im Timur"
msgid "Hide"
msgstr "Hide"
#: apps/web/src/components/document/document-history-sheet.tsx:109
#: apps/web/src/components/document/document-history-sheet.tsx:111
msgid "Hide additional information"
msgstr "Hide additional information"
@@ -1670,7 +1686,7 @@ msgstr "Inbox"
msgid "Inbox documents"
msgstr "Inbox documents"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:62
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:53
msgid "Information"
msgstr "Information"
@@ -1708,11 +1724,11 @@ msgstr "Invitation accepted!"
msgid "Invitation declined"
msgstr "Invitation declined"
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:82
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:80
msgid "Invitation has been deleted"
msgstr "Invitation has been deleted"
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:65
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:63
msgid "Invitation has been resent"
msgstr "Invitation has been resent"
@@ -1732,7 +1748,7 @@ msgstr "Invite Members"
msgid "Invite team members"
msgstr "Invite team members"
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:130
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:128
msgid "Invited At"
msgstr "Invited At"
@@ -1768,15 +1784,15 @@ msgstr "Last 30 days"
msgid "Last 7 days"
msgstr "Last 7 days"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:52
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:41
msgid "Last modified"
msgstr "Last modified"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:94
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:91
msgid "Last updated"
msgstr "Last updated"
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:53
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:52
msgid "Last updated at"
msgstr "Last updated at"
@@ -1785,7 +1801,7 @@ msgid "Last used"
msgstr "Last used"
#: apps/web/src/components/(teams)/dialogs/leave-team-dialog.tsx:111
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:119
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:117
msgid "Leave"
msgstr "Leave"
@@ -1805,8 +1821,8 @@ msgstr "Like to have your own public profile with agreements?"
msgid "Link template"
msgstr "Link template"
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:80
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:85
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:79
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:84
msgid "Listening to {0}"
msgstr "Listening to {0}"
@@ -1839,7 +1855,7 @@ msgstr "Loading..."
msgid "Login"
msgstr "Login"
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:103
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:101
msgid "Manage"
msgstr "Manage"
@@ -1851,7 +1867,7 @@ msgstr "Manage {0}'s profile"
msgid "Manage all teams you are currently associated with."
msgstr "Manage all teams you are currently associated with."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:343
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:341
msgid "Manage details for this public template"
msgstr "Manage details for this public template"
@@ -1919,8 +1935,8 @@ msgstr "MAU (created document)"
msgid "MAU (had document completed)"
msgstr "MAU (had document completed)"
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:92
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:115
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:90
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:113
msgid "Member Since"
msgstr "Member Since"
@@ -2045,7 +2061,7 @@ msgstr "No results found."
msgid "No token provided"
msgstr "No token provided"
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:286
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:284
msgid "No valid direct templates found"
msgstr "No valid direct templates found"
@@ -2075,16 +2091,16 @@ msgstr "Nothing to do"
msgid "On this page, you can create a new webhook."
msgstr "On this page, you can create a new webhook."
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:27
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:26
msgid "On this page, you can create new API tokens and manage the existing ones. <0/>Also see our <1>Documentation</1>."
msgstr "On this page, you can create new API tokens and manage the existing ones. <0/>Also see our <1>Documentation</1>."
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:61
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:60
msgid "On this page, you can create new API tokens and manage the existing ones. <0/>You can view our swagger docs <1>here</1>"
msgstr "On this page, you can create new API tokens and manage the existing ones. <0/>You can view our swagger docs <1>here</1>"
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:30
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:35
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:29
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:34
msgid "On this page, you can create new Webhooks and manage the existing ones."
msgstr "On this page, you can create new Webhooks and manage the existing ones."
@@ -2128,7 +2144,7 @@ msgstr "Or continue with"
msgid "Otherwise, the document will be created as a draft."
msgstr "Otherwise, the document will be created as a draft."
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:87
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:86
#: apps/web/src/components/(dashboard)/layout/menu-switcher.tsx:76
msgid "Owner"
msgstr "Owner"
@@ -2320,12 +2336,12 @@ msgstr "Preferences"
msgid "Preview and configure template."
msgstr "Preview and configure template."
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:106
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:105
#: apps/web/src/components/formatter/template-type.tsx:22
msgid "Private"
msgstr "Private"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:116
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:115
msgid "Private templates can only be modified and viewed by you."
msgstr "Private templates can only be modified and viewed by you."
@@ -2349,7 +2365,7 @@ msgstr "Profile is currently <0>visible</0>."
msgid "Profile updated"
msgstr "Profile updated"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:79
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:78
#: apps/web/src/components/formatter/template-type.tsx:27
msgid "Public"
msgstr "Public"
@@ -2370,7 +2386,7 @@ msgstr "Public profile URL"
msgid "Public profile username"
msgstr "Public profile username"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:83
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:82
msgid "Public templates are connected to your public profile. Any modifications to public templates will also appear in your public profile."
msgstr "Public templates are connected to your public profile. Any modifications to public templates will also appear in your public profile."
@@ -2391,7 +2407,7 @@ msgstr "Reauthentication is required to sign this field"
msgid "Recent activity"
msgstr "Recent activity"
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:73
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:69
#: apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsx:280
msgid "Recipient"
msgstr "Recipient"
@@ -2400,7 +2416,7 @@ msgstr "Recipient"
msgid "Recipient updated"
msgstr "Recipient updated"
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:68
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:66
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recipients.tsx:34
msgid "Recipients"
msgstr "Recipients"
@@ -2438,8 +2454,8 @@ msgstr "Remembered your password? <0>Sign In</0>"
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/team-email-dropdown.tsx:89
#: apps/web/src/components/(teams)/dialogs/remove-team-email-dialog.tsx:159
#: apps/web/src/components/(teams)/tables/pending-user-teams-data-table-actions.tsx:54
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:168
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:169
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:166
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:167
#: apps/web/src/components/forms/avatar-image.tsx:169
msgid "Remove"
msgstr "Remove"
@@ -2448,7 +2464,7 @@ msgstr "Remove"
msgid "Remove team email"
msgstr "Remove team email"
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:166
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:164
msgid "Remove team member"
msgstr "Remove team member"
@@ -2466,7 +2482,7 @@ msgid "Reseal document"
msgstr "Reseal document"
#: apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx:118
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:156
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:154
msgid "Resend"
msgstr "Resend"
@@ -2540,9 +2556,9 @@ msgstr "Revoke access"
#: apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsx:283
#: apps/web/src/components/(teams)/dialogs/invite-team-member-dialog.tsx:318
#: apps/web/src/components/(teams)/dialogs/update-team-member-dialog.tsx:163
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:84
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:125
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:107
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:82
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:123
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:105
msgid "Role"
msgstr "Role"
@@ -2564,7 +2580,7 @@ msgstr "Save"
msgid "Search"
msgstr "Search"
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:141
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:140
msgid "Search by document title"
msgstr "Search by document title"
@@ -2604,11 +2620,11 @@ msgstr "Select a team to move this document to. This action cannot be undone."
msgid "Select a team to move this template to. This action cannot be undone."
msgstr "Select a team to move this template to. This action cannot be undone."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:263
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:261
msgid "Select a template you'd like to display on your public profile"
msgstr "Select a template you'd like to display on your public profile"
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:259
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:257
msgid "Select a template you'd like to display on your team's public profile"
msgstr "Select a template you'd like to display on your team's public profile"
@@ -2628,7 +2644,7 @@ msgstr "Send document"
msgid "Send reminder"
msgstr "Send reminder"
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:69
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:65
msgid "Sender"
msgstr "Sender"
@@ -2673,7 +2689,7 @@ msgstr "Share Signing Card"
msgid "Show"
msgstr "Show"
#: apps/web/src/components/document/document-history-sheet.tsx:111
#: apps/web/src/components/document/document-history-sheet.tsx:113
msgid "Show additional information"
msgstr "Show additional information"
@@ -2842,8 +2858,8 @@ msgstr "Site Settings"
#: apps/web/src/components/(teams)/dialogs/remove-team-email-dialog.tsx:64
#: apps/web/src/components/(teams)/dialogs/remove-team-email-dialog.tsx:83
#: apps/web/src/components/(teams)/tables/pending-user-teams-data-table-actions.tsx:33
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:70
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:87
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:68
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:85
#: apps/web/src/components/(teams)/team-billing-portal-button.tsx:29
msgid "Something went wrong"
msgstr "Something went wrong"
@@ -2885,9 +2901,9 @@ msgstr "Sorry, we were unable to download the certificate. Please try again late
msgid "Stats"
msgstr "Stats"
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:82
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:81
#: apps/web/src/app/(dashboard)/admin/subscriptions/page.tsx:32
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:83
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:79
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:73
msgid "Status"
msgstr "Status"
@@ -2928,11 +2944,11 @@ msgstr "Subscriptions"
#: apps/web/src/components/(teams)/dialogs/update-team-member-dialog.tsx:92
#: apps/web/src/components/(teams)/forms/update-team-form.tsx:68
#: apps/web/src/components/(teams)/tables/pending-user-teams-data-table-actions.tsx:27
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:64
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:81
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:62
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:79
#: apps/web/src/components/forms/public-profile-form.tsx:80
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:135
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:172
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:133
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:170
msgid "Success"
msgstr "Success"
@@ -2944,8 +2960,8 @@ msgstr "Successfully created passkey"
msgid "System Theme"
msgstr "System Theme"
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:67
#: apps/web/src/components/(teams)/tables/pending-user-teams-data-table.tsx:66
#: apps/web/src/components/(teams)/tables/current-user-teams-data-table.tsx:65
#: apps/web/src/components/(teams)/tables/pending-user-teams-data-table.tsx:64
msgid "Team"
msgstr "Team"
@@ -2991,8 +3007,8 @@ msgstr "Team invitation"
msgid "Team invitations have been sent."
msgstr "Team invitations have been sent."
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:111
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:88
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:109
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:86
msgid "Team Member"
msgstr "Team Member"
@@ -3001,11 +3017,11 @@ msgstr "Team Member"
msgid "Team Name"
msgstr "Team Name"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:106
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:105
msgid "Team Only"
msgstr "Team Only"
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:111
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:110
msgid "Team only templates are not linked anywhere and are visible only to your team."
msgstr "Team only templates are not linked anywhere and are visible only to your team."
@@ -3063,7 +3079,7 @@ msgid "Teams restricted"
msgstr "Teams restricted"
#: apps/web/src/components/(teams)/dialogs/invite-team-member-dialog.tsx:408
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:273
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:271
msgid "Template"
msgstr "Template"
@@ -3079,11 +3095,11 @@ msgstr "Template document uploaded"
msgid "Template duplicated"
msgstr "Template duplicated"
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:136
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:134
msgid "Template has been removed from your public profile."
msgstr "Template has been removed from your public profile."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:173
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:171
msgid "Template has been updated."
msgstr "Template has been updated."
@@ -3167,11 +3183,11 @@ msgstr "The profile link has been copied to your clipboard"
msgid "The profile you are looking for could not be found."
msgstr "The profile you are looking for could not be found."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:382
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:380
msgid "The public description that will be displayed with this template"
msgstr "The public description that will be displayed with this template"
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:360
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:358
msgid "The public name for your template"
msgstr "The public name for your template"
@@ -3207,7 +3223,7 @@ msgstr "The team you are looking for may have been removed, renamed or may have
msgid "The template has been successfully moved to the selected team."
msgstr "The template has been successfully moved to the selected team."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:445
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:443
msgid "The template will be removed from your profile"
msgstr "The template will be removed from your profile"
@@ -3349,17 +3365,17 @@ msgstr "This username has already been taken"
msgid "This username is already taken"
msgstr "This username is already taken"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:79
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:77
msgid "Time"
msgstr "Time"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:100
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx:97
msgid "Time zone"
msgstr "Time zone"
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:68
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:64
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:62
#: apps/web/src/app/(dashboard)/admin/documents/document-results.tsx:67
#: apps/web/src/app/(dashboard)/documents/data-table.tsx:60
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:61
msgid "Title"
msgstr "Title"
@@ -3423,8 +3439,8 @@ msgstr "Token created"
msgid "Token deleted"
msgstr "Token deleted"
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:78
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:111
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:75
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:114
msgid "Token doesn't have an expiration date"
msgstr "Token doesn't have an expiration date"
@@ -3497,7 +3513,7 @@ msgid "Two-factor authentication has been disabled for your account. You will no
msgstr "Two-factor authentication has been disabled for your account. You will no longer be required to enter a code from your authenticator app when signing in."
#: apps/web/src/app/(dashboard)/admin/documents/[id]/recipient-item.tsx:73
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:68
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:67
msgid "Type"
msgstr "Type"
@@ -3529,7 +3545,7 @@ msgstr "Unable to create direct template access. Please try again later."
msgid "Unable to decline this team invitation at this time."
msgstr "Unable to decline this team invitation at this time."
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:88
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:86
msgid "Unable to delete invitation. Please try again."
msgstr "Unable to delete invitation. Please try again."
@@ -3546,7 +3562,7 @@ msgid "Unable to join this team at this time."
msgstr "Unable to join this team at this time."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recent-activity.tsx:72
#: apps/web/src/components/document/document-history-sheet.tsx:125
#: apps/web/src/components/document/document-history-sheet.tsx:127
msgid "Unable to load document history"
msgstr "Unable to load document history"
@@ -3562,7 +3578,7 @@ msgstr "Unable to remove email verification at this time. Please try again."
msgid "Unable to remove team email at this time. Please try again."
msgstr "Unable to remove team email at this time. Please try again."
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:71
#: apps/web/src/components/(teams)/tables/team-member-invites-data-table.tsx:69
msgid "Unable to resend invitation. Please try again."
msgstr "Unable to resend invitation. Please try again."
@@ -3606,7 +3622,7 @@ msgstr "Unpaid"
#: apps/web/src/components/(teams)/dialogs/update-team-email-dialog.tsx:166
#: apps/web/src/components/(teams)/dialogs/update-team-member-dialog.tsx:191
#: apps/web/src/components/forms/public-profile-form.tsx:279
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:430
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:428
msgid "Update"
msgstr "Update"
@@ -3630,7 +3646,7 @@ msgstr "Update profile"
msgid "Update Recipient"
msgstr "Update Recipient"
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:148
#: apps/web/src/components/(teams)/tables/team-members-data-table.tsx:146
msgid "Update role"
msgstr "Update role"
@@ -3669,7 +3685,7 @@ msgstr "Updating profile..."
msgid "Upload Avatar"
msgstr "Upload Avatar"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:44
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:31
msgid "Uploaded by"
msgstr "Uploaded by"
@@ -3699,7 +3715,7 @@ msgstr "Use Backup Code"
msgid "Use Template"
msgstr "Use Template"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:84
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:82
msgid "User"
msgstr "User"
@@ -3881,7 +3897,7 @@ msgstr "We encountered an unknown error while attempting to invite team members.
msgid "We encountered an unknown error while attempting to leave this team. Please try again later."
msgstr "We encountered an unknown error while attempting to leave this team. Please try again later."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:145
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:143
msgid "We encountered an unknown error while attempting to remove this template from your profile. Please try again later."
msgstr "We encountered an unknown error while attempting to remove this template from your profile. Please try again later."
@@ -3937,7 +3953,7 @@ msgstr "We encountered an unknown error while attempting to update the avatar. P
msgid "We encountered an unknown error while attempting to update the banner. Please try again later."
msgstr "We encountered an unknown error while attempting to update the banner. Please try again later."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:182
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:180
msgid "We encountered an unknown error while attempting to update the template. Please try again later."
msgstr "We encountered an unknown error while attempting to update the template. Please try again later."
@@ -4036,8 +4052,8 @@ msgstr "Webhook updated"
msgid "Webhook URL"
msgstr "Webhook URL"
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:29
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:34
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:28
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:33
#: apps/web/src/components/(dashboard)/settings/layout/desktop-nav.tsx:103
#: apps/web/src/components/(dashboard)/settings/layout/mobile-nav.tsx:106
#: apps/web/src/components/(teams)/settings/layout/desktop-nav.tsx:94
@@ -4077,7 +4093,7 @@ msgstr "Write about yourself"
msgid "Yearly"
msgstr "Yearly"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:45
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:32
msgid "You"
msgstr "You"
@@ -4117,7 +4133,7 @@ msgstr "You are about to remove the following user from <0>{teamName}</0>."
msgid "You are about to revoke access for team <0>{0}</0> ({1}) to use your email."
msgstr "You are about to revoke access for team <0>{0}</0> ({1}) to use your email."
#: apps/web/src/app/(dashboard)/settings/billing/page.tsx:80
#: apps/web/src/app/(dashboard)/settings/billing/page.tsx:78
msgid "You are currently on the <0>Free Plan</0>."
msgstr "You are currently on the <0>Free Plan</0>."
@@ -4198,8 +4214,8 @@ msgstr "You have been invited by <0>{0}</0> to join their team."
msgid "You have declined the invitation from <0>{0}</0> to join their team."
msgstr "You have declined the invitation from <0>{0}</0> to join their team."
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:45
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:50
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:44
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/webhooks/page.tsx:49
msgid "You have no webhooks yet. Your webhooks will be shown here once you create them."
msgstr "You have no webhooks yet. Your webhooks will be shown here once you create them."
@@ -4219,7 +4235,7 @@ msgstr "You have reached the maximum limit of {0} direct templates. <0>Upgrade y
msgid "You have reached your document limit."
msgstr "You have reached your document limit."
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:182
#: apps/web/src/app/(dashboard)/templates/data-table-templates.tsx:181
msgid "You have reached your document limit. <0>Upgrade your account to continue!</0>"
msgstr "You have reached your document limit. <0>Upgrade your account to continue!</0>"
@@ -4307,11 +4323,11 @@ msgstr "Your avatar has been updated successfully."
msgid "Your banner has been updated successfully."
msgstr "Your banner has been updated successfully."
#: apps/web/src/app/(dashboard)/settings/billing/page.tsx:121
#: apps/web/src/app/(dashboard)/settings/billing/page.tsx:119
msgid "Your current plan is past due. Please update your payment information."
msgstr "Your current plan is past due. Please update your payment information."
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:253
#: apps/web/src/components/templates/manage-public-template-dialog.tsx:251
msgid "Your direct signing templates"
msgstr "Your direct signing templates"
@@ -4355,8 +4371,8 @@ msgstr "Your email has been successfully confirmed! You can now use all features
msgid "Your email is currently being used by team <0>{0}</0> ({1})."
msgstr "Your email is currently being used by team <0>{0}</0> ({1})."
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:48
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:81
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:47
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:80
msgid "Your existing tokens"
msgstr "Your existing tokens"
@@ -4430,7 +4446,7 @@ msgstr "Your token has expired!"
msgid "Your token was created successfully! Make sure to copy it because you won't be able to see it again!"
msgstr "Your token was created successfully! Make sure to copy it because you won't be able to see it again!"
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:54
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:87
#: apps/web/src/app/(dashboard)/settings/tokens/page.tsx:53
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:86
msgid "Your tokens will be shown here once you create them."
msgstr "Your tokens will be shown here once you create them."

View File

@@ -2,8 +2,8 @@ import type { ReadonlyRequestCookies } from 'next/dist/server/web/spec-extension
import type { I18n } from '@lingui/core';
import { IS_APP_WEB } from '../constants/app';
import type { SupportedLanguageCodes } from '../constants/i18n';
import { IS_APP_WEB, IS_APP_WEB_I18N_ENABLED } from '../constants/app';
import type { I18nLocaleData, SupportedLanguageCodes } from '../constants/i18n';
import { APP_I18N_OPTIONS } from '../constants/i18n';
export async function dynamicActivate(i18nInstance: I18n, locale: string) {
@@ -14,48 +14,58 @@ export async function dynamicActivate(i18nInstance: I18n, locale: string) {
i18nInstance.loadAndActivate({ locale, messages });
}
/**
* Extract the language if supported from the cookies header.
*
* Returns `null` if not supported or not found.
*/
export const extractSupportedLanguageFromCookies = (
cookies: ReadonlyRequestCookies,
): SupportedLanguageCodes | null => {
const preferredLanguage = cookies.get('i18n');
const foundSupportedLanguage = APP_I18N_OPTIONS.supportedLangs.find(
(lang): lang is SupportedLanguageCodes => lang === preferredLanguage?.value,
);
return foundSupportedLanguage || null;
};
/**
* Extracts the language from the `accept-language` header.
*
* Returns `null` if not supported or not found.
*/
export const extractSupportedLanguageFromHeaders = (
headers: Headers,
): SupportedLanguageCodes | null => {
const locales = headers.get('accept-language') ?? '';
const [locale] = locales.split(',');
// Convert locale to language.
const [language] = locale.split('-');
const parseLanguageFromLocale = (locale: string): SupportedLanguageCodes | null => {
const [language, _country] = locale.split('-');
const foundSupportedLanguage = APP_I18N_OPTIONS.supportedLangs.find(
(lang): lang is SupportedLanguageCodes => lang === language,
);
return foundSupportedLanguage || null;
if (!foundSupportedLanguage) {
return null;
}
return foundSupportedLanguage;
};
type ExtractSupportedLanguageOptions = {
headers?: Headers;
cookies?: ReadonlyRequestCookies;
/**
* Extract the language if supported from the cookies header.
*
* Returns `null` if not supported or not found.
*/
export const extractLocaleDataFromCookies = (
cookies: ReadonlyRequestCookies,
): SupportedLanguageCodes | null => {
const preferredLocale = cookies.get('i18n')?.value || '';
const language = parseLanguageFromLocale(preferredLocale || '');
if (!language) {
return null;
}
return language;
};
/**
* Extracts the language from the `accept-language` header.
*/
export const extractLocaleDataFromHeaders = (
headers: Headers,
): { lang: SupportedLanguageCodes | null; locales: string[] } => {
const headerLocales = (headers.get('accept-language') ?? '').split(',');
const language = parseLanguageFromLocale(headerLocales[0]);
return {
lang: language,
locales: [headerLocales[0]],
};
};
type ExtractLocaleDataOptions = {
headers: Headers;
cookies: ReadonlyRequestCookies;
};
/**
@@ -63,25 +73,25 @@ type ExtractSupportedLanguageOptions = {
*
* Will return the default fallback language if not found.
*/
export const extractSupportedLanguage = ({
export const extractLocaleData = ({
headers,
cookies,
}: ExtractSupportedLanguageOptions): SupportedLanguageCodes => {
if (cookies) {
const langCookie = extractSupportedLanguageFromCookies(cookies);
}: ExtractLocaleDataOptions): I18nLocaleData => {
let lang: SupportedLanguageCodes | null = extractLocaleDataFromCookies(cookies);
if (langCookie) {
return langCookie;
}
const langHeader = extractLocaleDataFromHeaders(headers);
if (!lang && langHeader?.lang) {
lang = langHeader.lang;
}
if (headers) {
const langHeader = extractSupportedLanguageFromHeaders(headers);
if (langHeader) {
return langHeader;
}
// Override web app to be English.
if (!IS_APP_WEB_I18N_ENABLED && IS_APP_WEB) {
lang = 'en';
}
return APP_I18N_OPTIONS.sourceLang;
return {
lang: lang || APP_I18N_OPTIONS.sourceLang,
locales: langHeader.locales,
};
};

View File

@@ -28,9 +28,18 @@ export const signWithLocalCert = async ({ pdf }: SignWithLocalCertOptions) => {
}
if (!cert) {
cert = Buffer.from(
fs.readFileSync(process.env.NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH || './example/cert.p12'),
);
let certPath = process.env.NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH || '/opt/documenso/cert.p12';
// We don't want to make the development server suddenly crash when using the `dx` script
// so we retain this when NODE_ENV isn't set to production which it should be in most production
// deployments.
//
// Our docker image automatically sets this so it shouldn't be an issue for self-hosters.
if (process.env.NODE_ENV !== 'production') {
certPath = process.env.NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH || './example/cert.p12';
}
cert = Buffer.from(fs.readFileSync(certPath));
}
const signature = signWithP12({

View File

@@ -0,0 +1,35 @@
import Link from 'next/link';
import { Button } from '../primitives/button';
import { Card, CardContent } from '../primitives/card';
type CallToActionProps = {
className?: string;
utmSource?: string;
};
export const CallToAction = ({ className, utmSource = 'generic-cta' }: CallToActionProps) => {
return (
<Card spotlight className={className}>
<CardContent className="flex flex-col items-center justify-center p-12">
<h2 className="text-center text-2xl font-bold">Looking for the managed solution?</h2>
<p className="text-muted-foreground mt-4 max-w-[55ch] text-center leading-normal">
You can get started with Documenso in minutes. We handle the infrastructure, so you can
focus on signing documents.
</p>
<Button
className="focus-visible:ring-ring ring-offset-background bg-primary text-primary-foreground hover:bg-primary/90text-sm mt-8 inline-flex items-center justify-center rounded-full border font-medium no-underline transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
variant="default"
size="lg"
asChild
>
<Link href={`https://app.documenso.com/signup?utm_source=${utmSource}`} target="_blank">
Get started
</Link>
</Button>
</CardContent>
</Card>
);
};

View File

@@ -155,17 +155,7 @@ export const FieldAdvancedSettings = forwardRef<HTMLDivElement, FieldAdvancedSet
const doesFieldExist = (!!document || !!template) && field.nativeId !== undefined;
const { data: fieldData } = trpc.field.getField.useQuery(
{
fieldId: Number(field.nativeId),
teamId,
},
{
enabled: doesFieldExist,
},
);
const fieldMeta = fieldData?.fieldMeta;
const fieldMeta = field?.fieldMeta;
const localStorageKey = `field_${field.formId}_${field.type}`;

View File

@@ -9,6 +9,13 @@ import type { StrokeOptions } from 'perfect-freehand';
import { getStroke } from 'perfect-freehand';
import { unsafe_useEffectOnce } from '@documenso/lib/client-only/hooks/use-effect-once';
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@documenso/ui/primitives/select';
import { cn } from '../../lib/utils';
import { getSvgPathFromStroke } from './helper';
@@ -36,6 +43,7 @@ export const SignaturePad = ({
const [isPressed, setIsPressed] = useState(false);
const [lines, setLines] = useState<Point[][]>([]);
const [currentLine, setCurrentLine] = useState<Point[]>([]);
const [selectedColor, setSelectedColor] = useState('black');
const perfectFreehandOptions = useMemo(() => {
const size = $el.current ? Math.min($el.current.height, $el.current.width) * 0.03 : 10;
@@ -85,6 +93,7 @@ export const SignaturePad = ({
ctx.restore();
ctx.imageSmoothingEnabled = true;
ctx.imageSmoothingQuality = 'high';
ctx.fillStyle = selectedColor;
lines.forEach((line) => {
const pathData = new Path2D(
@@ -129,6 +138,7 @@ export const SignaturePad = ({
ctx.imageSmoothingEnabled = true;
ctx.imageSmoothingQuality = 'high';
ctx.fillStyle = selectedColor;
newLines.forEach((line) => {
const pathData = new Path2D(
@@ -237,7 +247,13 @@ export const SignaturePad = ({
>
<canvas
ref={$el}
className={cn('relative block dark:invert', className)}
className={cn(
'relative block',
{
'dark:hue-rotate-180 dark:invert': selectedColor === 'black',
},
className,
)}
style={{ touchAction: 'none' }}
onPointerMove={(event) => onMouseMove(event)}
onPointerDown={(event) => onMouseDown(event)}
@@ -247,6 +263,44 @@ export const SignaturePad = ({
{...props}
/>
<div className="text-foreground absolute right-2 top-2 filter">
<Select defaultValue={selectedColor} onValueChange={(value) => setSelectedColor(value)}>
<SelectTrigger className="h-auto w-auto border-none p-1">
<SelectValue placeholder="" />
</SelectTrigger>
<SelectContent className="w-[150px]" align="end">
<SelectItem value="black">
<div className="text-muted-foreground flex items-center px-1 text-sm">
<div className="border-border mr-2 h-5 w-5 rounded-full border-2 bg-black shadow-sm" />
<Trans>Black</Trans>
</div>
</SelectItem>
<SelectItem value="red">
<div className="text-muted-foreground flex items-center px-1 text-sm">
<div className="border-border mr-2 h-5 w-5 rounded-full border-2 bg-[red] shadow-sm" />
<Trans>Red</Trans>
</div>
</SelectItem>
<SelectItem value="blue">
<div className="text-muted-foreground flex items-center px-1 text-sm">
<div className="border-border mr-2 h-5 w-5 rounded-full border-2 bg-[blue] shadow-sm" />
<Trans>Blue</Trans>
</div>
</SelectItem>
<SelectItem value="green">
<div className="text-muted-foreground flex items-center px-1 text-sm">
<div className="border-border mr-2 h-5 w-5 rounded-full border-2 bg-[green] shadow-sm" />
<Trans>Green</Trans>
</div>
</SelectItem>
</SelectContent>
</Select>
</div>
<div className="absolute bottom-4 right-4 flex gap-2">
<button
type="button"

View File

@@ -157,6 +157,38 @@ export const AddTemplateFieldsFormPartial = ({
selectedSignerIndex === -1 ? 0 : selectedSignerIndex,
);
const filterFieldsWithEmptyValues = (fields: typeof localFields, fieldType: string) =>
fields
.filter((field) => field.type === fieldType)
.filter((field) => {
if (field.fieldMeta && 'values' in field.fieldMeta) {
return field.fieldMeta.values?.length === 0;
}
return true;
});
const emptyCheckboxFields = useMemo(
() => filterFieldsWithEmptyValues(localFields, FieldType.CHECKBOX),
// eslint-disable-next-line react-hooks/exhaustive-deps
[localFields],
);
const emptyRadioFields = useMemo(
() => filterFieldsWithEmptyValues(localFields, FieldType.RADIO),
// eslint-disable-next-line react-hooks/exhaustive-deps
[localFields],
);
const emptySelectFields = useMemo(
() => filterFieldsWithEmptyValues(localFields, FieldType.DROPDOWN),
// eslint-disable-next-line react-hooks/exhaustive-deps
[localFields],
);
const hasErrors =
emptyCheckboxFields.length > 0 || emptyRadioFields.length > 0 || emptySelectFields.length > 0;
const [isFieldWithinBounds, setIsFieldWithinBounds] = useState(false);
const [coords, setCoords] = useState({
x: 0,
@@ -789,6 +821,24 @@ export const AddTemplateFieldsFormPartial = ({
</div>
</DocumentFlowFormContainerContent>
{hasErrors && (
<div className="mt-4">
<ul>
<li className="text-sm text-red-500">
<Trans>
To proceed further, please set at least one value for the{' '}
{emptyCheckboxFields.length > 0
? 'Checkbox'
: emptyRadioFields.length > 0
? 'Radio'
: 'Select'}{' '}
field.
</Trans>
</li>
</ul>
</div>
)}
<DocumentFlowFormContainerFooter>
<DocumentFlowFormContainerStep step={currentStep} maxStep={totalSteps} />
@@ -796,6 +846,7 @@ export const AddTemplateFieldsFormPartial = ({
loading={isSubmitting}
disabled={isSubmitting}
goNextLabel={msg`Save Template`}
disableNextStep={hasErrors}
onGoBackClick={() => {
previousStep();
remove();

View File

@@ -43,6 +43,8 @@ services:
envVarKey: RENDER_EXTERNAL_URL
- key: NEXT_PUBLIC_MARKETING_URL
value: 'http://localhost:3001'
- key: NEXT_PRIVATE_INTERNAL_WEBAPP_URL
value: 'http://localhost:10000'
# SMTP
- key: NEXT_PRIVATE_SMTP_TRANSPORT

View File

@@ -48,6 +48,7 @@
"NEXT_PUBLIC_PROJECT",
"NEXT_PUBLIC_WEBAPP_URL",
"NEXT_PUBLIC_MARKETING_URL",
"NEXT_PRIVATE_INTERNAL_WEBAPP_URL",
"NEXT_PUBLIC_POSTHOG_KEY",
"NEXT_PUBLIC_FEATURE_BILLING_ENABLED",
"NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID",