feat: add foreign key constraints and metrics for blockchain node

This commit is contained in:
oib
2025-09-28 06:04:30 +02:00
parent fe29631a86
commit b8b640666d
188 changed files with 15678 additions and 158 deletions

View File

@@ -0,0 +1,34 @@
const TOAST_DURATION_MS = 4000;
let container: HTMLDivElement | null = null;
export function initNotifications(): void {
if (!container) {
container = document.createElement("div");
container.className = "toast-container";
document.body.appendChild(container);
}
}
export function notifyError(message: string): void {
if (!container) {
initNotifications();
}
if (!container) {
return;
}
const toast = document.createElement("div");
toast.className = "toast toast--error";
toast.textContent = message;
container.appendChild(toast);
requestAnimationFrame(() => {
toast.classList.add("is-visible");
});
setTimeout(() => {
toast.classList.remove("is-visible");
setTimeout(() => toast.remove(), 250);
}, TOAST_DURATION_MS);
}