Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: add verification badge to table
Marc Seitzd31ae5927222
diff --git a/components/shared/icons/badge-check.tsx b/components/shared/icons/badge-check.tsxnew file mode 100644index 00000000..823a435e--- /dev/null+++ b/components/shared/icons/badge-check.tsx@@ -0,0 +1,19 @@+export default function BadgeCheck({ className }: { className?: string }) {+ return (+ <svg+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ className={className}+ shapeRendering="geometricPrecision"+ >+ <path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" />+ <path d="m9 12 2 2 4-4" />+ </svg>+ );+}diff --git a/components/visitors/visitors-table.tsx b/components/visitors/visitors-table.tsxindex 49f47427..ae8e174f 100644--- a/components/visitors/visitors-table.tsx+++ b/components/visitors/visitors-table.tsx@@ -19,6 +19,7 @@ import { Skeleton } from "@/components/ui/skeleton";import ChevronDown from "@/components/shared/icons/chevron-down";import VisitorChart from "./visitor-chart";import { VisitorAvatar } from "./visitor-avatar";+import BadgeCheck from "../shared/icons/badge-check";export default function VisitorsTable({ numPages }: { numPages: number }) {const { views } = useDocumentVisits();@@ -51,10 +52,17 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {<VisitorAvatar viewerEmail={view.viewerEmail} /><div className="min-w-0 flex-1"><div className="focus:outline-none">- <p className="text-sm font-medium text-gray-800 dark:text-gray-200 overflow-visible">- {view.viewerEmail- ? view.viewerEmail- : "Anonymous"}+ <p className="text-sm font-medium text-gray-800 dark:text-gray-200 overflow-visible flex items-center gap-x-2">+ {view.viewerEmail ? (+ <>+ {view.viewerEmail}{" "}+ {view.verified ? (+ <BadgeCheck className="h-4 w-4 text-emerald-500" />+ ) : null}+ </>+ ) : (+ "Anonymous"+ )}</p><p className="text-sm text-muted-foreground/60">{view.link.name ? view.link.name : view.linkId}