Skip to content

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

feat:mobile

Iuliia Shnaiac7653ae37f0
diff --git a/components/analytics/time-range-select.tsx b/components/analytics/time-range-select.tsx
index 91add320..e8ccce33 100644
--- a/components/analytics/time-range-select.tsx
+++ b/components/analytics/time-range-select.tsx
@@ -133,13 +133,13 @@ export function TimeRangeSelect({
<Button
variant="outline"
className={cn(
- "w-[300px] justify-between text-left font-normal",
+ "w-auto justify-between text-left font-normal sm:w-[300px]",
!date && "text-muted-foreground",
)}
>
- <div className="flex items-center gap-2">
- <CalendarIcon className="h-4 w-4" />
- <span>
+ <div className="flex items-center gap-1.5 sm:gap-2">
+ <CalendarIcon className="h-4 w-4 shrink-0" />
+ <span className="text-xs sm:text-sm">
{value === "custom" && date?.from ? (
<>
{format(date.from, "MMM d")} -{" "}
@@ -150,7 +150,7 @@ export function TimeRangeSelect({
)}
</span>
</div>
- <ChevronDown className="h-4 w-4 opacity-50" />
+ <ChevronDown className="h-4 w-4 shrink-0 opacity-50" />
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-2" align="end">
diff --git a/components/billing/unlimited-plan-modal.tsx b/components/billing/unlimited-plan-modal.tsx
index 2ac9074a..49fdec55 100644
--- a/components/billing/unlimited-plan-modal.tsx
+++ b/components/billing/unlimited-plan-modal.tsx
@@ -99,9 +99,11 @@ export function UnlimitedPlanModal({
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent
+ mobileFullScreen
className="max-h-[90vh] min-h-fit overflow-y-auto bg-gray-50 text-foreground dark:bg-gray-900"
style={{ width: "90vw", maxWidth: "520px" }}
>
+ <div className="flex flex-col gap-4 p-4 pt-12 sm:p-0">
<DialogTitle className="sr-only">Data Rooms Unlimited</DialogTitle>
<div className="flex items-center justify-center">
@@ -178,6 +180,7 @@ export function UnlimitedPlanModal({
Book a demo to learn more
</Link>
</div>
+ </div>
</DialogContent>
</Dialog>
);
diff --git a/components/billing/upgrade-plan-modal-with-discount.tsx b/components/billing/upgrade-plan-modal-with-discount.tsx
index 0d17515e..1795543c 100644
--- a/components/billing/upgrade-plan-modal-with-discount.tsx
+++ b/components/billing/upgrade-plan-modal-with-discount.tsx
@@ -52,7 +52,7 @@ const StartDataRoomTrialButton = ({ teamId }: { teamId?: string }) => {
// Feature rendering component
const FeatureItem = ({ feature }: { feature: Feature }) => {
- const baseClasses = `flex items-center ${feature.isHighlighted ? "bg-orange-50 -mx-6 px-6 py-2 -my-1 font-bold rounded-md dark:bg-orange-900/20" : ""}`;
+ const baseClasses = `flex items-center ${feature.isHighlighted ? "bg-orange-50 -mx-3 px-3 py-2 -my-1 font-bold rounded-md dark:bg-orange-900/20" : ""}`;
if (feature.isUsers) {
return (
@@ -183,7 +183,7 @@ export function UpgradePlanModalWithDiscount({
// Get next higher plan for current user
const getNextHigherPlan = () => {
- if (isFree) return PlanEnum.Pro; // Free users see Pro as next
+ if (isFree) return PlanEnum.Pro;
if (teamPlan === "pro") return PlanEnum.Business;
if (teamPlan === "business") return PlanEnum.DataRooms;
if (teamPlan === "datarooms") return PlanEnum.DataRoomsPlus;
@@ -245,12 +245,14 @@ export function UpgradePlanModalWithDiscount({
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>{buttonChild}</DialogTrigger>
<DialogContent
+ mobileFullScreen
className="max-h-[90vh] min-h-fit overflow-y-auto bg-white p-0 text-foreground dark:bg-gray-900"
style={{
width: "95vw",
maxWidth: "1200px",
}}
>
+ <div className="pt-10 sm:pt-0">
<div className="flex flex-col lg:flex-row">
{/* Left Sidebar - Discount Information */}
<div className="flex h-full w-full flex-col border-b border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-900 lg:w-64 lg:border-b-0 lg:border-r">
@@ -559,6 +561,7 @@ export function UpgradePlanModalWithDiscount({
</div>
</div>
</div>
+ </div>
</DialogContent>
</Dialog>
);
diff --git a/components/billing/upgrade-plan-modal.tsx b/components/billing/upgrade-plan-modal.tsx
index 47218308..8d47170a 100644
--- a/components/billing/upgrade-plan-modal.tsx
+++ b/components/billing/upgrade-plan-modal.tsx
@@ -53,7 +53,7 @@ const FeatureItem = ({
feature: Feature;
onUnlimitedClick?: () => void;
}) => {
- const baseClasses = `flex items-center ${feature.isHighlighted ? "bg-orange-50 -mx-6 px-6 py-2 -my-1 font-bold rounded-md dark:bg-orange-900/20" : ""}`;
+ const baseClasses = `flex items-center ${feature.isHighlighted ? "bg-orange-50 -mx-3 px-3 py-2 -my-1 font-bold rounded-md dark:bg-orange-900/20" : ""}`;
if (feature.isUsers) {
return (
@@ -237,12 +237,14 @@ export function UpgradePlanModal({
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>{buttonChild}</DialogTrigger>
<DialogContent
+ mobileFullScreen
className="max-h-[90vh] min-h-fit overflow-y-auto bg-gray-50 text-foreground dark:bg-gray-900"
style={{
width: "90vw",
maxWidth: "900px",
}}
>
+ <div className="flex flex-col gap-4 p-4 pt-12 sm:p-0">
{trigger === "invite_team_members" && (
<p
className="cursor-pointer text-center text-sm text-muted-foreground transition-colors hover:text-foreground"
@@ -527,6 +529,7 @@ export function UpgradePlanModal({
open={unlimitedModalOpen}
setOpen={setUnlimitedModalOpen}
/>
+ </div>
</DialogContent>
</Dialog>
);
diff --git a/components/datarooms/add-dataroom-modal.tsx b/components/datarooms/add-dataroom-modal.tsx
index 51513ed8..e9603ed8 100644
--- a/components/datarooms/add-dataroom-modal.tsx
+++ b/components/datarooms/add-dataroom-modal.tsx
@@ -588,17 +588,19 @@ export function AddDataroomModal({
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogTrigger asChild>{children}</DialogTrigger>
- <DialogContent className="border-none bg-transparent text-foreground shadow-none sm:max-w-[575px] [&>button]:hidden">
+ <DialogContent className="border-none bg-background text-foreground shadow-none sm:bg-transparent sm:max-w-[575px] [&>button]:hidden"
+ mobileFullScreen
+ >
<DialogTitle className="sr-only">Create Dataroom</DialogTitle>
<DialogDescription className="sr-only">
Create a new dataroom or generate one with pre-configured folders
</DialogDescription>
+ <div className="pt-10 sm:pt-0">
<Tabs
value={activeTab}
onValueChange={(value) => {
setActiveTab(value);
- // Reset AI-related state when switching tabs
if (value !== "ai") {
setAiDescription("");
setGeneratedFolders(null);
@@ -607,22 +609,22 @@ export function AddDataroomModal({
}}
>
<TabsList className="grid w-full grid-cols-3">
- <TabsTrigger value="create">Create from scratch</TabsTrigger>
- <TabsTrigger value="generate">Create from template</TabsTrigger>
+ <TabsTrigger value="create" className="text-xs sm:text-sm">Scratch</TabsTrigger>
+ <TabsTrigger value="generate" className="text-xs sm:text-sm">Template</TabsTrigger>
<TabsTrigger
value="ai"
- className={`flex items-center gap-2 ${
+ className={`flex items-center gap-1 text-xs sm:gap-2 sm:text-sm ${
activeTab === "ai"
? "text-orange-500 data-[state=active]:text-orange-500"
: ""
}`}
>
<Sparkles
- className={`h-4 w-4 ${
+ className={`h-3.5 w-3.5 sm:h-4 sm:w-4 ${
activeTab === "ai" ? "text-orange-500" : "text-current"
}`}
/>
- Generate with AI
+ AI
</TabsTrigger>
</TabsList>
@@ -691,7 +693,7 @@ export function AddDataroomModal({
Select Template{" "}
<span className="text-black dark:text-white">*</span>
</Label>
- <div className="grid grid-cols-3 divide-x divide-y divide-border overflow-hidden rounded-md border ">
+ <div className="grid grid-cols-2 divide-x divide-y divide-border overflow-hidden rounded-md border sm:grid-cols-3">
{TEMPLATES.map((template) => {
const Icon = template.icon;
const isSelected = dataroomType === template.id;
@@ -701,14 +703,14 @@ export function AddDataroomModal({
key={template.id}
type="button"
onClick={() => setDataroomType(template.id)}
- className={`relative flex min-h-[120px] flex-col items-center justify-center space-y-3 overflow-hidden p-4 transition-colors ${
+ className={`relative flex min-h-[80px] flex-col items-center justify-center space-y-2 overflow-hidden p-3 transition-colors sm:min-h-[120px] sm:space-y-3 sm:p-4 ${
isSelected
? "bg-gray-200 dark:bg-gray-800"
: "hover:bg-gray-100 hover:dark:bg-gray-800"
}`}
>
- <Icon className="pointer-events-none h-auto w-10 text-foreground" />
- <p className="text-sm">{template.name}</p>
+ <Icon className="pointer-events-none h-auto w-7 text-foreground sm:w-10" />
+ <p className="text-xs sm:text-sm">{template.name}</p>
</button>
);
})}
@@ -854,6 +856,7 @@ export function AddDataroomModal({
</Card>
</TabsContent>
</Tabs>
+ </div>
</DialogContent>
</Dialog>
);
diff --git a/components/documents/document-header.tsx b/components/documents/document-header.tsx
index 3f22db25..05409c5b 100644
--- a/components/documents/document-header.tsx
+++ b/components/documents/document-header.tsx
@@ -519,17 +519,17 @@ export default function DocumentHeader({
return (
<header className="flex flex-col gap-y-4">
- <div className="flex items-center justify-between gap-x-8">
- <div className="flex items-center space-x-2">
+ <div className="flex items-center justify-between gap-x-2 sm:gap-x-8">
+ <div className="flex min-w-0 items-center space-x-2">
{fileIcon({
fileType: prismaDocument.type ?? "",
- className: "size-7 sm:size-8",
+ className: "size-7 shrink-0 sm:size-8",
isLight,
})}
- <div className="mt-1 flex flex-col lg:mt-0">
+ <div className="mt-1 flex min-w-0 flex-col lg:mt-0">
<h2
- className="rounded-md border border-transparent px-1 py-0.5 text-lg font-semibold tracking-tight text-foreground duration-200 hover:cursor-text hover:border hover:border-border focus-visible:text-lg lg:px-3 lg:py-1 lg:text-xl lg:focus-visible:text-xl xl:text-2xl"
+ className="truncate rounded-md border border-transparent px-1 py-0.5 text-base font-semibold tracking-tight text-foreground duration-200 hover:cursor-text hover:border hover:border-border focus-visible:text-base sm:text-lg sm:focus-visible:text-lg lg:px-3 lg:py-1 lg:text-xl lg:focus-visible:text-xl xl:text-2xl"
ref={nameRef}
contentEditable={true}
onFocus={() => setIsEditingName(true)}
@@ -564,7 +564,7 @@ export default function DocumentHeader({
)}
</div>
- <div className="flex items-center gap-x-4 md:gap-x-2">
+ <div className="flex shrink-0 items-center gap-x-1 sm:gap-x-4 md:gap-x-2">
{primaryVersion.type !== "notion" &&
primaryVersion.type !== "link" &&
primaryVersion.type !== "sheet" &&
diff --git a/components/layouts/app.tsx b/components/layouts/app.tsx
index 1bc25b95..a69a0e79 100644
--- a/components/layouts/app.tsx
+++ b/components/layouts/app.tsx
@@ -5,6 +5,8 @@ import { useCallback, useEffect, useRef, useState } from "react";
import Cookies from "js-cookie";
import { AppBreadcrumb } from "@/components/layouts/breadcrumb";
+import { MobileBottomNav } from "@/components/layouts/mobile-bottom-nav";
+import { MobileHeader } from "@/components/layouts/mobile-header";
import TrialBanner from "@/components/layouts/trial-banner";
import { AppSidebar } from "@/components/sidebar/app-sidebar";
import { Separator } from "@/components/ui/separator";
@@ -122,10 +124,10 @@ export default function AppLayout({ children }: { children: React.ReactNode }) {
return (
<SidebarProvider open={sidebarOpen} onOpenChange={handleSidebarOpenChange}>
- <div className="flex flex-1 flex-col gap-x-1 bg-gray-50 dark:bg-black md:flex-row">
+ <div className="flex flex-1 flex-col gap-x-1 overflow-x-hidden bg-gray-50 dark:bg-black md:flex-row">
<AppSidebar />
- <SidebarInset className="ring-1 ring-gray-200 dark:ring-gray-800">
- <header className="flex h-10 shrink-0 items-center gap-2">
+ <SidebarInset className="overflow-x-hidden ring-0 md:ring-1 md:ring-gray-200 md:dark:ring-gray-800">
+ <header className="hidden h-10 shrink-0 items-center gap-2 md:flex">
<div className="flex items-center gap-2 px-4">
<SidebarTrigger className="-ml-1" />
<Separator orientation="vertical" className="mr-1 h-4" />
@@ -134,12 +136,11 @@ export default function AppLayout({ children }: { children: React.ReactNode }) {
</header>
<TrialBanner />
<BlockingModal />
- <main className="flex-1">{children}</main>
+ <main className="flex-1 overflow-x-hidden pt-14 pb-16 md:pt-0 md:pb-0">{children}</main>
</SidebarInset>
</div>
- {/* {showYearlyBanner && (
- <YearlyUpgradeBanner setShowBanner={setShowYearlyBanner} />
- )} */}
+ <MobileHeader />
+ <MobileBottomNav />
</SidebarProvider>
);
}
diff --git a/components/layouts/mobile-bottom-nav.tsx b/components/layouts/mobile-bottom-nav.tsx
new file mode 100644
index 00000000..4ffd2e2d
--- /dev/null
+++ b/components/layouts/mobile-bottom-nav.tsx
@@ -0,0 +1,91 @@
+import Link from "next/link";
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import {
+ FolderIcon,
+ HouseIcon,
+ MoreHorizontalIcon,
+ ServerIcon,
+} from "lucide-react";
+
+import { usePlan } from "@/lib/swr/use-billing";
+import { PlanEnum } from "@/ee/stripe/constants";
+import { cn } from "@/lib/utils";
+
+import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
+
+import { MobileMoreMenu } from "./mobile-more-menu";
+
+export function MobileBottomNav() {
+ const router = useRouter();
+ const [moreOpen, setMoreOpen] = useState(false);
+ const { isBusiness, isDatarooms, isDataroomsPlus, isTrial } = usePlan();
+
+ const dataroomsEnabled = isBusiness || isDatarooms || isDataroomsPlus || isTrial;
+
+ const isActive = (match: string) => {
+ if (match === "documents") {
+ return (
+ router.pathname.includes("documents") &&
+ !router.pathname.includes("datarooms")
+ );
+ }
+ return router.pathname.includes(match);
+ };
+
+ const moreIsActive =
+ !["dashboard", "documents", "datarooms"].some((m) => isActive(m));
+
+ const tabClass = (active: boolean) =>
+ cn(
+ "flex flex-1 flex-col items-center justify-center gap-1 py-2 text-[11px] font-medium transition-colors",
+ active
+ ? "text-foreground"
+ : "text-muted-foreground hover:text-foreground",
+ );
+
+ return (
+ <>
+ <nav className="fixed inset-x-0 bottom-0 z-40 border-t border-border bg-background pb-[env(safe-area-inset-bottom)] md:hidden">
+ <div className="flex h-16 items-center justify-around">
+ <Link href="/dashboard" className={tabClass(isActive("dashboard"))}>
+ <HouseIcon className="h-6 w-6" />
+ <span>Dashboard</span>
+ </Link>
+ <Link href="/documents" className={tabClass(isActive("documents"))}>
+ <FolderIcon className="h-6 w-6" />
+ <span>Documents</span>
+ </Link>
+ {dataroomsEnabled ? (
+ <Link href="/datarooms" className={tabClass(isActive("datarooms"))}>
+ <ServerIcon className="h-6 w-6" />
+ <span>Datarooms</span>
+ </Link>
+ ) : (
+ <UpgradePlanModal
+ clickedPlan={PlanEnum.Business}
+ trigger="mobile_nav_datarooms"
+ highlightItem={["datarooms"]}
+ >
+ <button className={tabClass(false)}>
+ <ServerIcon className="h-6 w-6" />
+ <span>Datarooms</span>
+ </button>
+ </UpgradePlanModal>
+ )}
+ <button
+ onClick={() => setMoreOpen(true)}
+ className={tabClass(moreIsActive)}
+ >
+ <MoreHorizontalIcon className="h-6 w-6" />
+ <span>More</span>
+ </button>
+ </div>
+ </nav>
+
+ <MobileMoreMenu open={moreOpen} onClose={() => setMoreOpen(false)} />
+ </>
+ );
+}
diff --git a/components/layouts/mobile-header.tsx b/components/layouts/mobile-header.tsx
new file mode 100644
index 00000000..4a5b253b
--- /dev/null
+++ b/components/layouts/mobile-header.tsx
@@ -0,0 +1,117 @@
+import Link from "next/link";
+
+import {
+ CircleUserRound,
+ LifeBuoyIcon,
+ LogOut,
+ MailIcon,
+} from "lucide-react";
+import { signOut, useSession } from "next-auth/react";
+import { toast } from "sonner";
+
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+
+import { ModeToggle } from "../theme-toggle";
+
+export function MobileHeader() {
+ const { data: session } = useSession();
+
+ return (
+ <header className="fixed inset-x-0 top-0 z-40 flex h-14 items-center justify-between border-b border-border bg-background px-4 md:hidden">
+ <Link
+ href="/dashboard"
+ className="text-xl font-bold tracking-tighter text-foreground"
+ >
+ Papermark
+ </Link>
+
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <button className="rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring">
+ <Avatar className="h-8 w-8">
+ <AvatarImage
+ src={session?.user?.image || ""}
+ alt={session?.user?.name || ""}
+ />
+ <AvatarFallback className="text-xs">
+ {session?.user?.name?.charAt(0) ||
+ session?.user?.email?.charAt(0)}
+ </AvatarFallback>
+ </Avatar>
+ </button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ className="w-56 rounded-lg"
+ side="bottom"
+ align="end"
+ sideOffset={8}
+ >
+ <DropdownMenuLabel className="p-0 font-normal">
+ <div className="flex items-center gap-2 px-2 py-1.5 text-left text-sm">
+ <Avatar className="h-8 w-8 rounded-lg">
+ <AvatarImage
+ src={session?.user?.image || ""}
+ alt={session?.user?.name || ""}
+ />
+ <AvatarFallback className="rounded-lg">
+ {session?.user?.name?.charAt(0) ||
+ session?.user?.email?.charAt(0)}
+ </AvatarFallback>
+ </Avatar>
+ <div className="grid flex-1 text-left text-sm leading-tight">
+ <span className="truncate font-semibold">
+ {session?.user?.name || ""}
+ </span>
+ <span className="truncate text-xs text-muted-foreground">
+ {session?.user?.email || ""}
+ </span>
+ </div>
+ </div>
+ </DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ <ModeToggle />
+ <DropdownMenuGroup>
+ <Link href="/account/general">
+ <DropdownMenuItem>
+ <CircleUserRound className="mr-2 h-4 w-4" />
+ User Settings
+ </DropdownMenuItem>
+ </Link>
+ </DropdownMenuGroup>
+ <DropdownMenuSeparator />
+ <DropdownMenuGroup>
+ <DropdownMenuItem
+ onClick={() => {
+ navigator.clipboard.writeText("[email protected]");
+ toast.success("[email protected] copied to clipboard");
+ }}
+ >
+ <MailIcon className="mr-2 h-4 w-4" />
+ Contact Support
+ </DropdownMenuItem>
+ </DropdownMenuGroup>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ onClick={() =>
+ signOut({
+ callbackUrl: `${window.location.origin}`,
+ })
+ }
+ >
+ <LogOut className="mr-2 h-4 w-4" />
+ Log out
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </header>
+ );
+}
diff --git a/components/layouts/mobile-more-menu.tsx b/components/layouts/mobile-more-menu.tsx
new file mode 100644
index 00000000..293871af
--- /dev/null
+++ b/components/layouts/mobile-more-menu.tsx
@@ -0,0 +1,248 @@
+import Link from "next/link";
+import { useRouter } from "next/router";
+
+import { useEffect, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import {
+ BrushIcon,
+ ChevronDownIcon,
+ CogIcon,
+ ContactIcon,
+ XIcon,
+} from "lucide-react";
+
+import { useIsAdmin } from "@/lib/hooks/use-is-admin";
+import { usePlan } from "@/lib/swr/use-billing";
+import useLimits from "@/lib/swr/use-limits";
+import { useSlackIntegration } from "@/lib/swr/use-slack-integration";
+import { PlanEnum } from "@/ee/stripe/constants";
+import { cn, nFormatter } from "@/lib/utils";
+
+import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
+import { Progress } from "@/components/ui/progress";
+
+import { SlackIcon } from "../shared/icons/slack-icon";
+
+interface MobileMoreMenuProps {
+ open: boolean;
+ onClose: () => void;
+}
+
+export function MobileMoreMenu({ open, onClose }: MobileMoreMenuProps) {
+ const router = useRouter();
+ const { currentTeam } = useTeam() || {};
+ const { isFree, isTrial } = usePlan();
+ const { limits } = useLimits();
+ const { isAdmin } = useIsAdmin();
+ const { integration: slackIntegration } = useSlackIntegration({
+ enabled: !!currentTeam?.id,
+ });
+ const [settingsExpanded, setSettingsExpanded] = useState(
+ () => router.pathname.includes("settings"),
+ );
+
+ useEffect(() => {
+ if (open) {
+ document.body.style.overflow = "hidden";
+ } else {
+ document.body.style.overflow = "";
+ }
+ return () => {
+ document.body.style.overflow = "";
+ };
+ }, [open]);
+
+ if (!open) return null;
+
+ const linksLimit = limits?.links;
+ const documentsLimit = limits?.documents;
+
+ const settingsSubItems = [
+ { label: "General", href: "/settings/general" },
+ { label: "Team", href: "/settings/people" },
+ { label: "Domains", href: "/settings/domains" },
+ { label: "Notifications", href: "/settings/notifications" },
+ { label: "Webhooks", href: "/settings/webhooks" },
+ { label: "Slack", href: "/settings/slack" },
+ ...(isAdmin
+ ? [
+ { label: "Security", href: "/settings/security" },
+ { label: "Billing", href: "/settings/billing" },
+ ]
+ : []),
+ ];
+
+ return (
+ <div className="fixed inset-0 z-50 flex flex-col bg-background md:hidden">
+ <div className="flex h-14 items-center justify-between border-b border-border px-4">
+ <span className="text-lg font-semibold">More</span>
+ <button
+ onClick={onClose}
+ className="rounded-full p-2 text-muted-foreground hover:bg-muted hover:text-foreground"
+ >
+ <XIcon className="h-5 w-5" />
+ </button>
+ </div>
+
+ <div className="flex-1 overflow-y-auto px-4 py-4">
+ <div className="space-y-1">
+ {isFree && !isTrial ? (
+ <UpgradePlanModal
+ clickedPlan={PlanEnum.Pro}
+ trigger="mobile_more_visitors"
+ highlightItem={["visitors"]}
+ >
+ <button
+ className="flex w-full items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
+ >
+ <ContactIcon className="h-5 w-5" />
+ Visitors
+ </button>
+ </UpgradePlanModal>
+ ) : (
+ <Link
+ href="/visitors"
+ onClick={onClose}
+ className={cn(
+ "flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",
+ router.pathname.includes("visitors")
+ ? "bg-muted text-foreground"
+ : "text-muted-foreground hover:bg-muted hover:text-foreground",
+ )}
+ >
+ <ContactIcon className="h-5 w-5" />
+ Visitors
+ </Link>
+ )}
+
+ <Link
+ href="/branding"
+ onClick={onClose}
+ className={cn(
+ "flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",
+ router.pathname.includes("branding")
+ ? "bg-muted text-foreground"
+ : "text-muted-foreground hover:bg-muted hover:text-foreground",
+ )}
+ >
+ <BrushIcon className="h-5 w-5" />
+ Branding
+ </Link>
+
+ {/* Settings with expandable sub-items */}
+ <div>
+ <button
+ onClick={() => setSettingsExpanded((v) => !v)}
+ className={cn(
+ "flex w-full items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-colors",
+ router.pathname.includes("settings")
+ ? "bg-muted text-foreground"
+ : "text-muted-foreground hover:bg-muted hover:text-foreground",
+ )}
+ >
+ <CogIcon className="h-5 w-5" />
+ Settings
+ <ChevronDownIcon
+ className={cn(
+ "ml-auto h-4 w-4 transition-transform",
+ settingsExpanded && "rotate-180",
+ )}
+ />
+ </button>
+ {settingsExpanded && (
+ <div className="ml-8 mt-1 space-y-0.5 border-l border-border pl-3">
+ {settingsSubItems.map((sub) => (
+ <Link
+ key={sub.href}
+ href={sub.href}
+ onClick={onClose}
+ className={cn(
+ "block rounded-md px-3 py-2 text-sm transition-colors",
+ router.pathname.includes(
+ sub.href.replace("/settings/", "settings/"),
+ )
+ ? "font-medium text-foreground"
+ : "text-muted-foreground hover:text-foreground",
+ )}
+ >
+ {sub.label}
+ </Link>
+ ))}
+ </div>
+ )}
+ </div>
+
+ {!slackIntegration && (
+ <Link
+ href="/settings/slack"
+ onClick={onClose}
+ className="flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
+ >
+ <SlackIcon className="h-5 w-5" />
+ Connect Slack
+ </Link>
+ )}
+ </div>
+
+ {(linksLimit || documentsLimit) && (
+ <div className="mt-6 space-y-3 rounded-lg border border-border p-4">
+ <p className="text-xs font-medium text-muted-foreground">Usage</p>
+ {linksLimit ? (
+ <div className="space-y-1">
+ <div className="flex items-center justify-between text-xs">
+ <span className="text-foreground">Links</span>
+ <span className="text-muted-foreground">
+ {nFormatter(limits?.usage?.links ?? 0)} /{" "}
+ {nFormatter(linksLimit)}
+ </span>
+ </div>
+ <Progress
+ value={
+ limits?.usage?.links
+ ? (limits.usage.links / linksLimit) * 100
+ : 0
+ }
+ className="h-1 bg-muted"
+ max={100}
+ />
+ </div>
+ ) : null}
+ {documentsLimit ? (
+ <div className="space-y-1">
+ <div className="flex items-center justify-between text-xs">
+ <span className="text-foreground">Documents</span>
+ <span className="text-muted-foreground">
+ {nFormatter(limits?.usage?.documents ?? 0)} /{" "}
+ {nFormatter(documentsLimit)}
+ </span>
+ </div>
+ <Progress
+ value={
+ limits?.usage?.documents
+ ? (limits.usage.documents / documentsLimit) * 100
+ : 0
+ }
+ className="h-1 bg-muted"
+ max={100}
+ />
+ </div>
+ ) : null}
+ </div>
+ )}
+
+ {isFree && !isTrial && (
+ <div className="mt-4">
+ <Link
+ href="/settings/billing"
+ 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 Papermark
+ </Link>
+ </div>
+ )}
+ </div>
+ </div>
+ );
+}
diff --git a/components/navigation-menu.tsx b/components/navigation-menu.tsx
index 6761022e..4358fba5 100644
--- a/components/navigation-menu.tsx
+++ b/components/navigation-menu.tsx
@@ -32,9 +32,9 @@ export const NavMenu: React.FC<React.PropsWithChildren<Props>> = ({
}) => {
return (
<nav
- className={cn("sticky top-0 bg-background dark:bg-gray-900", className)}
+ className={cn("sticky top-0 z-10 bg-background dark:bg-gray-900 md:top-0", className)}
>
- <div className="flex w-full items-center overflow-x-auto px-4 pl-1">
+ <div className="flex w-full items-center overflow-x-auto px-1 sm:px-4 sm:pl-1">
<ul className="flex flex-row gap-4">
{navigation.map(
({ label, href, segment, tag, disabled, limited }) => (
diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx
index 5cc0e01c..c5078f5e 100644
--- a/components/ui/dialog.tsx
+++ b/components/ui/dialog.tsx
@@ -54,10 +54,18 @@ const DialogContent = React.forwardRef<
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
isDocumentDialog?: boolean;
isPreviewDialog?: boolean;
+ mobileFullScreen?: boolean;
}
>(
(
- { className, children, isDocumentDialog, isPreviewDialog, ...props },
+ {
+ className,
+ children,
+ isDocumentDialog,
+ isPreviewDialog,
+ mobileFullScreen,
+ ...props
+ },
ref,
) => (
<DialogPortal isPreviewDialog={isPreviewDialog}>
@@ -66,6 +74,8 @@ const DialogContent = React.forwardRef<
ref={ref}
className={cn(
"fixed z-50 grid w-full gap-4 rounded-t-lg border border-gray-800 bg-background p-6 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-xl sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0 md:w-1/2",
+ mobileFullScreen &&
+ "max-sm:!inset-0 max-sm:!h-[100dvh] max-sm:!w-[100vw] max-sm:!max-w-none max-sm:!overflow-y-auto max-sm:!rounded-none max-sm:!border-none max-sm:!p-0",
className,
)}
onCloseAutoFocus={(event) => {
@@ -77,11 +87,11 @@ const DialogContent = React.forwardRef<
{children}
<DialogPrimitive.Close
className={cn(
- "absolute rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
+ "absolute z-10 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
isDocumentDialog ? "right-8 top-20" : "right-4 top-4",
)}
>
- <X className="h-4 w-4" />
+ <X className="h-5 w-5 sm:h-4 sm:w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
diff --git a/components/ui/sidebar.tsx b/components/ui/sidebar.tsx
index bd9a6109..f8423c7d 100644
--- a/components/ui/sidebar.tsx
+++ b/components/ui/sidebar.tsx
@@ -259,23 +259,7 @@ const Sidebar = React.forwardRef<
}
if (isMobile) {
- return (
- <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>
- <SheetContent
- data-sidebar="sidebar"
- data-mobile="true"
- className="w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden"
- style={
- {
- "--sidebar-width": SIDEBAR_WIDTH_MOBILE,
- } as React.CSSProperties
- }
- side={side}
- >
- <div className="flex h-full w-full flex-col">{children}</div>
- </SheetContent>
- </Sheet>
- );
+ return null;
}
return (
diff --git a/components/visitors/visitor-groups-section.tsx b/components/visitors/visitor-groups-section.tsx
index f48538b1..7e44c4e8 100644
--- a/components/visitors/visitor-groups-section.tsx
+++ b/components/visitors/visitor-groups-section.tsx
@@ -408,17 +408,17 @@ export function VisitorGroupsSection() {
return (
<div className="space-y-4">
- <div className="flex items-center justify-between">
- <div>
+ <div className="flex items-center justify-between gap-x-2">
+ <div className="min-w-0">
<h3 className="text-lg font-semibold text-foreground">
Visitor Groups
</h3>
- <p className="text-sm text-muted-foreground">
+ <p className="text-xs text-muted-foreground sm:text-sm">
Create groups of emails and domains, then apply them to link allow
lists.
</p>
</div>
- <Button onClick={handleCreate} size="sm" className="gap-1.5">
+ <Button onClick={handleCreate} size="sm" className="shrink-0 gap-1.5 whitespace-nowrap">
<PlusIcon className="h-4 w-4" />
Create Group
</Button>
diff --git a/components/welcome/containers/link-option-container.tsx b/components/welcome/containers/link-option-container.tsx
index b67b9e7a..126b6e09 100644
--- a/components/welcome/containers/link-option-container.tsx
+++ b/components/welcome/containers/link-option-container.tsx
@@ -97,7 +97,7 @@ export function LinkOptionContainer({
return (
<motion.div
- className="z-10 flex flex-col space-y-10 text-center"
+ className="z-10 flex flex-col space-y-10 px-5 text-center sm:px-0"
variants={{
hidden: { opacity: 0, scale: 0.95 },
show: {
@@ -120,7 +120,7 @@ export function LinkOptionContainer({
<h1
className={
`font-display mx-auto text-center text-3xl font-semibold text-foreground transition-colors sm:text-4xl ` +
- (showLinkSettings ? "whitespace-nowrap" : "max-w-md")
+ (showLinkSettings ? "" : "max-w-md")
}
>
{showLinkSettings
diff --git a/components/welcome/containers/upload-container.tsx b/components/welcome/containers/upload-container.tsx
index fa7b4a50..c93760f4 100644
--- a/components/welcome/containers/upload-container.tsx
+++ b/components/welcome/containers/upload-container.tsx
@@ -183,7 +183,7 @@ export function UploadContainer({
return (
<motion.div
- className="z-10 flex flex-col space-y-10 text-center"
+ className="z-10 flex flex-col space-y-10 px-5 text-center sm:px-0"
variants={{
hidden: { opacity: 0, scale: 0.95 },
show: {
diff --git a/components/welcome/next.tsx b/components/welcome/next.tsx
index 04095cad..e14690f4 100644
--- a/components/welcome/next.tsx
+++ b/components/welcome/next.tsx
@@ -49,7 +49,7 @@ export default function Next() {
},
})
}
- className="flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10"
+ className="flex min-h-[120px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:min-h-[200px] md:p-10"
>
<FileIcon className="pointer-events-none h-auto w-12 sm:w-12" />
<p className="text-lg font-medium">Document</p>
@@ -66,7 +66,7 @@ export default function Next() {
},
})
}
- className="flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10"
+ className="flex min-h-[120px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:min-h-[200px] md:p-10"
>
<ServerIcon className="pointer-events-none h-auto w-12 sm:w-12" />
<p className="text-lg font-medium">Data Room</p>
diff --git a/components/welcome/select.tsx b/components/welcome/select.tsx
index 658a58c8..c2b5595a 100644
--- a/components/welcome/select.tsx
+++ b/components/welcome/select.tsx
@@ -183,7 +183,7 @@ export default function Select() {
>
<button
onClick={() => handleDocSelect("pitchdeck")}
- className={`flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:p-10 ${
+ className={`flex min-h-[100px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:min-h-[200px] md:p-10 ${
selectedDoc === "pitchdeck"
? "bg-primary/5 ring-2 ring-inset ring-primary"
: "hover:bg-gray-200 hover:dark:bg-gray-800"
@@ -195,7 +195,7 @@ export default function Select() {
<button
onClick={() => handleDocSelect("sales-document")}
- className={`flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:p-10 ${
+ className={`flex min-h-[100px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:min-h-[200px] md:p-10 ${
selectedDoc === "sales-document"
? "bg-primary/5 ring-2 ring-inset ring-primary"
: "hover:bg-gray-200 hover:dark:bg-gray-800"
@@ -207,7 +207,7 @@ export default function Select() {
<button
onClick={() => handleDocSelect("notion")}
- className={`flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:p-10 ${
+ className={`flex min-h-[100px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:min-h-[200px] md:p-10 ${
selectedDoc === "notion"
? "bg-primary/5 ring-2 ring-inset ring-primary"
: "hover:bg-gray-200 hover:dark:bg-gray-800"
@@ -219,7 +219,7 @@ export default function Select() {
<button
onClick={() => handleDocSelect("document")}
- className={`flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:p-10 ${
+ className={`flex min-h-[100px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors md:min-h-[200px] md:p-10 ${
selectedDoc === "document"
? "bg-primary/5 ring-2 ring-inset ring-primary"
: "hover:bg-gray-200 hover:dark:bg-gray-800"
diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx
index cd3a533c..19e4bfa7 100644
--- a/pages/dashboard.tsx
+++ b/pages/dashboard.tsx
@@ -124,7 +124,7 @@ export default function DashboardPage() {
<AppLayout>
<div className="flex-1 space-y-4 p-4 pt-6 md:p-8">
<div className="flex items-center justify-between">
- <h2 className="text-3xl font-bold tracking-tight">Dashboard</h2>
+ <h2 className="text-xl font-bold tracking-tight sm:text-3xl">Dashboard</h2>
<TimeRangeSelect
value={interval}
onChange={handleTimeRangeChange}
diff --git a/pages/datarooms/[id]/documents/[...name].tsx b/pages/datarooms/[id]/documents/[...name].tsx
index c76233a7..d24fee2f 100644
--- a/pages/datarooms/[id]/documents/[...name].tsx
+++ b/pages/datarooms/[id]/documents/[...name].tsx
@@ -74,11 +74,11 @@ export default function Documents() {
>
<Button
size="sm"
- className="group flex items-center justify-start gap-x-3 px-3 text-left"
+ className="group flex items-center justify-start gap-x-1 whitespace-nowrap px-2 text-left sm:gap-x-3 sm:px-3"
title="Add Document"
>
- <PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
- <span>Add Document</span>
+ <PlusIcon className="h-4 w-4 shrink-0 sm:h-5 sm:w-5" aria-hidden="true" />
+ <span className="text-xs sm:text-sm">Add Document</span>
</Button>
</AddDocumentModal>
<AddFolderModal isDataroom={true} dataroomId={dataroom?.id} key={2}>
diff --git a/pages/datarooms/[id]/documents/index.tsx b/pages/datarooms/[id]/documents/index.tsx
index 0c1e82be..c784defa 100644
--- a/pages/datarooms/[id]/documents/index.tsx
+++ b/pages/datarooms/[id]/documents/index.tsx
@@ -68,11 +68,11 @@ export default function Documents() {
>
<Button
size="sm"
- className="group flex items-center justify-start gap-x-3 px-3 text-left"
+ className="group flex items-center justify-start gap-x-1 whitespace-nowrap px-2 text-left sm:gap-x-3 sm:px-3"
title="Add Document"
>
- <PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
- <span>Add Document</span>
+ <PlusIcon className="h-4 w-4 shrink-0 sm:h-5 sm:w-5" aria-hidden="true" />
+ <span className="text-xs sm:text-sm">Add Document</span>
</Button>
</AddDocumentModal>
diff --git a/pages/datarooms/index.tsx b/pages/datarooms/index.tsx
index 7a071667..050371eb 100644
--- a/pages/datarooms/index.tsx
+++ b/pages/datarooms/index.tsx
@@ -106,10 +106,10 @@ export default function DataroomsPage() {
trigger="datarooms"
>
<Button
- className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
+ className="group flex flex-1 items-center justify-start gap-x-1 whitespace-nowrap px-2 text-left sm:gap-x-3 sm:px-3"
title="Upgrade to Add Data Room"
>
- <span>Upgrade to Add Data Room</span>
+ <span className="text-xs sm:text-sm">Upgrade to Add Data Room</span>
</Button>
</UpgradePlanModal>
) : isTrial &&
@@ -117,9 +117,9 @@ export default function DataroomsPage() {
!isBusiness &&
!isDatarooms &&
!isDataroomsPlus ? (
- <div className="flex items-center gap-x-4">
- <div className="text-sm text-destructive">
- <span>Dataroom Trial: </span>
+ <div className="flex items-center gap-x-2 sm:gap-x-4">
+ <div className="text-xs text-destructive sm:text-sm">
+ <span>Trial: </span>
<span className="font-medium">
{(() => {
const startDate =
@@ -138,11 +138,11 @@ export default function DataroomsPage() {
{totalDatarooms < limitDatarooms ? (
<AddDataroomModal>
<Button
- className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
+ className="group flex flex-1 items-center justify-start gap-x-1 whitespace-nowrap px-2 text-left sm:gap-x-3 sm:px-3"
title="Create New Dataroom"
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
- <span>Create New Dataroom</span>
+ <span className="text-xs sm:text-sm">New Dataroom</span>
</Button>
</AddDataroomModal>
) : (
@@ -151,10 +151,10 @@ export default function DataroomsPage() {
trigger="datarooms"
>
<Button
- className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
+ className="group flex flex-1 items-center justify-start gap-x-1 whitespace-nowrap px-2 text-left sm:gap-x-3 sm:px-3"
title="Upgrade to Add Data Room"
>
- <span>Upgrade to Add Data Room</span>
+ <span className="text-xs sm:text-sm">Upgrade</span>
</Button>
</UpgradePlanModal>
)}
@@ -162,31 +162,31 @@ export default function DataroomsPage() {
) : isBusiness || isDatarooms || isDataroomsPlus ? (
<AddDataroomModal>
<Button
- className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
- title="Create New Document"
+ className="group flex flex-1 items-center justify-start gap-x-1 whitespace-nowrap px-2 text-left sm:gap-x-3 sm:px-3"
+ title="Create New Dataroom"
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
- <span>Create New Dataroom</span>
+ <span className="text-xs sm:text-sm">New Dataroom</span>
</Button>
</AddDataroomModal>
) : (
<DataroomTrialModal>
<Button
- className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
+ className="group flex flex-1 items-center justify-start gap-x-1 whitespace-nowrap px-2 text-left sm:gap-x-3 sm:px-3"
title="Start Data Room Trial"
>
- <span>Start Data Room Trial</span>
+ <span className="text-xs sm:text-sm">Start Trial</span>
</Button>
</DataroomTrialModal>
)}
</div>
</section>
{/* Search and Filters */}
- <div className="mb-4 flex justify-end gap-3">
+ <div className="mb-4 flex justify-end gap-2 sm:gap-3">
<div className="w-full sm:w-[280px]">
<SearchBoxPersisted
placeholder="Search datarooms..."
- inputClassName="h-10"
+ inputClassName="h-9 text-sm sm:h-10"
/>
</div>
diff --git a/pages/documents/hidden.tsx b/pages/documents/hidden.tsx
index 3eca1d71..bac08865 100644
--- a/pages/documents/hidden.tsx
+++ b/pages/documents/hidden.tsx
@@ -16,7 +16,7 @@ export default function HiddenDocumentsPage() {
return (
<AppLayout>
- <div className="sticky top-0 mb-4 min-h-[calc(100vh-72px)] rounded-lg bg-white p-4 dark:bg-gray-900 sm:mx-4 sm:pt-8">
+ <div className="sticky top-0 mb-4 min-h-[calc(100vh-72px)] rounded-lg bg-white p-3 dark:bg-gray-900 sm:mx-4 sm:p-4 sm:pt-8">
<section className="mb-4 flex items-center justify-between space-x-2 sm:space-x-0">
<div className="space-y-0 sm:space-y-1">
<div className="flex items-center gap-x-2">
diff --git a/pages/documents/index.tsx b/pages/documents/index.tsx
index b7d4bd5e..1a0357bb 100644
--- a/pages/documents/index.tsx
+++ b/pages/documents/index.tsx
@@ -65,7 +65,7 @@ export default function Documents() {
return (
<AppLayout>
- <div className="sticky top-0 mb-4 min-h-[calc(100vh-72px)] rounded-lg bg-white p-4 dark:bg-gray-900 sm:mx-4 sm:pt-8">
+ <div className="sticky top-0 mb-4 min-h-[calc(100vh-72px)] rounded-lg bg-white p-3 dark:bg-gray-900 sm:mx-4 sm:p-4 sm:pt-8">
<section className="mb-4 flex items-center justify-between space-x-2 sm:space-x-0">
<div className="space-y-0 sm:space-y-1">
<h2 className="text-xl font-semibold tracking-tight text-foreground sm:text-2xl">
diff --git a/pages/settings/presets/index.tsx b/pages/settings/presets/index.tsx
index dd3ada03..0508c601 100644
--- a/pages/settings/presets/index.tsx
+++ b/pages/settings/presets/index.tsx
@@ -44,12 +44,12 @@ export default function Presets() {
<main className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
<SettingsHeader />
<div>
- <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
- <div className="space-y-1">
- <h3 className="text-2xl font-semibold tracking-tight text-foreground">
+ <div className="mb-4 flex items-center justify-between gap-x-2 md:mb-8 lg:mb-12">
+ <div className="min-w-0 space-y-1">
+ <h3 className="text-xl font-semibold tracking-tight text-foreground sm:text-2xl">
Link Presets
</h3>
- <p className="flex flex-row items-center gap-2 text-sm text-muted-foreground">
+ <p className="flex flex-row items-center gap-2 text-xs text-muted-foreground sm:text-sm">
Configure and save presets for your links
<BadgeTooltip content="Create reusable link configurations that can be applied to new links">
<CircleHelpIcon className="h-4 w-4 shrink-0 text-muted-foreground hover:text-foreground" />
@@ -57,14 +57,14 @@ export default function Presets() {
</p>
</div>
{isTrial || isBusiness || isDatarooms || isDataroomsPlus ? (
- <Button onClick={() => router.push("/settings/presets/new")}>
+ <Button onClick={() => router.push("/settings/presets/new")} className="shrink-0 whitespace-nowrap">
<PlusIcon className="mr-1.5 h-4 w-4" />
Create Preset
</Button>
) : (
- <Button onClick={() => setShowUpgradeModal(true)}>
+ <Button onClick={() => setShowUpgradeModal(true)} className="shrink-0 whitespace-nowrap text-xs sm:text-sm">
<CrownIcon className="mr-1.5 h-4 w-4" />
- Upgrade to create presets
+ Upgrade
</Button>
)}
</div>
diff --git a/pages/settings/upgrade.tsx b/pages/settings/upgrade.tsx
index 1f4c4244..c9e1c266 100644
--- a/pages/settings/upgrade.tsx
+++ b/pages/settings/upgrade.tsx
@@ -8,7 +8,7 @@ import { useTeam } from "@/context/team-context";
import { getStripe } from "@/ee/stripe/client";
import { Feature, PlanEnum, getPlanFeatures } from "@/ee/stripe/constants";
import { PLANS } from "@/ee/stripe/utils";
-import { CheckIcon, InfinityIcon, Users2Icon, XIcon } from "lucide-react";
+import { ArrowLeftIcon, CheckIcon, InfinityIcon, Users2Icon, XIcon } from "lucide-react";
import { toast } from "sonner";
import { useAnalytics } from "@/lib/analytics";
@@ -164,8 +164,15 @@ export default function UpgradePage() {
];
return (
- <div className="min-h-screen bg-gray-50 p-8 dark:bg-gray-900">
- <h1 className="mb-8 text-center text-3xl font-bold">
+ <div className="min-h-screen bg-gray-50 px-4 py-6 dark:bg-gray-900 sm:p-8">
+ <button
+ onClick={() => router.back()}
+ className="mb-4 flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground sm:mb-6"
+ >
+ <ArrowLeftIcon className="h-4 w-4" />
+ Back
+ </button>
+ <h1 className="mb-6 text-center text-2xl font-bold sm:mb-8 sm:text-3xl">
Select best plan for your business
</h1>
@@ -660,14 +667,14 @@ export default function UpgradePage() {
{/* Unlimited Plan Banner */}
<UnlimitedPlanModal period={period}>
- <div className="mt-6 cursor-pointer rounded-xl border-2 border-gray-900 bg-white px-8 py-20 shadow-sm transition-colors hover:bg-gray-50 dark:border-gray-200 dark:bg-gray-900 dark:hover:bg-gray-800">
- <div className="flex items-center justify-between">
- <div className="flex items-center gap-5">
- <div className="flex h-14 w-14 items-center justify-center rounded-full bg-gray-900 dark:bg-gray-100">
- <InfinityIcon className="h-7 w-7 text-white dark:text-gray-900" />
+ <div className="mt-6 cursor-pointer rounded-xl border-2 border-gray-900 bg-white px-4 py-8 shadow-sm transition-colors hover:bg-gray-50 dark:border-gray-200 dark:bg-gray-900 dark:hover:bg-gray-800 sm:px-8 sm:py-20">
+ <div className="flex flex-col items-start gap-6 sm:flex-row sm:items-center sm:justify-between">
+ <div className="flex items-center gap-4 sm:gap-5">
+ <div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-gray-900 dark:bg-gray-100 sm:h-14 sm:w-14">
+ <InfinityIcon className="h-5 w-5 text-white dark:text-gray-900 sm:h-7 sm:w-7" />
</div>
<div>
- <h3 className="text-xl font-semibold text-gray-900 dark:text-white">
+ <h3 className="text-lg font-semibold text-gray-900 dark:text-white sm:text-xl">
Data Rooms Unlimited
</h3>
<p className="mt-1 text-sm text-gray-500 dark:text-gray-400">
@@ -675,16 +682,16 @@ export default function UpgradePage() {
</p>
</div>
</div>
- <div className="flex items-center gap-8">
- <div className="text-right">
- <span className="text-4xl font-semibold tabular-nums text-gray-900 dark:text-white">
+ <div className="flex w-full flex-col items-start gap-3 sm:w-auto sm:flex-row sm:items-center sm:gap-8">
+ <div>
+ <span className="text-3xl font-semibold tabular-nums text-gray-900 dark:text-white sm:text-4xl">
€{PLANS.find((p) => p.name === PlanEnum.DataRoomsUnlimited)!.price[period].amount}
</span>
<span className="text-sm text-gray-500 dark:text-gray-400">
/month{period === "yearly" && ", billed annually"}
</span>
</div>
- <Button size="lg" className="bg-gray-900 text-white hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-900 dark:hover:bg-gray-200">
+ <Button size="lg" className="w-full bg-gray-900 text-white hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-900 dark:hover:bg-gray-200 sm:w-auto">
Get Unlimited
</Button>
</div>
diff --git a/pages/welcome.tsx b/pages/welcome.tsx
index 902cdfce..92d3ef1a 100644
--- a/pages/welcome.tsx
+++ b/pages/welcome.tsx
@@ -72,7 +72,7 @@ export default function Welcome() {
return (
<>
<GTMComponent />
- <div className="mx-auto flex h-screen max-w-3xl flex-col items-center justify-center overflow-x-hidden">
+ <div className="mx-auto flex min-h-screen max-w-3xl flex-col items-center justify-center overflow-x-hidden overflow-y-auto py-10">
<AnimatePresence mode="wait">
{router.query.type ? (
<>