Delete ui-helper.js

This commit is contained in:
simonpipe 2025-12-19 15:34:39 +01:00
parent 207a4b2ff3
commit f6eb97871c

View file

@ -1,56 +0,0 @@
// ui-helper.js - Zentrale Steuerung für Modals und allgemeine UI-Elemente
window.UI = {
openModal(modalId) {
const modal = document.getElementById(modalId);
if (modal) {
modal.classList.remove('hidden');
modal.style.display = 'block';
}
},
closeModal(modalId) {
const modal = document.getElementById(modalId);
if (modal) {
modal.classList.add('hidden');
modal.style.display = 'none';
}
},
showAlert(title, message) {
const modal = document.getElementById("custom-modal");
document.getElementById("custom-modal-title").textContent = title;
document.getElementById("custom-modal-message").textContent = message;
document.getElementById("custom-modal-cancel").classList.add("hidden");
modal.classList.remove("hidden");
document.getElementById("custom-modal-ok").onclick = () => modal.classList.add("hidden");
},
showConfirm(title, message, callback) {
const modal = document.getElementById("custom-modal");
document.getElementById("custom-modal-title").textContent = title;
document.getElementById("custom-modal-message").textContent = message;
const cancelBtn = document.getElementById("custom-modal-cancel");
cancelBtn.classList.remove("hidden");
modal.classList.remove("hidden");
document.getElementById("custom-modal-ok").onclick = () => {
modal.classList.add("hidden");
callback(true);
};
cancelBtn.onclick = () => {
modal.classList.add("hidden");
callback(false);
};
},
updateDocumentTitle(stationName) {
document.title = stationName ? `${stationName} - Radioplayer` : "Radioplayer";
},
initializeFooter() {
const yearEl = document.getElementById('current-year');
const serverEl = document.getElementById('server-name');
if (yearEl) yearEl.textContent = new Date().getFullYear();
if (serverEl) serverEl.textContent = window.location.hostname;
}
};