This commit is contained in:
ChK
2026-04-05 08:08:13 +02:00
parent d2096eca70
commit edb7c825fc
3 changed files with 33 additions and 4 deletions

View File

@@ -123,6 +123,7 @@ async function fetchCSV() {
async function renderSnapshot() {
const table = document.getElementById("snapshot-table");
const pictureEl = document.getElementById("snapshot-info-picture");
if (!table) return;
try {
@@ -134,6 +135,22 @@ async function renderSnapshot() {
infoEl.textContent = `Datei: ${data.filename}, Geändert: ${new Date(data.mtime).toLocaleString()}, Zeilen: ${rows.length}`;
}
// Bild anzeigen, falls vorhanden
if (pictureEl) {
let imagesHtml = '';
if (data.imageFile) {
imagesHtml += `<img src="data:${data.imageFile.mimeType};base64,${data.imageFile.contentBase64}" alt="${data.imageFile.filename}" style="max-width: calc(50% - 2.5px); height: auto;">`;
}
if (data.image2) {
imagesHtml += `<img src="data:${data.image2.mimeType};base64,${data.image2.contentBase64}" alt="${data.image2.filename}" style="max-width: calc(50% - 2.5px); height: auto;">`;
}
if (imagesHtml) {
pictureEl.innerHTML = `<div style="display: flex; gap: 5px;">${imagesHtml}</div>`;
} else {
pictureEl.innerHTML = "";
}
}
// Tabelle leeren
table.innerHTML = "";