fix(dashboard): corrige saída do modo apresentação
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 <noreply@anthropic.com>
This commit is contained in:
parent
245d5dc15b
commit
a04618afc0
1 changed files with 8 additions and 2 deletions
|
|
@ -1231,7 +1231,13 @@ export function DashboardBuilder({ dashboardId, editable = true, mode = "edit" }
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
size="sm"
|
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"
|
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 })
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Minimize2 className="size-4" />
|
<Minimize2 className="size-4" />
|
||||||
Sair da tela cheia
|
Sair da tela cheia
|
||||||
|
|
@ -1267,7 +1273,7 @@ export function DashboardBuilder({ dashboardId, editable = true, mode = "edit" }
|
||||||
activeIndex={activeSectionIndex}
|
activeIndex={activeSectionIndex}
|
||||||
onChange={setActiveSectionIndex}
|
onChange={setActiveSectionIndex}
|
||||||
fullscreen={isFullscreen}
|
fullscreen={isFullscreen}
|
||||||
onExitPresentation={() => handleToggleFullscreen({ requestedByUser: true })}
|
onExitPresentation={handleToggleTvMode}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue