Release / Plano (reaproveitar a imagem?) (push) Successful in 8s
CI / Trivy (dependências, segredos e configuração) (push) Failing after 8s
Release / ci (push) Failing after 9s
CI / Testes e imagem Docker (linux/arm64) (push) Skipped
Release / Publica a imagem (linux/arm64) (push) Skipped
Release / Cria a release no Gitea (push) Skipped
The GitHub account was suspended and the repository had no backup. The deployed code (src/, public/, index.html, main.py, requirements.txt) was extracted from the production image 1.3.1. The tests, Dockerfile, compose files, SECURITY.md, CHANGELOG.md and README were rebuilt from the records of the work sessions that created them; LICENSE, .gitignore, robots.txt and sitemap.xml were recreated. CI now runs on Gitea Actions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
export function showToast(message, severity = "info", duration = 4000) {
|
|
let container = document.getElementById("toast-container");
|
|
if (!container) {
|
|
container = document.createElement("div");
|
|
container.id = "toast-container";
|
|
document.body.appendChild(container);
|
|
}
|
|
|
|
const icons = {
|
|
info: "fa-circle-info",
|
|
warning: "fa-triangle-exclamation",
|
|
error: "fa-circle-xmark",
|
|
success: "fa-circle-check"
|
|
};
|
|
|
|
const toast = document.createElement("div");
|
|
toast.className = `toast toast-${severity}`;
|
|
toast.setAttribute("role", "alert");
|
|
toast.innerHTML = `<i class="fas ${icons[severity] || icons.info}"></i><span>${message}</span>`;
|
|
container.appendChild(toast);
|
|
|
|
requestAnimationFrame(() => toast.classList.add("show"));
|
|
|
|
setTimeout(() => {
|
|
toast.classList.remove("show");
|
|
setTimeout(() => toast.remove(), 300);
|
|
}, duration);
|
|
}
|
|
|
|
export function highlightInput(inputTextbox) {
|
|
const container = inputTextbox.closest(".text-area-container") || inputTextbox;
|
|
inputTextbox.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
inputTextbox.focus({ preventScroll: true });
|
|
|
|
container.classList.remove("input-attention");
|
|
void container.offsetWidth; // Force reflow
|
|
container.classList.add("input-attention");
|
|
setTimeout(() => container.classList.remove("input-attention"), 1900);
|
|
}
|