fix: bundle workspace branding assets
This commit is contained in:
1 parent
6ff04ea4e3
commit
1f961ee1df
3 files changed
+10
-4
No files matched your search
@@ -1,5 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import agentAvatarDark from "@/assets/img/agent-avatar.png";
|
||||
import agentAvatarLight from "@/assets/img/agent-avatar-red.png";
|
||||
import { useTheme } from "@/contexts/ThemeContext";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
@@ -30,7 +32,7 @@ export function AgentBrandIcon({
|
||||
const styles = SIZE_STYLES[size];
|
||||
const { theme } = useTheme();
|
||||
const avatarSrc =
|
||||
theme === "light" ? "/agent-avatar-red.png" : "/agent-avatar.png";
|
||||
theme === "light" ? agentAvatarLight : agentAvatarDark;
|
||||
|
||||
return (
|
||||
<span
|
||||
|
||||
@@ -17,6 +17,8 @@ import { usePathname } from "next/navigation";
|
||||
import type { MouseEvent } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import cmAssistantLogoDark from "@/assets/img/cm-assistant-logo.png";
|
||||
import cmAssistantLogoLight from "@/assets/img/cm-assistant-logo-red.png";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useTheme } from "@/contexts/ThemeContext";
|
||||
|
||||
@@ -68,7 +70,7 @@ export function CmChatSidebar({
|
||||
const pathname = usePathname();
|
||||
const navigate = useNavigate();
|
||||
const { theme } = useTheme();
|
||||
const brandLogoSrc = theme === "light" ? "/cm-assistant-logo-red.png" : "/cm-assistant-logo.png";
|
||||
const brandLogoSrc = theme === "light" ? cmAssistantLogoLight : cmAssistantLogoDark;
|
||||
|
||||
const handleNewChat = (event: MouseEvent<HTMLAnchorElement>) => {
|
||||
if (event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1) return;
|
||||
|
||||
@@ -5,6 +5,8 @@ import Link from "next/link";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useSidebar } from "@/components/ui/sidebar";
|
||||
import cmAssistantLogoDark from "@/assets/img/cm-assistant-logo.png";
|
||||
import cmAssistantLogoLight from "@/assets/img/cm-assistant-logo-red.png";
|
||||
import { useTheme } from "@/contexts/ThemeContext";
|
||||
import { useI18n } from "@/core/i18n/hooks";
|
||||
import { env } from "@/env";
|
||||
@@ -14,8 +16,8 @@ function BrandMark({ className }: { className?: string }) {
|
||||
const { theme } = useTheme();
|
||||
const brandLogoSrc =
|
||||
theme === "dark"
|
||||
? "/cm-assistant-logo.png"
|
||||
: "/cm-assistant-logo-red.png";
|
||||
? cmAssistantLogoDark
|
||||
: cmAssistantLogoLight;
|
||||
|
||||
return (
|
||||
<img
|
||||
|
||||
Reference in new issue
Block a user