Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
refactor: cleanup find colors from accentcolor
Marc Seitzb22acd2befc9
diff --git a/components/NotionPage.tsx b/components/NotionPage.tsxindex 737678a6..2431273f 100644--- a/components/NotionPage.tsx+++ b/components/NotionPage.tsx@@ -311,10 +311,7 @@ export const NotionPage = ({className="cursor-pointer underline underline-offset-4 hover:font-medium"onClick={() => setSubPageId(null)}style={{- color:- brand && brand.brandColor- ? determineTextColor(brand.brandColor)- : "white",+ color: determineTextColor(brand?.brandColor),}}>{title}@@ -327,10 +324,7 @@ export const NotionPage = ({<BreadcrumbPageclassName="font-medium"style={{- color:- brand && brand.brandColor- ? determineTextColor(brand.brandColor)- : "white",+ color: determineTextColor(brand?.brandColor),}}>{subTitle}diff --git a/components/view/access-form/agreement-section.tsx b/components/view/access-form/agreement-section.tsxindex ca608118..c82d1792 100644--- a/components/view/access-form/agreement-section.tsx+++ b/components/view/access-form/agreement-section.tsx@@ -37,10 +37,7 @@ export default function AgreementSection({<labelclassName="text-sm font-normal leading-5 text-white peer-disabled:cursor-not-allowed peer-disabled:opacity-70"style={{- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}>I have reviewed and agree to the terms of this{" "}@@ -50,10 +47,7 @@ export default function AgreementSection({rel="noreferrer noopener"className="underline hover:text-gray-200"style={{- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}>{agreementName}diff --git a/components/view/access-form/custom-fields-section.tsx b/components/view/access-form/custom-fields-section.tsxindex 45c0fbfc..89812a91 100644--- a/components/view/access-form/custom-fields-section.tsx+++ b/components/view/access-form/custom-fields-section.tsx@@ -41,10 +41,7 @@ export default function CustomFieldsSection({htmlFor={field.identifier}className="block text-sm font-medium leading-6 text-white"style={{- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}>{field.label}@@ -63,10 +60,7 @@ export default function CustomFieldsSection({style={{backgroundColor:brand && brand.accentColor ? brand.accentColor : "black",- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}value={value}placeholder={field.placeholder || ""}diff --git a/components/view/access-form/email-section.tsx b/components/view/access-form/email-section.tsxindex 0997fa15..aeea8dba 100644--- a/components/view/access-form/email-section.tsx+++ b/components/view/access-form/email-section.tsx@@ -96,10 +96,7 @@ export default function EmailSection({htmlFor="email"className="block text-sm font-medium leading-6 text-white"style={{- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}>Email address@@ -121,9 +118,7 @@ export default function EmailSection({brand && brand.accentColor ? brand.accentColor : "black",color: disableEditEmail? "hsl(var(--muted-foreground))"- : brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ : determineTextColor(brand?.accentColor),}}value={email || ""}placeholder="Enter email"@@ -141,9 +136,7 @@ export default function EmailSection({id="email-error"className="mt-1 text-sm text-red-500"style={{- color: brand?.accentColor- ? determineTextColor(brand.accentColor)- : "rgb(239 68 68)",+ color: determineTextColor(brand?.accentColor),}}>{emailError}diff --git a/components/view/access-form/name-section.tsx b/components/view/access-form/name-section.tsxindex b6ea5197..5980de2f 100644--- a/components/view/access-form/name-section.tsx+++ b/components/view/access-form/name-section.tsx@@ -42,10 +42,7 @@ export default function NameSection({htmlFor="name"className="block text-sm font-medium leading-6 text-white"style={{- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}>Name@@ -61,10 +58,7 @@ export default function NameSection({style={{backgroundColor:brand && brand.accentColor ? brand.accentColor : "black",- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}value={name || ""}placeholder="Enter your full name"diff --git a/components/view/access-form/password-section.tsx b/components/view/access-form/password-section.tsxindex 273b003e..3fb77730 100644--- a/components/view/access-form/password-section.tsx+++ b/components/view/access-form/password-section.tsx@@ -27,10 +27,7 @@ export default function PasswordSection({htmlFor="password"className="block text-sm font-medium leading-6 text-white"style={{- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}>Passcode@@ -46,10 +43,7 @@ export default function PasswordSection({style={{backgroundColor:brand && brand.accentColor ? brand.accentColor : "black",- color:- brand && brand.accentColor- ? determineTextColor(brand.accentColor)- : "white",+ color: determineTextColor(brand?.accentColor),}}value={password || ""}placeholder="Enter passcode"diff --git a/components/view/nav.tsx b/components/view/nav.tsxindex b264918d..43066f8d 100644--- a/components/view/nav.tsx+++ b/components/view/nav.tsx@@ -163,10 +163,7 @@ export default function Nav({className="cursor-pointer underline underline-offset-4 hover:font-medium"onClick={() => setDocumentData(null)}style={{- color:- brand && brand.brandColor- ? determineTextColor(brand.brandColor)- : "white",+ color: determineTextColor(brand?.brandColor),}}>Home@@ -179,10 +176,7 @@ export default function Nav({<BreadcrumbPageclassName="font-medium"style={{- color:- brand && brand.brandColor- ? determineTextColor(brand.brandColor)- : "white",+ color: determineTextColor(brand?.brandColor),}}>{documentName ?? "Document"}diff --git a/pages/entrance_ppreview_demo.tsx b/pages/entrance_ppreview_demo.tsxindex 355117e4..0df56551 100644--- a/pages/entrance_ppreview_demo.tsx+++ b/pages/entrance_ppreview_demo.tsx@@ -22,7 +22,7 @@ export default function ViewPage() {<h1className="mt-16 text-2xl font-bold leading-9 tracking-tight text-white"style={{- color: accentColor ? determineTextColor(accentColor) : "white",+ color: determineTextColor(accentColor),}}>Your action is requested to continue@@ -37,9 +37,7 @@ export default function ViewPage() {htmlFor="email"className="block text-sm font-medium leading-6 text-white"style={{- color: accentColor- ? determineTextColor(accentColor)- : "white",+ color: determineTextColor(accentColor),}}>Email address