Bilder
This commit is contained in:
@@ -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 = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user