Handle references into inactive modules

This commit is contained in:
2026-04-21 14:00:37 +00:00
parent 6d8f7a0559
commit 7d574f7c1b
12 changed files with 125 additions and 11 deletions

View File

@@ -38,6 +38,7 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
hasAnalysis: !!this.#analysis,
showAll: this.#showAll,
progress: this.#progress,
notices: this.#analysis?.notices ?? [],
summary: this.#summarize(this.#analysis),
groupedFindings
};
@@ -89,6 +90,7 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
</div>
</section>
${renderProgress(context.progress, context.loading)}
${renderNotices(context.notices, context.loading)}
${renderSummary(context.summary, context.loading)}
${renderGroupedFindingList(context.groupedFindings, context.hasAnalysis, context.loading, context.showAll)}
`;
@@ -141,6 +143,7 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
if (!this.#analysis) return;
const payload = {
exportedAt: new Date().toISOString(),
notices: this.#analysis.notices ?? [],
summary: this.#summarize(this.#analysis),
groupedFindings: groupFindings(this.#analysis.findings),
findings: this.#analysis.findings.map(serializeFinding)
@@ -232,6 +235,17 @@ function renderProgress(progress, loading) {
`;
}
function renderNotices(notices, loading) {
if (loading || !notices?.length) return "";
const items = notices.map(notice => `<li>${escapeHtml(notice.message ?? "")}</li>`).join("");
return `
<section class="storage-audit__summary storage-audit__summary--notices">
<h3>${localize("KSA.Notice.Title")}</h3>
<ul class="storage-audit__notice-list">${items}</ul>
</section>
`;
}
function renderSummary(summary, loading) {
if (loading) return "";
if (!summary) {