Rename trust center to compliance page in displayed text

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-29 08:41:18 +04:00
parent fa586d4758
commit 73ec5ce96b
17 changed files with 29 additions and 134 deletions

View File

@@ -19,8 +19,8 @@ export function useUpdateTrustCenterMutation() {
return useMutationWithToasts<TrustCenterGraphUpdateMutation>(
updateTrustCenterMutation,
{
successMessage: "Trust center updated successfully",
errorMessage: "Failed to update trust center",
successMessage: "Compliance Page updated successfully",
errorMessage: "Failed to update compliance page",
},
);
}

View File

@@ -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>
);
}

View File

@@ -49,7 +49,7 @@ export function CompliancePageAccessPage(props: { queryRef: PreloadedQuery<Compl
<h3 className="text-base font-medium">{__("External Access")}</h3>
<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>
</div>

View File

@@ -92,7 +92,7 @@ export function NewCompliancePageAccessDialog(props: {
<DialogContent padded className="space-y-6">
<div>
<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>
<Field

View File

@@ -41,7 +41,7 @@ export function CompliancePageFilesPage(props: {
<div>
<h3 className="text-base font-medium">{__("Files")}</h3>
<p className="text-sm text-txt-tertiary">
{__("Upload and manage files for your trust center")}
{__("Upload and manage files for your compliance page")}
</p>
</div>
{organization.canCreateTrustCenterFile && (

View File

@@ -34,7 +34,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
if (!organization.compliancePage?.id) {
toast({
title: __("Error"),
description: __("Trust center not found"),
description: __("Compliance page not found"),
variant: "error",
});
return;
@@ -62,7 +62,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
if (!organization.compliancePage?.id) {
toast({
title: __("Error"),
description: __("Trust center not found"),
description: __("Compliance page not found"),
variant: "error",
});
return;
@@ -96,7 +96,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
? (
<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>
)
@@ -116,7 +116,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA
</div>
<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>
</div>

View File

@@ -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>
</div>
{slackConnection.createdAt

View File

@@ -44,7 +44,7 @@ export function CompliancePageStatusSection(props: {
if (!organization.compliancePage?.id) {
toast({
title: __("Error"),
description: __("Trust center not found"),
description: __("Compliance page not found"),
variant: "error",
});
return;
@@ -63,7 +63,7 @@ export function CompliancePageStatusSection(props: {
return (
<div className="space-y-4">
<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 />}
</div>
<Card padded className="space-y-4">
@@ -72,7 +72,7 @@ export function CompliancePageStatusSection(props: {
<h3 className="font-medium">{__("Activate Compliance Page")}</h3>
<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>
</div>
@@ -88,7 +88,7 @@ export function CompliancePageStatusSection(props: {
<div className="flex items-center justify-between">
<div>
<h4 className="font-medium text-accent-dark">
{__("Your Compliance Page is live!")}
{__("Your compliance page is live!")}
</h4>
<p className="text-sm text-accent-dark mt-1">
{__("Your customers can now access your compliance page at:")}
@@ -116,11 +116,11 @@ export function CompliancePageStatusSection(props: {
{!organization.compliancePage?.active && (
<div className="mt-4 p-4 bg-tertiary rounded-lg border border-border-solid">
<h4 className="font-medium text-txt-secondary">
{__("Compliance Page is inactive")}
{__("Compliance page is inactive")}
</h4>
<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>
</div>

View File

@@ -54,7 +54,7 @@ export function DomainSettingsPage(props: {
</h3>
<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>
<div className="flex justify-center">