feat(canvas): 画布主题 - 与工作台外观隔离并提高连线对比
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,7 +2,8 @@ import { useState, type CSSProperties, type ReactNode } from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import { appearanceLogoURL, useAppearanceStore } from "@/stores/use-appearance-store";
|
||||
import { useThemeStore, type ThemeName } from "@/stores/use-theme-store";
|
||||
import type { ThemeName } from "@/stores/use-theme-store";
|
||||
import { useActiveTheme } from "@/stores/canvas/use-canvas-theme-store";
|
||||
|
||||
type BrandLogoProps = {
|
||||
className?: string;
|
||||
@@ -13,7 +14,7 @@ type BrandLogoProps = {
|
||||
|
||||
export function BrandLogo({ className, fallback, alt = "", theme = "auto" }: BrandLogoProps) {
|
||||
const appearance = useAppearanceStore((state) => state.appearance);
|
||||
const currentTheme = useThemeStore((state) => state.theme);
|
||||
const currentTheme = useActiveTheme();
|
||||
const source = appearanceLogoURL(appearance, theme === "auto" ? currentTheme : theme);
|
||||
const [failedSource, setFailedSource] = useState<string | null>(null);
|
||||
if (!appearance.logoConfigured) return <>{fallback}</>;
|
||||
|
||||
Reference in New Issue
Block a user