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