feat: image support

also translated some strings back into english
This commit is contained in:
2025-06-02 04:37:54 +02:00
parent f7583738d7
commit 9de5c85120
17 changed files with 125 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
document.addEventListener("DOMContentLoaded", () => {
document.addEventListener("DOMContentLoaded", () => {
// Obsługuje kliknięcie na przycisk "Usuń"
document.body.addEventListener("click", async (e) => {
const target = e.target as HTMLElement;
@@ -13,7 +13,7 @@
window.location.href = "/modify.html?event=" + id;
break;
case "remove-btn":
const confirmed = confirm("Na pewno chcesz usunąć to wydarzenie?"); // Potwierdzenie usunięcia
const confirmed = confirm("Are you sure?"); // Potwierdzenie usunięcia
if (!confirmed) return;
try {
@@ -27,14 +27,14 @@
const card = target.closest(".event-card");
if (card) card.remove();
} else {
alert("Błąd podczas usuwania wydarzenia.");
alert("Couldn't delete that event.");
}
} catch (err) {
alert("Błąd połączenia z serwerem.");
alert("Server connection failure.");
console.error(err);
}
break;
}
});
});
});