Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat:updates

Iuliia Shnai8b507a5708c2
diff --git a/components/datarooms/groups/group-member-table.tsx b/components/datarooms/groups/group-member-table.tsx
index 8960aeef..8a71cae0 100644
--- a/components/datarooms/groups/group-member-table.tsx
+++ b/components/datarooms/groups/group-member-table.tsx
@@ -194,7 +194,7 @@ export default function GroupMemberTable({
<TableRow>
<TableCell colSpan={2}>
<div className="flex h-40 w-full items-center justify-center">
- <p>No Data Available</p>
+ <p>No visits yet. Share link first</p>
</div>
</TableCell>
</TableRow>
diff --git a/components/links/links-table.tsx b/components/links/links-table.tsx
index c7e6bcea..a33e9cd2 100644
--- a/components/links/links-table.tsx
+++ b/components/links/links-table.tsx
@@ -1,7 +1,7 @@
import { useSearchParams } from "next/navigation";
import { useRouter } from "next/router";
-import { useMemo, useState } from "react";
+import { useMemo, useState, useRef } from "react";
import { useTeam } from "@/context/team-context";
import { PlanEnum } from "@/ee/stripe/constants";
@@ -61,6 +61,7 @@ import LinkSheet, {
} from "./link-sheet";
import { TagColumn } from "./link-sheet/tags/tag-details";
import LinksVisitors from "./links-visitors";
+import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
export default function LinksTable({
targetType,
@@ -142,6 +143,8 @@ export default function LinksTable({
id: string;
name: string;
} | null>(null);
+ const [popoverOpen, setPopoverOpen] = useState<string | null>(null);
+ const hoverTimeout = useRef<NodeJS.Timeout | null>(null);
const handleCopyToClipboard = (linkString: string) => {
copyToClipboard(`${linkString}`, "Link copied to clipboard.");
@@ -461,9 +464,9 @@ export default function LinksTable({
: `${process.env.NEXT_PUBLIC_MARKETING_URL}/view/${link.id}`,
)
}
- title="Copy to clipboard"
+ title="Copy & Share"
>
- Copy to Clipboard
+ Copy & Share
</button>
)}
</div>
@@ -478,18 +481,68 @@ export default function LinksTable({
<EyeIcon className="h-5 w-5 text-gray-400 group-hover:text-gray-500" />
</Button>
</ButtonTooltip>
- <ButtonTooltip content="Edit link">
- <Button
- variant="link"
- size="icon"
- className="group h-7 w-8"
- onClick={() => handleEditLink(link)}
- title="Edit link"
+ <Popover open={popoverOpen === link.id} onOpenChange={() => {}}>
+ <PopoverTrigger asChild>
+ <Button
+ variant="outline"
+ className="flex items-center gap-1 h-7 py-0.5"
+ onClick={() => handleEditLink(link)}
+ title="Edit link"
+ onMouseDown={e => e.preventDefault()}
+ onMouseEnter={() => {
+ hoverTimeout.current = setTimeout(() => setPopoverOpen(link.id), 250);
+ }}
+ onMouseLeave={() => {
+ if (hoverTimeout.current) clearTimeout(hoverTimeout.current);
+ setPopoverOpen(null);
+ }}
+ >
+ <Settings2Icon className="h-3 w-3 text-gray-400 hover:text-gray-500" />
+ <span className="font-semibold text-xs whitespace-nowrap text-gray-400 hover:text-gray-500">Edit link</span>
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent
+ side="bottom"
+ align="start"
+ className="w-56 p-0"
+ onMouseEnter={() => {
+ if (hoverTimeout.current) clearTimeout(hoverTimeout.current);
+ setPopoverOpen(link.id);
+ }}
+ onMouseLeave={() => {
+ if (hoverTimeout.current) clearTimeout(hoverTimeout.current);
+ setPopoverOpen(null);
+ }}
>
- <span className="sr-only">Edit link</span>
- <Settings2Icon className="h-5 w-5 text-gray-400 group-hover:text-gray-500" />
- </Button>
- </ButtonTooltip>
+ <div className="p-3">
+ <div className="font-semibold mb-2 text-sm">Active Link Settings</div>
+ <ul className="space-y-1 text-sm">
+ {link.emailProtected && (
+ <li className="flex items-center gap-2 text-gray-900">
+ <span className="inline-block w-2 h-2 rounded-full bg-green-400" />
+ Require email to view
+ </li>
+ )}
+ {link.enableNotification && (
+ <li className="flex items-center gap-2 text-gray-900">
+ <span className="inline-block w-2 h-2 rounded-full bg-green-400" />
+ Receive email notification
+ </li>
+ )}
+ {link.enableConversation && (
+ <li className="flex items-center gap-2 text-gray-900">
+ <span className="inline-block w-2 h-2 rounded-full bg-green-400" />
+ Show visitor statistics
+ </li>
+ )}
+ {/* Add more settings as needed */}
+ {!(link.emailProtected || link.enableNotification || link.enableConversation) && (
+ <li className="text-gray-400">No active settings</li>
+ )}
+ </ul>
+ </div>
+ </PopoverContent>
+ </Popover>
</TableCell>
{hasAnyTags ? (
<TableCell className="w-[250px] 2xl:w-auto">
diff --git a/components/view/dataroom/nav-dataroom.tsx b/components/view/dataroom/nav-dataroom.tsx
index 46c101db..0707415c 100644
--- a/components/view/dataroom/nav-dataroom.tsx
+++ b/components/view/dataroom/nav-dataroom.tsx
@@ -18,6 +18,8 @@ import { TooltipProvider } from "@/components/ui/tooltip";
import { Button } from "../../ui/button";
import { ConversationSidebar } from "../conversations/sidebar";
+const DEFAULT_BANNER_IMAGE = "/_static/papermark-banner.png";
+
export default function DataroomNav({
allowDownload,
brand,
@@ -131,9 +133,6 @@ export default function DataroomNav({
className="h-16 w-36 object-contain"
src={brand.logo}
alt="Logo"
- // fill
- // quality={100}
- // priority
/>
) : (
<Link
@@ -180,30 +179,28 @@ export default function DataroomNav({
</div>
</div>
</div>
- {brand && brand.banner ? (
- <div className="relative h-[30vh]">
- <img
- className="h-[30vh] w-full object-cover"
- src={brand.banner}
- alt="Banner"
- width={1920}
- height={320}
- // quality={100}
- // priority
- />
- <div className="absolute bottom-5 w-fit rounded-r-md bg-white/30 backdrop-blur-md">
- <div className="px-5 py-2 sm:px-10">
- <div className="text-3xl">{dataroom.name}</div>
- <time
- className="text-sm"
- dateTime={new Date(dataroom.lastUpdatedAt).toISOString()}
- >
- {`Last updated ${formatDate(dataroom.lastUpdatedAt)}`}
- </time>
- </div>
+
+ {/* Banner section */}
+ <div className="relative h-[30vh]">
+ <img
+ className="h-[30vh] w-full object-cover"
+ src={brand?.banner || DEFAULT_BANNER_IMAGE}
+ alt="Banner"
+ width={1920}
+ height={320}
+ />
+ <div className="absolute bottom-5 w-fit rounded-r-md bg-white/30 backdrop-blur-md">
+ <div className="px-5 py-2 sm:px-10">
+ <div className="text-3xl">{dataroom.name}</div>
+ <time
+ className="text-sm"
+ dateTime={new Date(dataroom.lastUpdatedAt).toISOString()}
+ >
+ {`Last updated ${formatDate(dataroom.lastUpdatedAt)}`}
+ </time>
</div>
</div>
- ) : null}
+ </div>
{conversationsEnabled && showConversations ? (
<ConversationSidebar
diff --git a/components/visitors/dataroom-visitors-table.tsx b/components/visitors/dataroom-visitors-table.tsx
index 3e633465..31d6f80d 100644
--- a/components/visitors/dataroom-visitors-table.tsx
+++ b/components/visitors/dataroom-visitors-table.tsx
@@ -2,6 +2,7 @@ import { useTeam } from "@/context/team-context";
import {
BadgeCheckIcon,
BadgeInfoIcon,
+ Download,
DownloadCloudIcon,
FileBadgeIcon,
MailOpenIcon,
@@ -82,11 +83,14 @@ export default function DataroomVisitorsTable({
}
};
+
+
return (
<div className="w-full">
<div className="mb-2 flex items-center justify-between md:mb-4">
<h2>All visitors</h2>
- <Button size="sm" onClick={() => exportVisitCounts(dataroomId)}>
+ <Button variant="outline" size="sm" onClick={() => exportVisitCounts(dataroomId)}>
+ <Download className="!size-4" />
Export visits
</Button>
</div>
@@ -106,7 +110,7 @@ export default function DataroomVisitorsTable({
<TableRow>
<TableCell colSpan={5}>
<div className="flex h-40 w-full items-center justify-center">
- <p>No Data Available</p>
+ <p>No visits yet. Share link first.</p>
</div>
</TableCell>
</TableRow>
diff --git a/components/visitors/visitors-table.tsx b/components/visitors/visitors-table.tsx
index 1d90abfd..f062af0b 100644
--- a/components/visitors/visitors-table.tsx
+++ b/components/visitors/visitors-table.tsx
@@ -149,7 +149,7 @@ export default function VisitorsTable({
<TableRow>
<TableCell colSpan={5}>
<div className="flex h-40 w-full items-center justify-center">
- <p>No Data Available</p>
+ <p>No visits yet. Share link first</p>
</div>
</TableCell>
</TableRow>
diff --git a/pages/datarooms/[id]/branding/index.tsx b/pages/datarooms/[id]/branding/index.tsx
index 56a59b2f..1b83b3dc 100644
--- a/pages/datarooms/[id]/branding/index.tsx
+++ b/pages/datarooms/[id]/branding/index.tsx
@@ -27,6 +27,8 @@ import { useDataroomBrand } from "@/lib/swr/use-brand";
import { useDataroom } from "@/lib/swr/use-dataroom";
import { cn, convertDataUrlToFile, uploadImage } from "@/lib/utils";
+const DEFAULT_BANNER_IMAGE = "/_static/papermark-banner.png";
+
export default function DataroomBrandPage() {
const router = useRouter();
const teamInfo = useTeam();
@@ -36,7 +38,7 @@ export default function DataroomBrandPage() {
const [brandColor, setBrandColor] = useState<string>("#000000");
const [accentColor, setAccentColor] = useState<string>("#FFFFFF");
const [logo, setLogo] = useState<string | null>(null);
- const [banner, setBanner] = useState<string | null>(null);
+ const [banner, setBanner] = useState<string | null>(DEFAULT_BANNER_IMAGE);
const [blobUrl, setBlobUrl] = useState<string | null>(null);
const [bannerBlobUrl, setBannerBlobUrl] = useState<string | null>(null);
@@ -101,7 +103,7 @@ export default function DataroomBrandPage() {
setBrandColor(brand.brandColor || "#000000");
setAccentColor(brand.accentColor || "#FFFFFF");
setLogo(brand.logo || null);
- setBanner(brand.banner || null);
+ setBanner(brand.banner || DEFAULT_BANNER_IMAGE);
}
}, [brand]);
@@ -174,7 +176,7 @@ export default function DataroomBrandPage() {
);
if (res.ok) {
setLogo(null);
- setBanner(null);
+ setBanner(DEFAULT_BANNER_IMAGE);
setBrandColor("#000000");
setIsLoading(false);
toast.success("Branding reset successfully");
diff --git a/pages/room_ppreview_demo.tsx b/pages/room_ppreview_demo.tsx
index 65a6c28a..be989f77 100644
--- a/pages/room_ppreview_demo.tsx
+++ b/pages/room_ppreview_demo.tsx
@@ -4,6 +4,8 @@ import { ViewFolderTree } from "@/components/datarooms/folders";
import DocumentCard from "@/components/view/dataroom/document-card";
import FolderCard from "@/components/view/dataroom/folder-card";
+const DEFAULT_BANNER_IMAGE = "/_static/papermark-banner.png";
+
export default function ViewPage() {
const router = useRouter();
const { brandLogo, brandColor, brandBanner } = router.query as {
@@ -40,23 +42,23 @@ export default function ViewPage() {
</div>
</div>
</div>
- {brandBanner && (
- <div className="relative h-[30vh]">
- <img
- className="h-[30vh] w-full object-cover"
- src={brandBanner}
- alt="Banner"
- width={1920}
- height={320}
- />
- <div className="absolute bottom-5 w-fit rounded-r-md bg-white/30 backdrop-blur-md">
- <div className="px-5 py-2 sm:px-10">
- <div className="text-3xl">Example Data Room</div>
- <time className="text-sm">Last updated 2 hours ago</time>
- </div>
+
+ {/* Banner section */}
+ <div className="relative h-[30vh]">
+ <img
+ className="h-[30vh] w-full object-cover"
+ src={brandBanner || DEFAULT_BANNER_IMAGE}
+ alt="Banner"
+ width={1920}
+ height={320}
+ />
+ <div className="absolute bottom-5 w-fit rounded-r-md bg-white/30 backdrop-blur-md">
+ <div className="px-5 py-2 sm:px-10">
+ <div className="text-3xl">Example Data Room</div>
+ <time className="text-sm">Last updated 2 hours ago</time>
</div>
</div>
- )}
+ </div>
</nav>
{/* Body */}
diff --git a/public/_static/papermark-banner.png b/public/_static/papermark-banner.png
new file mode 100644
index 00000000..ef5a5bef
Binary files /dev/null and b/public/_static/papermark-banner.png differ
diff --git a/public/_static/papermark-page.png b/public/_static/papermark-page.png
new file mode 100644
index 00000000..b10ac32a
Binary files /dev/null and b/public/_static/papermark-page.png differ