feat(canvas): 画布主题 - 与工作台外观隔离并提高连线对比

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ddCatandCursor committed 2026-09-16 22:59:34 +08:00
1 parent da0531f6eb
commit cb405e9b6a
54 files changed
+207 -134

No files matched your search

@@ -16,7 +16,7 @@ import {
type ProjectStyleSelection,
} from "@/lib/canvas/canvas-style-system";
import { createStyleProfile, deleteStyleProfile, listStyleProfiles, setStyleProfileFavorite, touchStyleProfile, updateStyleProfile, type UserStyleProfile } from "@/services/api/style-profiles";
import { useThemeStore } from "@/stores/use-theme-store";
import { useActiveTheme } from "@/stores/canvas/use-canvas-theme-store";
export type { CanvasStylePreset } from "@/lib/canvas/canvas-style-system";
@@ -437,7 +437,7 @@ export function CanvasStylePickerModal({ open, value, currentProfile, startInEdi
}) {
const { message, modal } = App.useApp();
const queryClient = useQueryClient();
const theme = canvasThemes[useThemeStore((state) => state.theme)];
const theme = canvasThemes[useActiveTheme()];
const [detailPreset, setDetailPreset] = useState<CanvasStylePreset | null>(null);
const [tab, setTab] = useState<StyleCenterTab>("system");
const [query, setQuery] = useState("");
@@ -670,7 +670,7 @@ function editableCopy(profile: StyleProfileSnapshot, entityId?: string, title?:
}
export function CanvasStyleDetailModal({ open, preset, selected = false, onClose, onSelect }: { open: boolean; preset: CanvasStylePreset | null; selected?: boolean; onClose: () => void; onSelect?: (preset: CanvasStylePreset) => void }) {
const theme = canvasThemes[useThemeStore((state) => state.theme)];
const theme = canvasThemes[useActiveTheme()];
const sections = preset ? parseStyleSections(preset.prompt) : [];
return (
<AppModal rootClassName="canvas-style-detail-modal" open={open} title={null} footer={null} centered destroyOnHidden width="min(820px, calc(100vw - 24px))" onCancel={onClose} flush>