// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0 // The organization's brand: name, colours and logos, with a preview of both themes and the contrast // each colour has there. Every member sees it; an administrator changes it (`branding.brand.write`, // which the kernel checks before a handler runs), and a member without that permission is shown the // same page read-only. import { PROFILE } from "@app/config" import { brandGet } from "@app/modules/branding" import { BrandForm, brandFormLabels } from "@app/modules/branding/ui" import { tokens } from "@conusai-kit/brand" import { notFound } from "next/navigation" import type { ReactElement } from "react" import { orFallback } from "../../../src/server/guard" import { holdsAtLeast, pageContext } from "../../../src/server/page" import { AppTransport } from "../../../src/ui/transport" export const dynamic = "force-dynamic" export default async function BrandingPage({ params }: { params: Promise<{ org: string }> }): Promise { const { org } = await params if (PROFILE === "convex") notFound() const page = await pageContext() const { caller, i18n, path } = page const brand = await orFallback(path, () => caller.call(brandGet, { org })) const canEdit = await holdsAtLeast(page, org, "admin") const t = (key: string, values?: Record) => i18n.message(`branding.${key}`, values) return ( <>

{i18n.message("branding.title")}

{i18n.message("branding.intro")}

) }