fix: respect style mode toolbar toggle
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-05-16 22:51:53 +08:00
parent f726c14397
commit e81a022b6f

View File

@ -1972,6 +1972,10 @@ export default function CanvasEditorLegacyPage({ params }: PageProps) {
const isBatchProcessingEnabled =
workflowPageFeatureSettings.batchProcessingEnabled !== false &&
sceneFusionConfigData?.enabled !== false;
const isStyleModeToolbarEnabled = isCanvasToolbarItemEnabled(
canvasToolbarConfig,
"styleMode"
);
const isStyleProToolbarEnabled =
isCanvasToolbarItemEnabled(canvasToolbarConfig, "stylePro") &&
siteSettingsData?.styleProEnabled !== false;
@ -10180,7 +10184,9 @@ export default function CanvasEditorLegacyPage({ params }: PageProps) {
</Tooltip>
) : null}
{isAgentWorkspaceEnabled && !isVideoMode ? (
{isAgentWorkspaceEnabled &&
isStyleModeToolbarEnabled &&
!isVideoMode ? (
<Tooltip>
<TooltipTrigger asChild>
<Button