diff --git a/module.json b/module.json index ca1189e..9b693ac 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "id": "kosmos-storage-audit", "title": "Kosmos Storage Audit", "description": "Analyzes media references and risky storage locations across Foundry data and public roots.", - "version": "0.0.26", + "version": "0.0.27", "compatibility": { "minimum": "13", "verified": "13" diff --git a/scripts/apps/audit-report-app.js b/scripts/apps/audit-report-app.js index 35e9e78..93ab685 100644 --- a/scripts/apps/audit-report-app.js +++ b/scripts/apps/audit-report-app.js @@ -241,7 +241,7 @@ function renderProgress(progress, loading) { function renderNotices(notices, loading) { if (loading || !notices?.length) return ""; - const items = notices.map(notice => `
  • ${escapeHtml(notice.message ?? "")}
  • `).join(""); + const items = notices.map(notice => `
  • ${renderNoticeMessage(notice)}
  • `).join(""); return `

    ${localize("KSA.Notice.Title")}

    @@ -250,6 +250,15 @@ function renderNotices(notices, loading) { `; } +function renderNoticeMessage(notice) { + const moduleLabels = Array.isArray(notice?.moduleLabels) ? notice.moduleLabels : []; + if (!moduleLabels.length) return escapeHtml(notice?.message ?? ""); + + const plainModules = moduleLabels.join(", "); + const highlightedModules = moduleLabels.map(label => `${escapeHtml(label)}`).join(", "); + return escapeHtml(notice?.message ?? "").replace(escapeHtml(plainModules), highlightedModules); +} + function renderSummary(summary, loading) { if (loading) return ""; if (!summary) {