program finalizat

This commit is contained in:
andrei-mihnea-cerbu
2024-10-29 15:07:26 +02:00
parent ab1eaec413
commit 979539d3db
138 changed files with 14602 additions and 5068 deletions
+22
View File
@@ -0,0 +1,22 @@
document.addEventListener('DOMContentLoaded', function () {
const submitButton = document.getElementById('submitAnnouncement');
const buttonBack = document.getElementById('backButton');
const announcementTextarea = document.getElementById('announcementMessage');
buttonBack.addEventListener('click', function () {
fadeOut('main_menu');
});
submitButton.addEventListener('click', async function () {
const message = announcementTextarea.value.trim();
if (message === '') {
await window.electronAPI.showAlert('Please enter a message before sending.');
return;
}
// Send the announcement message via the electronAPI
window.electronAPI.startAnnouncementWorker(message);
fadeOut('send_announcement');
});
});