Move trust center profile onto the page

Store website, email, and headquarters on the trust center so
public and admin surfaces read branding from one place. Drop the
trust API organization type and wire console, MCP, CLI, and apps
through the updated schema.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-13 14:17:22 +02:00
parent ec80798243
commit ba53c94bdc
36 changed files with 167 additions and 155 deletions

View File

@@ -32,6 +32,7 @@ const updateCompliancePageMutation = graphql`
id
active
searchEngineIndexing
title
description
websiteUrl
email

View File

@@ -25,6 +25,7 @@ import { useFormWithSchema } from "#/hooks/useFormWithSchema";
const compliancePageFragment = graphql`
fragment CompliancePageProfileSection_compliancePageFragment on TrustCenter {
id
title
description
websiteUrl
email
@@ -34,6 +35,7 @@ const compliancePageFragment = graphql`
`;
const profileSchema = z.object({
title: z.string().min(1),
description: z.string().optional(),
websiteUrl: z.string().optional(),
email: z.string().optional(),
@@ -56,6 +58,7 @@ export function CompliancePageProfileSection(props: {
const { formState, handleSubmit, register } = useFormWithSchema(profileSchema, {
defaultValues: {
title: compliancePage.title,
description: compliancePage.description || "",
websiteUrl: compliancePage.websiteUrl || "",
email: compliancePage.email || "",
@@ -70,6 +73,7 @@ export function CompliancePageProfileSection(props: {
variables: {
input: {
trustCenterId: compliancePage.id,
title: data.title,
description: data.description || null,
websiteUrl: data.websiteUrl || null,
email: data.email || null,
@@ -91,6 +95,13 @@ export function CompliancePageProfileSection(props: {
{formState.isSubmitting && <Spinner />}
</div>
<Card padded className="space-y-4">
<Field
{...register("title")}
readOnly={readOnly}
name="title"
label={__("Title")}
placeholder={__("Your company or product name")}
/>
<div>
<Label>{__("Description")}</Label>
<Textarea

View File

@@ -185,7 +185,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
<div>
<h2 className="text-base font-medium">{__("Visual identity")}</h2>
<p className="text-sm text-txt-tertiary">
{__("Logos displayed on your public compliance page.")}
{__("Square logos displayed on your public compliance page.")}
</p>
</div>
{isUpdating && <Spinner />}
@@ -196,7 +196,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
<div className="flex-1">
<Label>{__("Logo")}</Label>
<p className="text-sm text-txt-tertiary mb-3">
{__("This logo will be displayed on your public compliance page.")}
{__("Upload a square logo for your public compliance page.")}
</p>
<div className="flex items-center gap-4">
@@ -211,7 +211,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
</div>
)
: (
<div className="flex h-16 w-28 shrink-0 items-center justify-center rounded-md border border-dashed border-border-solid bg-surface-secondary text-xs text-txt-tertiary">
<div className="flex size-16 shrink-0 items-center justify-center rounded-md border border-dashed border-border-solid bg-surface-secondary text-xs text-txt-tertiary">
{__("No logo")}
</div>
)}
@@ -230,7 +230,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
</FileButton>
{!currentLogoUrl && (
<p className="text-xs text-txt-tertiary">
{__("PNG, JPG, SVG, or WEBP up to 5MB")}
{__("Square format. PNG, JPG, SVG, or WEBP up to 5MB")}
</p>
)}
</div>
@@ -250,7 +250,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
<div className="flex-1">
<Label>{__("Dark mode logo")}</Label>
<p className="text-sm text-txt-tertiary mb-3">
{__("This logo will be used when dark mode is enabled.")}
{__("Upload a square logo for use when dark mode is enabled.")}
</p>
<div className="flex items-center gap-4">
@@ -265,7 +265,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
</div>
)
: (
<div className="flex h-16 w-28 shrink-0 items-center justify-center rounded-md border border-dashed border-border-solid bg-gray-900 text-xs text-txt-tertiary">
<div className="flex size-16 shrink-0 items-center justify-center rounded-md border border-dashed border-border-solid bg-gray-900 text-xs text-txt-tertiary">
{__("No logo")}
</div>
)}
@@ -284,7 +284,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
</FileButton>
{!currentDarkLogoUrl && (
<p className="text-xs text-txt-tertiary">
{__("PNG, JPG, SVG, or WEBP up to 5MB")}
{__("Square format. PNG, JPG, SVG, or WEBP up to 5MB")}
</p>
)}
</div>

View File

@@ -42,6 +42,9 @@ const compliancePageFragment = graphql`
edges {
node {
id
framework {
id
}
...CompliancePageFrameworkListItem_complianceFramework
}
}
@@ -82,7 +85,7 @@ export function CompliancePageFrameworkList(props: CompliancePageFrameworkListPr
<div className="grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4">
{edges.map(edge => (
<CompliancePageFrameworkListItem
key={edge.node.id}
key={edge.node.framework.id}
complianceFrameworkKey={edge.node}
compliancePageKey={compliancePage}
onRefetch={handleRefetch}