-
+
{template.publicTitle}
-
{template.publicDescription}
+
{template.publicDescription}
diff --git a/apps/remix/app/components/tables/settings-security-activity-table.tsx b/apps/remix/app/components/tables/settings-security-activity-table.tsx
index 18bba7d62..79cb0fc66 100644
--- a/apps/remix/app/components/tables/settings-security-activity-table.tsx
+++ b/apps/remix/app/components/tables/settings-security-activity-table.tsx
@@ -1,12 +1,3 @@
-import { useMemo } from 'react';
-
-import { msg } from '@lingui/core/macro';
-import { useLingui } from '@lingui/react';
-import type { DateTimeFormatOptions } from 'luxon';
-import { DateTime } from 'luxon';
-import { useLocation, useNavigate, useSearchParams } from 'react-router';
-import { UAParser } from 'ua-parser-js';
-
import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params';
import { USER_SECURITY_AUDIT_LOG_MAP } from '@documenso/lib/constants/auth';
import { ZUrlSearchParamsSchema } from '@documenso/lib/types/search-params';
@@ -16,6 +7,13 @@ import { DataTable } from '@documenso/ui/primitives/data-table';
import { DataTablePagination } from '@documenso/ui/primitives/data-table-pagination';
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
+import { msg } from '@lingui/core/macro';
+import { useLingui } from '@lingui/react';
+import type { DateTimeFormatOptions } from 'luxon';
+import { DateTime } from 'luxon';
+import { useMemo } from 'react';
+import { useLocation, useNavigate, useSearchParams } from 'react-router';
+import { UAParser } from 'ua-parser-js';
const dateFormat: DateTimeFormatOptions = {
...DateTime.DATETIME_SHORT,
diff --git a/apps/remix/app/components/tables/settings-security-passkey-table-actions.tsx b/apps/remix/app/components/tables/settings-security-passkey-table-actions.tsx
index c14ae8036..7feb0e191 100644
--- a/apps/remix/app/components/tables/settings-security-passkey-table-actions.tsx
+++ b/apps/remix/app/components/tables/settings-security-passkey-table-actions.tsx
@@ -1,12 +1,3 @@
-import { useState } from 'react';
-
-import { zodResolver } from '@hookform/resolvers/zod';
-import { msg } from '@lingui/core/macro';
-import { useLingui } from '@lingui/react';
-import { Trans } from '@lingui/react/macro';
-import { useForm } from 'react-hook-form';
-import { z } from 'zod';
-
import { trpc } from '@documenso/trpc/react';
import { cn } from '@documenso/ui/lib/utils';
import { Button } from '@documenso/ui/primitives/button';
@@ -20,16 +11,16 @@ import {
DialogTitle,
DialogTrigger,
} from '@documenso/ui/primitives/dialog';
-import {
- Form,
- FormControl,
- FormField,
- FormItem,
- FormLabel,
- FormMessage,
-} from '@documenso/ui/primitives/form/form';
+import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form';
import { Input } from '@documenso/ui/primitives/input';
import { useToast } from '@documenso/ui/primitives/use-toast';
+import { zodResolver } from '@hookform/resolvers/zod';
+import { msg } from '@lingui/core/macro';
+import { useLingui } from '@lingui/react';
+import { Trans } from '@lingui/react/macro';
+import { useState } from 'react';
+import { useForm } from 'react-hook-form';
+import { z } from 'zod';
export type SettingsSecurityPasskeyTableActionsProps = {
className?: string;
@@ -61,56 +52,47 @@ export const SettingsSecurityPasskeyTableActions = ({
},
});
- const { mutateAsync: updatePasskey, isPending: isUpdatingPasskey } =
- trpc.auth.passkey.update.useMutation({
- onSuccess: () => {
- toast({
- title: _(msg`Success`),
- description: _(msg`Passkey has been updated`),
- });
+ const { mutateAsync: updatePasskey, isPending: isUpdatingPasskey } = trpc.auth.passkey.update.useMutation({
+ onSuccess: () => {
+ toast({
+ title: _(msg`Success`),
+ description: _(msg`Passkey has been updated`),
+ });
- setIsUpdateDialogOpen(false);
- },
- onError: () => {
- toast({
- title: _(msg`Something went wrong`),
- description: _(
- msg`We are unable to update this passkey at the moment. Please try again later.`,
- ),
- duration: 10000,
- variant: 'destructive',
- });
- },
- });
+ setIsUpdateDialogOpen(false);
+ },
+ onError: () => {
+ toast({
+ title: _(msg`Something went wrong`),
+ description: _(msg`We are unable to update this passkey at the moment. Please try again later.`),
+ duration: 10000,
+ variant: 'destructive',
+ });
+ },
+ });
- const { mutateAsync: deletePasskey, isPending: isDeletingPasskey } =
- trpc.auth.passkey.delete.useMutation({
- onSuccess: () => {
- toast({
- title: _(msg`Success`),
- description: _(msg`Passkey has been removed`),
- });
+ const { mutateAsync: deletePasskey, isPending: isDeletingPasskey } = trpc.auth.passkey.delete.useMutation({
+ onSuccess: () => {
+ toast({
+ title: _(msg`Success`),
+ description: _(msg`Passkey has been removed`),
+ });
- setIsDeleteDialogOpen(false);
- },
- onError: () => {
- toast({
- title: _(msg`Something went wrong`),
- description: _(
- msg`We are unable to remove this passkey at the moment. Please try again later.`,
- ),
- duration: 10000,
- variant: 'destructive',
- });
- },
- });
+ setIsDeleteDialogOpen(false);
+ },
+ onError: () => {
+ toast({
+ title: _(msg`Something went wrong`),
+ description: _(msg`We are unable to remove this passkey at the moment. Please try again later.`),
+ duration: 10000,
+ variant: 'destructive',
+ });
+ },
+ });
return (
-
!isUpdatingPasskey && setIsUpdateDialogOpen(value)}
- >
+ !isUpdatingPasskey && setIsUpdateDialogOpen(value)}>
e.stopPropagation()} asChild>
Edit
@@ -173,10 +155,7 @@ export const SettingsSecurityPasskeyTableActions = ({
- !isDeletingPasskey && setIsDeleteDialogOpen(value)}
- >
+ !isDeletingPasskey && setIsDeleteDialogOpen(value)}>
e.stopPropagation()} asChild={true}>
Delete
diff --git a/apps/remix/app/components/tables/settings-security-passkey-table.tsx b/apps/remix/app/components/tables/settings-security-passkey-table.tsx
index b2fe09621..33b566956 100644
--- a/apps/remix/app/components/tables/settings-security-passkey-table.tsx
+++ b/apps/remix/app/components/tables/settings-security-passkey-table.tsx
@@ -1,10 +1,3 @@
-import { useMemo } from 'react';
-
-import { msg } from '@lingui/core/macro';
-import { useLingui } from '@lingui/react';
-import { DateTime } from 'luxon';
-import { useLocation, useNavigate, useSearchParams } from 'react-router';
-
import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params';
import { ZUrlSearchParamsSchema } from '@documenso/lib/types/search-params';
import { trpc } from '@documenso/trpc/react';
@@ -13,6 +6,11 @@ import { DataTable } from '@documenso/ui/primitives/data-table';
import { DataTablePagination } from '@documenso/ui/primitives/data-table-pagination';
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
+import { msg } from '@lingui/core/macro';
+import { useLingui } from '@lingui/react';
+import { DateTime } from 'luxon';
+import { useMemo } from 'react';
+import { useLocation, useNavigate, useSearchParams } from 'react-router';
import { SettingsSecurityPasskeyTableActions } from './settings-security-passkey-table-actions';
@@ -66,9 +64,7 @@ export const SettingsSecurityPasskeyTable = () => {
header: _(msg`Last used`),
accessorKey: 'updatedAt',
cell: ({ row }) =>
- row.original.lastUsedAt
- ? DateTime.fromJSDate(row.original.lastUsedAt).toRelative()
- : _(msg`Never`),
+ row.original.lastUsedAt ? DateTime.fromJSDate(row.original.lastUsedAt).toRelative() : _(msg`Never`),
},
{
id: 'actions',
diff --git a/apps/remix/app/components/tables/team-groups-table.tsx b/apps/remix/app/components/tables/team-groups-table.tsx
index 3bbf072b4..4ad463cbf 100644
--- a/apps/remix/app/components/tables/team-groups-table.tsx
+++ b/apps/remix/app/components/tables/team-groups-table.tsx
@@ -1,12 +1,3 @@
-import { useMemo } from 'react';
-
-import { msg } from '@lingui/core/macro';
-import { useLingui } from '@lingui/react';
-import { Trans } from '@lingui/react/macro';
-import { OrganisationGroupType } from '@prisma/client';
-import { EditIcon, MoreHorizontalIcon, Trash2Icon } from 'lucide-react';
-import { useSearchParams } from 'react-router';
-
import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params';
import { EXTENDED_TEAM_MEMBER_ROLE_MAP } from '@documenso/lib/constants/teams-translations';
import { ZUrlSearchParamsSchema } from '@documenso/lib/types/search-params';
@@ -23,6 +14,13 @@ import {
} from '@documenso/ui/primitives/dropdown-menu';
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
+import { msg } from '@lingui/core/macro';
+import { useLingui } from '@lingui/react';
+import { Trans } from '@lingui/react/macro';
+import { OrganisationGroupType } from '@prisma/client';
+import { EditIcon, MoreHorizontalIcon, Trash2Icon } from 'lucide-react';
+import { useMemo } from 'react';
+import { useSearchParams } from 'react-router';
import { useCurrentTeam } from '~/providers/team';
@@ -86,7 +84,7 @@ export const TeamGroupsTable = () => {
cell: ({ row }) => (
-
+
@@ -99,10 +97,7 @@ export const TeamGroupsTable = () => {
teamGroupName={row.original.name ?? ''}
teamGroupRole={row.original.teamRole}
trigger={
- e.preventDefault()}
- title="Update team group role"
- >
+ e.preventDefault()} title="Update team group role">
Update role
@@ -139,7 +134,7 @@ export const TeamGroupsTable = () => {
enable: isLoadingError,
}}
emptyState={
-
+
No team groups found
@@ -173,11 +168,7 @@ export const TeamGroupsTable = () => {
),
}}
>
- {(table) =>
- results.totalPages > 1 && (
-
- )
- }
+ {(table) => results.totalPages > 1 &&
}
);
};
diff --git a/apps/remix/app/components/tables/team-members-table.tsx b/apps/remix/app/components/tables/team-members-table.tsx
index 02771c322..c8a9f0faa 100644
--- a/apps/remix/app/components/tables/team-members-table.tsx
+++ b/apps/remix/app/components/tables/team-members-table.tsx
@@ -1,12 +1,3 @@
-import { useMemo } from 'react';
-
-import { msg } from '@lingui/core/macro';
-import { useLingui } from '@lingui/react';
-import { Trans } from '@lingui/react/macro';
-import { OrganisationGroupType, OrganisationMemberRole } from '@prisma/client';
-import { EditIcon, MoreHorizontal, Trash2Icon } from 'lucide-react';
-import { useSearchParams } from 'react-router';
-
import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params';
import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation';
import { EXTENDED_TEAM_MEMBER_ROLE_MAP } from '@documenso/lib/constants/teams-translations';
@@ -28,6 +19,13 @@ import {
} from '@documenso/ui/primitives/dropdown-menu';
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
+import { msg } from '@lingui/core/macro';
+import { useLingui } from '@lingui/react';
+import { Trans } from '@lingui/react/macro';
+import { OrganisationGroupType, OrganisationMemberRole } from '@prisma/client';
+import { EditIcon, MoreHorizontal, Trash2Icon } from 'lucide-react';
+import { useMemo } from 'react';
+import { useSearchParams } from 'react-router';
import { useCurrentTeam } from '~/providers/team';
@@ -100,9 +98,7 @@ export const TeamMembersTable = () => {
{row.original.name}
- }
+ primaryText={{row.original.name} }
secondaryText={row.original.email}
/>
);
@@ -130,7 +126,7 @@ export const TeamMembersTable = () => {
cell: ({ row }) => (
-
+
@@ -231,9 +227,7 @@ export const TeamMembersTable = () => {
- {!groupQuery.isPending && (
-
- )}
+ {!groupQuery.isPending && }
);
diff --git a/apps/remix/app/components/tables/templates-table-action-dropdown.tsx b/apps/remix/app/components/tables/templates-table-action-dropdown.tsx
index beaf80a2d..8872a1a78 100644
--- a/apps/remix/app/components/tables/templates-table-action-dropdown.tsx
+++ b/apps/remix/app/components/tables/templates-table-action-dropdown.tsx
@@ -1,24 +1,3 @@
-import { useState } from 'react';
-
-import { Trans } from '@lingui/react/macro';
-import {
- DocumentStatus,
- EnvelopeType,
- type Recipient,
- type TemplateDirectLink,
-} from '@prisma/client';
-import {
- Copy,
- Edit,
- FolderIcon,
- MoreHorizontal,
- Pencil,
- Share2Icon,
- Trash2,
- Upload,
-} from 'lucide-react';
-import { Link } from 'react-router';
-
import type { TRecipientLite } from '@documenso/lib/types/recipient';
import { trpc as trpcReact } from '@documenso/trpc/react';
import {
@@ -28,8 +7,14 @@ import {
DropdownMenuLabel,
DropdownMenuTrigger,
} from '@documenso/ui/primitives/dropdown-menu';
+import { Trans } from '@lingui/react/macro';
+import { DocumentStatus, EnvelopeType, type TemplateDirectLink } from '@prisma/client';
+import { Copy, Download, Edit, FolderIcon, MoreHorizontal, Pencil, Share2Icon, Trash2, Upload } from 'lucide-react';
+import { useState } from 'react';
+import { Link } from 'react-router';
import { EnvelopeDeleteDialog } from '../dialogs/envelope-delete-dialog';
+import { EnvelopeDownloadDialog } from '../dialogs/envelope-download-dialog';
import { EnvelopeDuplicateDialog } from '../dialogs/envelope-duplicate-dialog';
import { EnvelopeRenameDialog } from '../dialogs/envelope-rename-dialog';
import { TemplateBulkSendDialog } from '../dialogs/template-bulk-send-dialog';
@@ -77,87 +62,94 @@ export const TemplatesTableActionDropdown = ({
Action
-
-
-
- Edit
-
-
-
- {canMutate && (
- setRenameDialogOpen(true)}>
-
- Rename
-
- )}
-
- {canMutate && (
- e.preventDefault()}>
-
-
- Duplicate
-
-
- }
- />
- )}
-
- {canMutate && (
-
-
- Direct link
+ e.preventDefault()}>
+
+
+ Download
- }
- />
- )}
-
- setMoveToFolderDialogOpen(true)}>
-
- Move to Folder
-
+
+ }
+ />
{canMutate && (
-
-
- Bulk Send via CSV
-
- }
- />
- )}
+ <>
+
+
+
+ Edit
+
+
- {canMutate && (
- e.preventDefault()}>
-
-
-
Delete
+
setRenameDialogOpen(true)}>
+
+ Rename
+
+
+
e.preventDefault()}>
+
+
+ Duplicate
+
+
+ }
+ />
+
+
+
+ Direct link
-
- }
- />
+ }
+ />
+
+ setMoveToFolderDialogOpen(true)}>
+
+ Move to Folder
+
+
+
+
+ Bulk Send via CSV
+
+ }
+ />
+
+
e.preventDefault()}>
+
+
+ Delete
+
+
+ }
+ />
+ >
)}
diff --git a/apps/remix/app/components/tables/templates-table.tsx b/apps/remix/app/components/tables/templates-table.tsx
index 46240d4ca..cc7754ffd 100644
--- a/apps/remix/app/components/tables/templates-table.tsx
+++ b/apps/remix/app/components/tables/templates-table.tsx
@@ -1,19 +1,3 @@
-import { useMemo, useTransition } from 'react';
-
-import { msg } from '@lingui/core/macro';
-import { useLingui } from '@lingui/react';
-import { Trans } from '@lingui/react/macro';
-import {
- AlertTriangle,
- Building2Icon,
- Globe2Icon,
- InfoIcon,
- Link2Icon,
- Loader,
- LockIcon,
-} from 'lucide-react';
-import { Link } from 'react-router';
-
import { useLimits } from '@documenso/ee/server-only/limits/provider/client';
import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params';
import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation';
@@ -27,6 +11,12 @@ import { DataTablePagination } from '@documenso/ui/primitives/data-table-paginat
import { Skeleton } from '@documenso/ui/primitives/skeleton';
import { TableCell } from '@documenso/ui/primitives/table';
import { Tooltip, TooltipContent, TooltipTrigger } from '@documenso/ui/primitives/tooltip';
+import { msg } from '@lingui/core/macro';
+import { useLingui } from '@lingui/react';
+import { Trans } from '@lingui/react/macro';
+import { AlertTriangle, Building2Icon, Globe2Icon, InfoIcon, Link2Icon, Loader, LockIcon } from 'lucide-react';
+import { useMemo, useTransition } from 'react';
+import { Link } from 'react-router';
import { TemplateType } from '~/components/general/template/template-type';
import { useCurrentTeam } from '~/providers/team';
@@ -128,7 +118,7 @@ export const TemplatesTable = ({
-
+
@@ -138,8 +128,8 @@ export const TemplatesTable = ({
- 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.
@@ -151,9 +141,8 @@ export const TemplatesTable = ({
- 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.
@@ -165,10 +154,7 @@ export const TemplatesTable = ({
{team?.id ? (
-
- 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.
) : (
Private templates can only be modified and viewed by you.
)}
@@ -182,8 +168,8 @@ export const TemplatesTable = ({
- Organisation templates are shared across all teams within the same
- organisation. Only the owning team can edit them.
+ Organisation templates are shared across all teams within the same organisation. Only the owning
+ team can edit them.
@@ -201,9 +187,7 @@ export const TemplatesTable = ({
{isFromOtherTeam && row.original.team?.name && (
-
- ({row.original.team.name})
-
+ ({row.original.team.name})
)}
{row.original.directLink?.token && (
@@ -232,11 +216,7 @@ export const TemplatesTable = ({
documentRootPath={documentRootPath}
/>
-
+
);
},
@@ -273,10 +253,7 @@ export const TemplatesTable = ({