Styled loader and modal

This commit is contained in:
Djeex
2025-08-22 15:29:18 +02:00
parent 1591886505
commit b5f8ceeb31
6 changed files with 84 additions and 32 deletions

View File

@ -5,18 +5,20 @@
* @param {number} duration - Duration in ms.
*/
function showLoader(text = "Building...") {
// --- Loader helpers ---
function showLoader(text = "Uploading...") {
const loader = document.getElementById("global-loader");
if (loader) {
loader.style.display = "flex";
loader.classList.add("active");
document.getElementById("loader-text").textContent = text;
}
}
function hideLoader() {
const loader = document.getElementById("global-loader");
if (loader) loader.style.display = "none";
if (loader) loader.classList.remove("active");
}
// --- Toast helpers ---
function showToast(message, type = "success", duration = 3000) {
const container = document.getElementById("toast-container");
if (!container) return;