Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: add dataroom upload to fetaureflag
Marc Seitz3013795b8737
diff --git a/components/links/link-sheet/link-options.tsx b/components/links/link-sheet/link-options.tsxindex 57999218..2de9963e 100644--- a/components/links/link-sheet/link-options.tsx+++ b/components/links/link-sheet/link-options.tsx@@ -84,7 +84,7 @@ export const LinkOptions = ({<AllowNotificationSection {...{ data, setData }} /><AllowDownloadSection {...{ data, setData }} /><ExpirationSection {...{ data, setData }} />- {linkType === LinkType.DATAROOM_LINK ? (+ {limits?.dataroomUpload && linkType === LinkType.DATAROOM_LINK ? (<UploadSection{...{ data, setData }}isAllowed={isTrial || isDatarooms || isDataroomsPlus}diff --git a/ee/limits/handler.ts b/ee/limits/handler.tsindex fe7faab8..574a5418 100644--- a/ee/limits/handler.ts+++ b/ee/limits/handler.ts@@ -31,6 +31,7 @@ export default async function handle(return res.status(200).json({...limits,conversationsInDataroom,+ dataroomUpload: featureFlags.dataroomUpload,});} catch (error) {return res.status(500).json((error as Error).message);diff --git a/ee/limits/swr-handler.ts b/ee/limits/swr-handler.tsindex 0b02514e..a574c65f 100644--- a/ee/limits/swr-handler.ts+++ b/ee/limits/swr-handler.ts@@ -12,6 +12,7 @@ export type LimitProps = z.infer<typeof configSchema> & {links: number;users: number;};+ dataroomUpload?: boolean;};export function useLimits() {diff --git a/lib/featureFlags/index.ts b/lib/featureFlags/index.tsindex 6db11e1e..484c39c0 100644--- a/lib/featureFlags/index.ts+++ b/lib/featureFlags/index.ts@@ -6,7 +6,8 @@ export type BetaFeatures =| "roomChangeNotifications"| "embedding"| "webhooks"- | "conversations";+ | "conversations"+ | "dataroomUpload";type BetaFeaturesRecord = Record<BetaFeatures, string[]>;export const getFeatureFlags = async ({ teamId }: { teamId?: string }) => {@@ -17,6 +18,7 @@ export const getFeatureFlags = async ({ teamId }: { teamId?: string }) => {embedding: false,webhooks: false,conversations: false,+ dataroomUpload: false,};// Return all features as true if edge config is not available