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,11 +1,12 @@
import { getEvent, getMyAccount, unhideElementById } from './generalUseHelpers.js';
import { getEvent, getMyAccount, unhideElementById } from './generalUseHelpers.js';
async function createEvent() {
// Pobieranie danych z formularza
const title = (document.getElementById('title') as HTMLInputElement).value;
const location = (document.getElementById('location') as HTMLInputElement).value;
const description = (document.getElementById('description') as HTMLTextAreaElement).value;
const eventDateRaw = (document.getElementById('eventDate') as HTMLInputElement).value;
const title = (document.getElementById('title') as HTMLInputElement).value;
const location = (document.getElementById('location') as HTMLInputElement).value;
const description = (document.getElementById('description') as HTMLTextAreaElement).value;
const imageURL = (document.getElementById('imageURL') as HTMLInputElement).value;
const eventDateRaw = (document.getElementById('eventDate') as HTMLInputElement).value;
// Walidacja prostych pól
if (!title || !location || !eventDateRaw) {
@@ -19,6 +20,7 @@ async function createEvent() {
title,
location,
description,
imageURL,
eventDate,
};
@@ -62,4 +64,4 @@ document.addEventListener("DOMContentLoaded", async () => {
createEvent();
});
}
});
});