early version: modular block files, full template set, tab UI, OpenGL defaults

This commit is contained in:
2026-06-19 01:18:36 +02:00
parent 91f583c51c
commit 36fc63780a
55 changed files with 4790 additions and 322 deletions
+31
View File
@@ -0,0 +1,31 @@
// ── Error modal ───────────────────────────────────────────────────────────────
//
// A simple overlay modal that displays -ACK! with a custom message.
// Depends on: dom.js ($)
//
/**
* Shows the error modal with the given message.
* The overlay is absolutely positioned and blocks all interaction until dismissed.
* @param {string} msg - message to display inside the error box
*/
function showError(msg) {
const el = $("#error-overlay");
el.querySelector(".error-msg").textContent = msg;
el.classList.add("active");
}
/**
* Hides the error modal. Triggered by clicking the × button,
* the overlay backdrop, or called programmatically.
* @param {MouseEvent} [ev] - event to check target matching
*/
function closeError(ev) {
if (
!ev ||
ev.target === ev.currentTarget ||
ev.target.classList.contains("error-close")
) {
$("#error-overlay").classList.remove("active");
}
}