From bc7194d5b0b8233b067ff54760daa9643c3aa737 Mon Sep 17 00:00:00 2001 From: Githelp AI Aagent Date: Tue, 25 Aug 2026 18:56:26 +0000 Subject: [PATCH] feat: What to change: The sync between color chosen at the Branding page under Sett... Task: a1a4a7dd Source: slack Requested by: U04E9DZ5ELF --- src/app/projects/[id]/page.tsx | 6 +++++- src/app/support/chat/page.tsx | 2 +- src/app/support/get-support/page.tsx | 6 +++++- src/app/support/page.tsx | 6 +++--- src/components/layout/top-bar.tsx | 15 +++++++++++++-- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/app/projects/[id]/page.tsx b/src/app/projects/[id]/page.tsx index 51b811d..5df5fa6 100644 --- a/src/app/projects/[id]/page.tsx +++ b/src/app/projects/[id]/page.tsx @@ -13,6 +13,7 @@ import { toast } from "sonner" import Image from "next/image" import Link from "next/link" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" +import { cn } from "@/lib/utils" const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i @@ -154,7 +155,10 @@ export default function ProjectLandingPage() { /> ) : ( - + {projectName?.[0]?.toUpperCase() || "?"} diff --git a/src/app/support/chat/page.tsx b/src/app/support/chat/page.tsx index c27745e..4f2c022 100644 --- a/src/app/support/chat/page.tsx +++ b/src/app/support/chat/page.tsx @@ -644,7 +644,7 @@ export default function UserSupportChatPage() { ) : (
{projectName?.[0]?.toUpperCase() || "A"}
diff --git a/src/app/support/get-support/page.tsx b/src/app/support/get-support/page.tsx index 055ee87..7147026 100644 --- a/src/app/support/get-support/page.tsx +++ b/src/app/support/get-support/page.tsx @@ -10,6 +10,7 @@ import { useSearchParams } from "next/navigation" import { useProject, useProjectBySlug, useProjectBranding } from "@/hooks/useProject" import { useUser } from "@/contexts/user-context" import { useProjectRole } from "@/hooks/useProjectRole" +import { cn } from "@/lib/utils" export default function GetSupportPage() { const searchParams = useSearchParams() @@ -67,7 +68,10 @@ export default function GetSupportPage() {
- + {projectName?.[0]?.toUpperCase() || "?"} diff --git a/src/app/support/page.tsx b/src/app/support/page.tsx index 8458636..3abce0f 100644 --- a/src/app/support/page.tsx +++ b/src/app/support/page.tsx @@ -366,7 +366,7 @@ export default function SupportPage() { ) : (
{projectName?.[0]?.toUpperCase() || "A"}
@@ -477,7 +477,7 @@ export default function SupportPage() { ) : (
{projectName?.[0]?.toUpperCase() || "A"}
@@ -529,7 +529,7 @@ export default function SupportPage() { // header — only on this icon, not on any other avatar icon in // the chat. className="w-11 h-11 rounded-[12px] flex items-center justify-center text-base font-medium text-foreground border border-[#E1E4EA]" - style={{ backgroundColor: getAvatarColorHexForId(projectId) }} + style={{ backgroundColor: brandingData?.primary_color || getAvatarColorHexForId(projectId) }} > {projectName?.[0]?.toUpperCase() || "A"}
diff --git a/src/components/layout/top-bar.tsx b/src/components/layout/top-bar.tsx index 6a06826..6ec1c83 100644 --- a/src/components/layout/top-bar.tsx +++ b/src/components/layout/top-bar.tsx @@ -45,10 +45,12 @@ const ProjectLogo = ({ logoUrl, projectName, size = "w-6 h-6", + primaryColor, }: { logoUrl: string | null | undefined projectName: string size?: string + primaryColor?: string | null }) => { const firstLetter = projectName?.[0]?.toUpperCase() || "?" const radius = sizeRadiusMap[size] || "rounded-[9px]" @@ -57,7 +59,10 @@ const ProjectLogo = ({ return ( {hasLogo ? : null} - + {firstLetter} @@ -240,6 +245,7 @@ export function TopBar() { logoUrl={getProjectLogo(selectedProject, selectedProjectBranding)} projectName={selectedProject?.name || ""} size="w-[22px] h-[22px]" + primaryColor={selectedProjectBranding?.primary_color} /> {selectedProject?.name || "Select Project"} @@ -339,7 +345,12 @@ function ProjectLogoWithBranding({ onClick={() => onSelect(project)} className={`group gap-2 ${isSelected ? "bg-brand-primary/10 text-brand-primary focus:bg-brand-primary/15 focus:text-brand-primary" : ""}`} > - +