Rename trust center to compliance page in displayed text
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -19,8 +19,8 @@ export function useUpdateTrustCenterMutation() {
|
|||||||
return useMutationWithToasts<TrustCenterGraphUpdateMutation>(
|
return useMutationWithToasts<TrustCenterGraphUpdateMutation>(
|
||||||
updateTrustCenterMutation,
|
updateTrustCenterMutation,
|
||||||
{
|
{
|
||||||
successMessage: "Trust center updated successfully",
|
successMessage: "Compliance Page updated successfully",
|
||||||
errorMessage: "Failed to update trust center",
|
errorMessage: "Failed to update compliance page",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,105 +0,0 @@
|
|||||||
import { useTranslate } from "@probo/i18n";
|
|
||||||
import { Button, IconArrowBoxLeft, Logo, useToast } from "@probo/ui";
|
|
||||||
import type { ReactNode } from "react";
|
|
||||||
import { Outlet } from "react-router";
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
organizationName: string;
|
|
||||||
organizationLogo?: string | null;
|
|
||||||
children?: ReactNode;
|
|
||||||
isAuthenticated?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export function PublicTrustCenterLayout({
|
|
||||||
organizationName,
|
|
||||||
organizationLogo,
|
|
||||||
children,
|
|
||||||
isAuthenticated,
|
|
||||||
}: Props) {
|
|
||||||
const { __ } = useTranslate();
|
|
||||||
const { toast } = useToast();
|
|
||||||
|
|
||||||
const handleLogout = async () => {
|
|
||||||
try {
|
|
||||||
const response = await fetch("/api/trust/v1/auth/logout", {
|
|
||||||
method: "DELETE",
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
credentials: "include",
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error("Logout failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.reload();
|
|
||||||
} catch {
|
|
||||||
toast({
|
|
||||||
title: __("Error"),
|
|
||||||
description: __("Logout failed"),
|
|
||||||
variant: "error",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="min-h-screen bg-level-0">
|
|
||||||
<header className="bg-level-1 border-b border-border-solid">
|
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
||||||
<div className="flex items-center justify-between h-16">
|
|
||||||
<div className="flex items-center space-x-4">
|
|
||||||
{organizationLogo
|
|
||||||
? (
|
|
||||||
<img
|
|
||||||
src={organizationLogo}
|
|
||||||
alt={organizationName}
|
|
||||||
className="h-8 w-8 rounded"
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
: (
|
|
||||||
<Logo className="h-8 w-8" />
|
|
||||||
)}
|
|
||||||
<div>
|
|
||||||
<h1 className="text-lg font-semibold text-txt-primary">
|
|
||||||
{organizationName}
|
|
||||||
</h1>
|
|
||||||
<p className="text-sm text-txt-secondary">Trust Center</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center space-x-4">
|
|
||||||
<div className="text-sm text-txt-tertiary">
|
|
||||||
<a
|
|
||||||
href="https://www.getprobo.com/"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="hover:text-txt-secondary transition-colors flex items-center space-x-1"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
src="/favicons/favicon.ico"
|
|
||||||
alt="Probo"
|
|
||||||
className="h-4 w-4"
|
|
||||||
/>
|
|
||||||
<span>Powered by Probo</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{isAuthenticated && (
|
|
||||||
<Button
|
|
||||||
variant="tertiary"
|
|
||||||
icon={IconArrowBoxLeft}
|
|
||||||
onClick={() => void handleLogout()}
|
|
||||||
title={__("Logout")}
|
|
||||||
className="text-sm"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
||||||
{children || <Outlet />}
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -49,7 +49,7 @@ export function CompliancePageAccessPage(props: { queryRef: PreloadedQuery<Compl
|
|||||||
<h3 className="text-base font-medium">{__("External Access")}</h3>
|
<h3 className="text-base font-medium">{__("External Access")}</h3>
|
||||||
<p className="text-sm text-txt-tertiary">
|
<p className="text-sm text-txt-tertiary">
|
||||||
{__(
|
{__(
|
||||||
"Manage who can access your trust center with time-limited tokens",
|
"Manage who can access your compliance page",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export function NewCompliancePageAccessDialog(props: {
|
|||||||
<DialogContent padded className="space-y-6">
|
<DialogContent padded className="space-y-6">
|
||||||
<div>
|
<div>
|
||||||
<p className="text-txt-secondary text-sm mb-4">
|
<p className="text-txt-secondary text-sm mb-4">
|
||||||
{__("Give a person access to your trust center")}
|
{__("Give a person access to your compliance page")}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export function CompliancePageFilesPage(props: {
|
|||||||
<div>
|
<div>
|
||||||
<h3 className="text-base font-medium">{__("Files")}</h3>
|
<h3 className="text-base font-medium">{__("Files")}</h3>
|
||||||
<p className="text-sm text-txt-tertiary">
|
<p className="text-sm text-txt-tertiary">
|
||||||
{__("Upload and manage files for your trust center")}
|
{__("Upload and manage files for your compliance page")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{organization.canCreateTrustCenterFile && (
|
{organization.canCreateTrustCenterFile && (
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
|
|||||||
if (!organization.compliancePage?.id) {
|
if (!organization.compliancePage?.id) {
|
||||||
toast({
|
toast({
|
||||||
title: __("Error"),
|
title: __("Error"),
|
||||||
description: __("Trust center not found"),
|
description: __("Compliance page not found"),
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -62,7 +62,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
|
|||||||
if (!organization.compliancePage?.id) {
|
if (!organization.compliancePage?.id) {
|
||||||
toast({
|
toast({
|
||||||
title: __("Error"),
|
title: __("Error"),
|
||||||
description: __("Trust center not found"),
|
description: __("Compliance page not found"),
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -96,7 +96,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
|
|||||||
? (
|
? (
|
||||||
<p className="text-sm text-txt-tertiary">
|
<p className="text-sm text-txt-tertiary">
|
||||||
{__(
|
{__(
|
||||||
"Upload a Non-Disclosure Agreement that visitors must accept before accessing your trust center",
|
"Upload a Non-Disclosure Agreement that visitors must accept before accessing your compliance page",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
)
|
)
|
||||||
@@ -116,7 +116,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
|
|||||||
</div>
|
</div>
|
||||||
<p className="text-xs text-txt-tertiary">
|
<p className="text-xs text-txt-tertiary">
|
||||||
{__(
|
{__(
|
||||||
"Visitors will need to accept this NDA before accessing your trust center",
|
"Visitors will need to accept this NDA before accessing your compliance page",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export function CompliancePageSlackSection(props: { fragmentRef: CompliancePageS
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
: __("Manage your trust center access with slack")}
|
: __("Manage your compliance page access with slack")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{slackConnection.createdAt
|
{slackConnection.createdAt
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export function CompliancePageStatusSection(props: {
|
|||||||
if (!organization.compliancePage?.id) {
|
if (!organization.compliancePage?.id) {
|
||||||
toast({
|
toast({
|
||||||
title: __("Error"),
|
title: __("Error"),
|
||||||
description: __("Trust center not found"),
|
description: __("Compliance page not found"),
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -63,7 +63,7 @@ export function CompliancePageStatusSection(props: {
|
|||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<h2 className="text-base font-medium">{__("Trust Center Status")}</h2>
|
<h2 className="text-base font-medium">{__("Compliance Page Status")}</h2>
|
||||||
{isUpdating && <Spinner />}
|
{isUpdating && <Spinner />}
|
||||||
</div>
|
</div>
|
||||||
<Card padded className="space-y-4">
|
<Card padded className="space-y-4">
|
||||||
@@ -72,7 +72,7 @@ export function CompliancePageStatusSection(props: {
|
|||||||
<h3 className="font-medium">{__("Activate Compliance Page")}</h3>
|
<h3 className="font-medium">{__("Activate Compliance Page")}</h3>
|
||||||
<p className="text-sm text-txt-tertiary">
|
<p className="text-sm text-txt-tertiary">
|
||||||
{__(
|
{__(
|
||||||
"Make your Compliance Page publicly accessible to build customer confidence",
|
"Make your compliance page publicly accessible to build customer confidence",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,7 +88,7 @@ export function CompliancePageStatusSection(props: {
|
|||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h4 className="font-medium text-accent-dark">
|
<h4 className="font-medium text-accent-dark">
|
||||||
{__("Your Compliance Page is live!")}
|
{__("Your compliance page is live!")}
|
||||||
</h4>
|
</h4>
|
||||||
<p className="text-sm text-accent-dark mt-1">
|
<p className="text-sm text-accent-dark mt-1">
|
||||||
{__("Your customers can now access your compliance page at:")}
|
{__("Your customers can now access your compliance page at:")}
|
||||||
@@ -116,11 +116,11 @@ export function CompliancePageStatusSection(props: {
|
|||||||
{!organization.compliancePage?.active && (
|
{!organization.compliancePage?.active && (
|
||||||
<div className="mt-4 p-4 bg-tertiary rounded-lg border border-border-solid">
|
<div className="mt-4 p-4 bg-tertiary rounded-lg border border-border-solid">
|
||||||
<h4 className="font-medium text-txt-secondary">
|
<h4 className="font-medium text-txt-secondary">
|
||||||
{__("Compliance Page is inactive")}
|
{__("Compliance page is inactive")}
|
||||||
</h4>
|
</h4>
|
||||||
<p className="text-sm text-txt-tertiary mt-1">
|
<p className="text-sm text-txt-tertiary mt-1">
|
||||||
{__(
|
{__(
|
||||||
"Your Compliance Page is currently not accessible to the public. Enable it to start sharing your compliance status.",
|
"Your compliance page is currently not accessible to the public. Enable it to start sharing your compliance status.",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export function DomainSettingsPage(props: {
|
|||||||
</h3>
|
</h3>
|
||||||
<p className="text-txt-tertiary mb-4">
|
<p className="text-txt-tertiary mb-4">
|
||||||
{__(
|
{__(
|
||||||
"Add your own domain to make your trust center more professional",
|
"Add your own domain to make your compliance page more professional",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<meta name="msapplication-square310x310logo" content="/favicons/mstile-310x310.png" />
|
<meta name="msapplication-square310x310logo" content="/favicons/mstile-310x310.png" />
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Trust Center</title>
|
<title>Compliance Page</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="text-txt-primary bg-level-0">
|
<body class="text-txt-primary bg-level-0">
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export function NDADialog({
|
|||||||
<p className="text-txt-secondary">
|
<p className="text-txt-secondary">
|
||||||
{sprintf(
|
{sprintf(
|
||||||
__(
|
__(
|
||||||
"Access to %s Trust Center documents requires signing a Non-Disclosure Agreement (NDA). Please review the agreement below. Once signed, you’ll receive immediate access to the requested documents.",
|
"Access to %s compliance page documents requires signing a Non-Disclosure Agreement (NDA). Please review the agreement below. Once signed, you’ll receive immediate access to the requested documents.",
|
||||||
),
|
),
|
||||||
organizationName,
|
organizationName,
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function PageError({ resetErrorBoundary, error: propsError }: Props) {
|
|||||||
: __("Invalid Access Link");
|
: __("Invalid Access Link");
|
||||||
const description = isExpiredToken
|
const description = isExpiredToken
|
||||||
? __(
|
? __(
|
||||||
"This access link has expired. Trust center access links are valid for 7 days for security reasons.",
|
"This access link has expired. Compliance page access links are valid for 7 days for security reasons.",
|
||||||
)
|
)
|
||||||
: __(
|
: __(
|
||||||
"This access link is not valid. It may have been revoked or the link might be incorrect.",
|
"This access link is not valid. It may have been revoked or the link might be incorrect.",
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ const (
|
|||||||
subjectDocumentSigning = "Action Required – Please review and sign %s compliance documents"
|
subjectDocumentSigning = "Action Required – Please review and sign %s compliance documents"
|
||||||
subjectDocumentExport = "Your document export is ready"
|
subjectDocumentExport = "Your document export is ready"
|
||||||
subjectFrameworkExport = "Your framework export is ready"
|
subjectFrameworkExport = "Your framework export is ready"
|
||||||
subjectTrustCenterAccess = "Trust Center Access Invitation - %s"
|
subjectTrustCenterAccess = "Compliance Page Access Invitation - %s"
|
||||||
subjectTrustCenterDocumentAccessRejected = "Trust Center Document Access Rejected - %s"
|
subjectTrustCenterDocumentAccessRejected = "Compliance Page Document Access Rejected - %s"
|
||||||
subjectMagicLink = "Connect to Probo"
|
subjectMagicLink = "Connect to Probo"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ import EmailLayout, {
|
|||||||
export const TrustCenterAccess = () => {
|
export const TrustCenterAccess = () => {
|
||||||
return (
|
return (
|
||||||
<EmailLayout
|
<EmailLayout
|
||||||
subject={`Trust Center Access Invitation - ${"{{.OrganizationName}}"}`}
|
subject={`Compliance Page Access Invitation - ${"{{.OrganizationName}}"}`}
|
||||||
>
|
>
|
||||||
<Text style={bodyText}>
|
<Text style={bodyText}>
|
||||||
You have been granted access to{" "}
|
You have been granted access to{" "}
|
||||||
<strong>{"{{.OrganizationName}}"}</strong>'s Trust Center! Click the
|
<strong>{"{{.OrganizationName}}"}</strong>'s compliance page! Click the
|
||||||
button below to access it:
|
button below to access it:
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Section style={buttonContainer}>
|
<Section style={buttonContainer}>
|
||||||
<Button style={button} href={"{{.AccessUrl}}"}>
|
<Button style={button} href={"{{.AccessUrl}}"}>
|
||||||
Access Trust Center
|
Access Compliance Page
|
||||||
</Button>
|
</Button>
|
||||||
</Section>
|
</Section>
|
||||||
</EmailLayout>
|
</EmailLayout>
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import EmailLayout, { bodyText } from './components/EmailLayout';
|
|||||||
|
|
||||||
export const TrustCenterDocumentAccessRejected = () => {
|
export const TrustCenterDocumentAccessRejected = () => {
|
||||||
return (
|
return (
|
||||||
<EmailLayout subject={`Trust Center Document Access Rejected - ${'{{.OrganizationName}}'}`}>
|
<EmailLayout subject={`Compliance Page Document Access Rejected - ${'{{.OrganizationName}}'}`}>
|
||||||
<Text style={bodyText}>
|
<Text style={bodyText}>
|
||||||
Your access request to the following files in <strong>{'{{.OrganizationName}}'}</strong>'s Trust Center has been rejected:
|
Your access request to the following files in <strong>{'{{.OrganizationName}}'}</strong>'s compliance page has been rejected:
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text style={bodyText}>
|
<Text style={bodyText}>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Probo
|
|||||||
|
|
||||||
Hi {{.FullName}},
|
Hi {{.FullName}},
|
||||||
|
|
||||||
You have been granted access to {{.OrganizationName}}'s Trust Center! Click the link below to access it:
|
You have been granted access to {{.OrganizationName}}'s compliance page! Click the link below to access it:
|
||||||
|
|
||||||
{{.AccessUrl}}
|
{{.AccessUrl}}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Probo
|
|||||||
|
|
||||||
Hi {{.FullName}},
|
Hi {{.FullName}},
|
||||||
|
|
||||||
Your access request to the following files in {{.OrganizationName}}'s Trust Center has been rejected:
|
Your access request to the following files in {{.OrganizationName}}'s compliance page has been rejected:
|
||||||
|
|
||||||
{{range .FileNames}}
|
{{range .FileNames}}
|
||||||
- {{.}}
|
- {{.}}
|
||||||
|
|||||||
Reference in New Issue
Block a user