Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat:updates mobile
Iuliia Shnai61dc1203f70b
diff --git a/components/layouts/mobile-dataroom-more-menu.tsx b/components/layouts/mobile-dataroom-more-menu.tsxindex a46f4473..ca04e88a 100644--- a/components/layouts/mobile-dataroom-more-menu.tsx+++ b/components/layouts/mobile-dataroom-more-menu.tsx@@ -22,6 +22,7 @@ import {XIcon,} from "lucide-react";+import { usePlan } from "@/lib/swr/use-billing";import useLimits from "@/lib/swr/use-limits";import { cn } from "@/lib/utils";@@ -53,6 +54,7 @@ export function MobileDataroomMoreMenu({dataroomId,}: MobileDataroomMoreMenuProps) {const router = useRouter();+ const { isTrial } = usePlan();const { limits } = useLimits();const [settingsExpanded, setSettingsExpanded] = useState(() =>router.pathname.includes("/settings"),@@ -315,6 +317,18 @@ export function MobileDataroomMoreMenu({</div>)}</div>++ {isTrial && (+ <div className="mt-4">+ <Link+ href="/settings/upgrade?view=datarooms"+ onClick={onClose}+ className="flex w-full items-center justify-center rounded-lg bg-foreground px-4 py-3 text-sm font-medium text-background transition-colors hover:bg-foreground/90"+ >+ Upgrade Plan+ </Link>+ </div>+ )}</div></div></div>diff --git a/components/layouts/mobile-more-menu.tsx b/components/layouts/mobile-more-menu.tsxindex 631400a9..63232a7a 100644--- a/components/layouts/mobile-more-menu.tsx+++ b/components/layouts/mobile-more-menu.tsx@@ -232,6 +232,17 @@ export function MobileMoreMenu({ open, onClose }: MobileMoreMenuProps) {</div>)}+ {isTrial && (+ <div className="mt-4">+ <Link+ href="/settings/upgrade?view=business-datarooms"+ onClick={onClose}+ className="flex w-full items-center justify-center rounded-lg bg-foreground px-4 py-3 text-sm font-medium text-background transition-colors hover:bg-foreground/90"+ >+ Upgrade Plan+ </Link>+ </div>+ )}{isFree && !isTrial && (<div className="mt-4"><Linkdiff --git a/components/layouts/trial-banner.tsx b/components/layouts/trial-banner.tsxindex 71ef6d54..dd1ec80e 100644--- a/components/layouts/trial-banner.tsx+++ b/components/layouts/trial-banner.tsx@@ -67,7 +67,7 @@ function TrialBannerComponent({const isExpired = trialDaysLeft <= 0;return (- <div className="mx-2 my-2 mb-2">+ <div className="mx-2 my-2 mb-2 hidden md:block"><Alertvariant="default"className={@@ -75,12 +75,12 @@ function TrialBannerComponent({}><CrownIcon className="h-4 w-4" />- <AlertTitle>+ <AlertTitle className="pr-6">{isExpired? "Your Data Room trial has expired": `Data Room trial: ${trialDaysLeft} days left`}</AlertTitle>- <AlertDescription>+ <AlertDescription className="pr-6">{isExpired ? (<><UpgradePlanModal@@ -91,23 +91,22 @@ function TrialBannerComponent({Upgrade to keep access</span></UpgradePlanModal>{" "}- to unlimited data rooms, custom domains, advanced access controls,- and granular file permissions ✨+ to unlimited data rooms, custom domains, and granular permissions</>) : (<>- You are on the <span className="font-bold">Data Rooms</span> plan- trial, you have access to advanced access controls, granular file- permissions, and data room. <br />+ You're on the{" "}+ <span className="font-bold">Data Rooms</span> trial.{" "}<UpgradePlanModalclickedPlan={PlanEnum.DataRooms}trigger={"trial_navbar"}><span className="cursor-pointer font-bold text-orange-500 underline underline-offset-4 hover:text-orange-600">- Upgrade to keep access+ Upgrade</span>- </UpgradePlanModal>- , unlock unlimited data rooms and custom domains ✨+ </UpgradePlanModal>{" "}+ to keep unlimited data rooms, custom domains, and advanced access+ controls</>)}</AlertDescription>diff --git a/components/visitors/visitors-table.tsx b/components/visitors/visitors-table.tsxindex bf83771c..d692b506 100644--- a/components/visitors/visitors-table.tsx+++ b/components/visitors/visitors-table.tsx@@ -332,7 +332,10 @@ export default function VisitorsTable({<Collapsible key={view.id} asChild><><CollapsibleTrigger asChild>- <TableRow key={view.id} className="group/row">+ <TableRow+ key={view.id}+ className="group/row cursor-pointer [&[data-state=open]_.chevron]:rotate-180"+ >{/* Name */}<TableCell><div className="flex items-center overflow-visible sm:space-x-3">@@ -417,8 +420,9 @@ export default function VisitorsTable({</TableCell>{/* Duration */}<TableCell className="">- <div className="text-sm text-muted-foreground">- {durationFormat(view.totalDuration)}+ <div className="flex items-center space-x-1 text-sm text-muted-foreground">+ <span>{durationFormat(view.totalDuration)}</span>+ <ChevronDown className="chevron h-4 w-4 shrink-0 transition-transform duration-200" /></div></TableCell>{/* Completion */}@@ -450,41 +454,43 @@ export default function VisitorsTable({{/* Actions */}<TableCell className="text-center sm:text-right"><DropdownMenu>- <DropdownMenuTrigger asChild>- <Button- variant="ghost"- className="h-8 w-8 p-0 group-hover/row:ring-1 group-hover/row:ring-gray-200 group-hover/row:dark:ring-gray-700"- onClick={(e) => {- e.stopPropagation();- e.preventDefault();- }}- >- <span className="sr-only">Open menu</span>- <MoreHorizontalIcon className="h-4 w-4" />- </Button>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuLabel>Actions</DropdownMenuLabel>+ <DropdownMenuTrigger asChild>+ <Button+ variant="ghost"+ className="h-8 w-8 p-0 group-hover/row:ring-1 group-hover/row:ring-gray-200 group-hover/row:dark:ring-gray-700"+ onClick={(e) => {+ e.stopPropagation();+ e.preventDefault();+ }}+ >+ <span className="sr-only">Open menu</span>+ <MoreHorizontalIcon className="h-4 w-4" />+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuLabel>+ Actions+ </DropdownMenuLabel>- <DropdownMenuSeparator />- <DropdownMenuItem- className="text-destructive focus:bg-destructive focus:text-destructive-foreground"- onClick={(e) => {- e.stopPropagation();- e.preventDefault();- handleArchiveView(- view.id,- view.documentId ?? "",- view.isArchived,- );- }}- disabled={isLoading}- >- <ArchiveIcon className="mr-2 h-4 w-4" />- Archive- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>+ <DropdownMenuSeparator />+ <DropdownMenuItem+ className="text-destructive focus:bg-destructive focus:text-destructive-foreground"+ onClick={(e) => {+ e.stopPropagation();+ e.preventDefault();+ handleArchiveView(+ view.id,+ view.documentId ?? "",+ view.isArchived,+ );+ }}+ disabled={isLoading}+ >+ <ArchiveIcon className="mr-2 h-4 w-4" />+ Archive+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu></TableCell></TableRow></CollapsibleTrigger>