From a04618afc0a52f170df41b682a781e5dd72d8d9e Mon Sep 17 00:00:00 2001 From: esdrasrenan Date: Sat, 13 Dec 2025 22:51:05 -0300 Subject: [PATCH] =?UTF-8?q?fix(dashboard):=20corrige=20sa=C3=ADda=20do=20m?= =?UTF-8?q?odo=20apresenta=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ao clicar em "Encerrar" ou "Sair da tela cheia" no modo apresentação, agora desativa corretamente o modo TV (remove param ?tv=1), evitando que o fullscreen seja reativado automaticamente pelo useEffect. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/components/dashboards/dashboard-builder.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/dashboards/dashboard-builder.tsx b/src/components/dashboards/dashboard-builder.tsx index 3b82db5..c4aa4a4 100644 --- a/src/components/dashboards/dashboard-builder.tsx +++ b/src/components/dashboards/dashboard-builder.tsx @@ -1231,7 +1231,13 @@ export function DashboardBuilder({ dashboardId, editable = true, mode = "edit" } variant="secondary" size="sm" className="pointer-events-auto gap-2 rounded-full border border-slate-200 bg-white/90 px-4 py-2 text-sm font-semibold text-slate-900 shadow-lg transition hover:bg-white" - onClick={() => handleToggleFullscreen({ requestedByUser: true })} + onClick={() => { + if (enforceTv) { + handleToggleTvMode() + } else { + handleToggleFullscreen({ requestedByUser: true }) + } + }} > Sair da tela cheia @@ -1267,7 +1273,7 @@ export function DashboardBuilder({ dashboardId, editable = true, mode = "edit" } activeIndex={activeSectionIndex} onChange={setActiveSectionIndex} fullscreen={isFullscreen} - onExitPresentation={() => handleToggleFullscreen({ requestedByUser: true })} + onExitPresentation={handleToggleTvMode} /> ) : null}