Correcao de sintaxe no app.js e aprimoramento da geracao e visualizacao de ilustracoes em Inventando Historias

This commit is contained in:
2026-09-01 02:33:04 +00:00
parent ee1cd3bbe5
commit 12283f29f2
3 changed files with 107 additions and 67 deletions
+10 -1
View File
@@ -7610,6 +7610,8 @@ window.toggleCustomAudio = (btn) => {
turmaId: musicaTurmaSelect?.value || null,
gerarAudio: true
})
});
if (!res.ok) {
const errMsg = await safeExtractError(res, 'Erro ao compor música');
throw new Error(errMsg);
@@ -8117,7 +8119,14 @@ window.toggleCustomAudio = (btn) => {
// Imagem da cena
if (cena.imageUrl) {
if (historiaCenaImg) historiaCenaImg.src = cena.imageUrl;
if (historiaCenaImg) {
historiaCenaImg.src = cena.imageUrl;
historiaCenaImg.onclick = () => window.open(cena.imageUrl, '_blank');
}
const historiaCenaOpenBtn = document.getElementById('historiaCenaOpenBtn');
const historiaCenaDownloadBtn = document.getElementById('historiaCenaDownloadBtn');
if (historiaCenaOpenBtn) historiaCenaOpenBtn.href = cena.imageUrl;
if (historiaCenaDownloadBtn) historiaCenaDownloadBtn.href = cena.imageUrl;
if (historiaCenaImageContainer) historiaCenaImageContainer.style.display = 'block';
if (btnGenerateSceneImage) btnGenerateSceneImage.innerHTML = '🔄 Regenerar Ilustração';
} else {