Skip to content

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

fix: constants and popups

Marc Seitz7fd24583a9d7
diff --git a/components/billing/upgrade-plan-modal.tsx b/components/billing/upgrade-plan-modal.tsx
index b728c154..3d824b2d 100644
--- a/components/billing/upgrade-plan-modal.tsx
+++ b/components/billing/upgrade-plan-modal.tsx
@@ -33,6 +33,7 @@ const FeatureItem = ({ feature }: { feature: Feature }) => {
return (
<div className={cn("justify-between gap-x-8", baseClasses)}>
<div className="flex items-center gap-x-3">
+ <CheckIcon className="h-5 w-5 flex-shrink-0 text-[#fb7a00]" />
<span>{feature.text}</span>
</div>
{feature.tooltip && (
diff --git a/components/documents/document-header.tsx b/components/documents/document-header.tsx
index c3ff9bd4..87b89f5c 100644
--- a/components/documents/document-header.tsx
+++ b/components/documents/document-header.tsx
@@ -785,10 +785,7 @@ export default function DocumentHeader({
<DropdownMenuItem
onClick={() =>
isFree
- ? handleUpgradeClick(
- PlanEnum.Business,
- "export-document-visits",
- )
+ ? handleUpgradeClick(PlanEnum.Pro, "export-document-visits")
: exportVisitCounts(prismaDocument)
}
>
diff --git a/components/links/link-sheet/email-authentication-section.tsx b/components/links/link-sheet/email-authentication-section.tsx
index 6fd2b303..e0ced51f 100644
--- a/components/links/link-sheet/email-authentication-section.tsx
+++ b/components/links/link-sheet/email-authentication-section.tsx
@@ -45,12 +45,12 @@ export default function EmailAuthenticationSection({
enabled={enabled}
action={handleEnableAuthentication}
isAllowed={isAllowed}
- requiredPlan="pro"
+ requiredPlan="business"
upgradeAction={() =>
handleUpgradeStateChange({
state: true,
trigger: "link_sheet_email_auth_section",
- plan: "Pro",
+ plan: "Business",
})
}
/>
diff --git a/components/links/link-sheet/link-options.tsx b/components/links/link-sheet/link-options.tsx
index 73fb5394..fc221ff8 100644
--- a/components/links/link-sheet/link-options.tsx
+++ b/components/links/link-sheet/link-options.tsx
@@ -91,7 +91,12 @@ export const LinkOptions = ({
<EmailAuthenticationSection
{...{ data, setData }}
- isAllowed={isTrial || isPro || isBusiness || isDatarooms}
+ isAllowed={
+ isTrial ||
+ (isPro && allowAdvancedLinkControls) ||
+ isBusiness ||
+ isDatarooms
+ }
handleUpgradeStateChange={handleUpgradeStateChange}
/>
{data.audienceType === LinkAudienceType.GENERAL ? (
diff --git a/ee/stripe/constants.ts b/ee/stripe/constants.ts
index a3ed7261..dc26e398 100644
--- a/ee/stripe/constants.ts
+++ b/ee/stripe/constants.ts
@@ -66,11 +66,6 @@ export const BASE_FEATURES: Record<PlanEnum, PlanFeatures> = {
{ id: "users", text: "1 user included", isUsers: true, usersIncluded: 1 },
{ id: "documents", text: "300 documents" },
{ id: "links", text: "Unlimited links" },
- {
- id: "custom-domain",
- text: "Custom domain for documents",
- isCustomDomain: true,
- },
{ id: "folder", text: "Folder organization" },
{ id: "uploads", text: "Large file uploads" },
{ id: "video", text: "Video sharing and analytics" },
@@ -97,7 +92,7 @@ export const BASE_FEATURES: Record<PlanEnum, PlanFeatures> = {
},
{ id: "folder-levels", text: "Unlimited folder levels" },
{ id: "multi-file", text: "Multi-file sharing" },
- { id: "screen-shield", text: "Screen shield/fence protection" },
+ { id: "screenshot", text: "Screenshot protection" },
{ id: "email-verify", text: "Require email verification" },
{ id: "allow-block", text: "Allow/Block list" },
{ id: "dataroom-branding", text: "Dataroom branding" },
diff --git a/pages/settings/presets.tsx b/pages/settings/presets.tsx
index 7793dd03..490e3400 100644
--- a/pages/settings/presets.tsx
+++ b/pages/settings/presets.tsx
@@ -35,7 +35,7 @@ import { resizeImage } from "@/lib/utils/resize-image";
export default function Presets() {
const teamInfo = useTeam();
- const { plan } = usePlan();
+ const { plan, isTrial } = usePlan();
const { data: presets, mutate: mutatePreset } = useSWRImmutable<LinkPreset>(
`/api/teams/${teamInfo?.currentTeam?.id}/presets`,
fetcher,
@@ -531,10 +531,10 @@ export default function Presets() {
</div>
<div className="flex justify-end">
- {plan === "free" ? (
+ {plan === "free" || plan === "pro" || !isTrial ? (
<UpgradePlanModal
- clickedPlan={PlanEnum.Pro}
- trigger={"branding_page"}
+ clickedPlan={PlanEnum.Business}
+ trigger={"presets_page"}
>
<Button>Upgrade to Save Preset</Button>
</UpgradePlanModal>