Delete ui-helper.js
This commit is contained in:
parent
207a4b2ff3
commit
f6eb97871c
1 changed files with 0 additions and 56 deletions
56
ui-helper.js
56
ui-helper.js
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue