improve crash logs

This commit is contained in:
KingKDot
2026-06-30 14:35:27 -05:00
parent b5b50aa038
commit 01ecab779e
10 changed files with 136 additions and 10 deletions
@@ -271,13 +271,16 @@ function showDesktopNotification(item) {
if (!("Notification" in window)) return;
if (Notification.permission !== "granted") return;
const title = item.keyword
const title = item.category === "crash_report"
? "Overlord \u2014 Crash Report"
: item.keyword
? `Overlord \u2014 ${item.keyword}`
: "Overlord \u2014 Notification";
const lines = [item.title];
if (item.user) lines.push(`User: ${item.user}`);
if (item.host) lines.push(`Host: ${item.host}`);
if (item.process) lines.push(`Process: ${item.process}`);
if (item.detail) lines.push(String(item.detail).slice(0, 300));
const body = lines.filter(Boolean).join("\n");
fireNotification(title, body, `overlord-${item.id || Date.now()}`, "/notifications");