fix: recursos no descargados figuran como faltantes y bloquean progreso
This commit is contained in:
@@ -1257,11 +1257,17 @@ body {
|
||||
<iframe class="pdf-viewer" src="${recursoHref}" id="${pdfId}"></iframe>
|
||||
<a href="${recursoHref}" download class="pdf-download-link">⬇ Descargar PDF</a>
|
||||
</div>\n`;
|
||||
} else if (recursoLocal) {
|
||||
// Otros archivos locales (ZIP, PPT, XLS, MP4, etc)
|
||||
const isVideo = recursoLocal.endsWith(".mp4");
|
||||
const icono = isVideo ? "🎬" : "📦";
|
||||
const etiqueta = isVideo ? "Ver Video" : "Descargar";
|
||||
bodyHTML += `<div class="nota-recurso">${icono} <strong>${etiqueta}:</strong> <a href="${recursoHref}" ${isVideo ? 'target="_blank"' : 'download'}>${tema.titulo}</a></div>\n`;
|
||||
} else {
|
||||
// Otros archivos (ZIP, BIN) o enlaces — link normal
|
||||
const icono = recursoLocal ? "📦" : "🔗";
|
||||
const etiqueta = recursoLocal ? "Descargar" : "Enlace";
|
||||
bodyHTML += `<div class="nota-recurso">${icono} <strong>${etiqueta}:</strong> <a href="${recursoHref}" target="_blank">${tema.titulo}</a></div>\n`;
|
||||
// Faltante / no descargado
|
||||
bodyHTML += `<div class="nota-recurso missing-resource" style="opacity: 0.7; background: #fdf2e9; border-left-color: #e67e22;">
|
||||
⏳ <strong>Recurso pendiente:</strong> <span style="text-decoration: line-through;">${tema.titulo}</span> <em style="font-size:0.85em">(en proceso de descarga...)</em>
|
||||
</div>\n`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user