Merged CEO and Client App

This commit is contained in:
andrei-mihnea-cerbu
2025-02-06 10:25:13 +02:00
parent eda2e2d2a0
commit 23802acd98
186 changed files with 365 additions and 11234 deletions
@@ -0,0 +1,26 @@
// Load announcement content from the application info when the page loads
async function loadAnnouncement() {
try {
const announcementText = await window.electronAPI.readAnnouncement();
const announcementContent = document.getElementById('announcement-content');
if (announcementContent && announcementText) {
announcementContent.innerHTML = formatTextForHtml(announcementText);
}
} catch (error) {
console.error('Failed to load announcement:', error);
document.getElementById('announcement-content').textContent = 'Failed to load announcement.';
}
}
function formatTextForHtml(text) {
let formattedText = text.replace(/\n/g, '<br>');
formattedText = formattedText.replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;');
formattedText = formattedText.replace(/ /g, ' &nbsp;');
return formattedText;
}
// Close the window when the close button is clicked
function closeWindow() {
window.electronAPI.closeAnnouncementWindow();
}