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}