diff --git a/lang/de.json b/lang/de.json index efb5579..c0b12fc 100644 --- a/lang/de.json +++ b/lang/de.json @@ -15,10 +15,7 @@ "Action": { "Run": "Analyse starten", "Running": "Analysiere...", - "Export": "Report exportieren", - "ScopeLabel": "Umfang", - "ShowAll": "Alle Findings", - "ShowWarnings": "Nur Warnungen" + "Export": "Report exportieren" }, "Progress": { "Initialize": "Initialisiere Analyse", @@ -61,7 +58,7 @@ }, "Section": { "WorkView": "Arbeitsansicht", - "NoGrouped": "Keine gruppierten {scope}Findings vorhanden.", + "NoGrouped": "Keine gruppierten Findings vorhanden.", "NoPrompt": "Die Analyse kann direkt aus dieser Ansicht gestartet werden.", "Running": "Analyse läuft...", "Samples": "Beispiele", @@ -118,10 +115,6 @@ }, "Export": { "Filename": "kosmos-storage-audit-{timestamp}.json" - }, - "Scope": { - "Warning": "warnenden ", - "Empty": "" } } } diff --git a/lang/en.json b/lang/en.json index 55c493d..64fa3bb 100644 --- a/lang/en.json +++ b/lang/en.json @@ -15,10 +15,7 @@ "Action": { "Run": "Start Analysis", "Running": "Analyzing...", - "Export": "Export Report", - "ScopeLabel": "Scope", - "ShowAll": "All Findings", - "ShowWarnings": "Warnings Only" + "Export": "Export Report" }, "Progress": { "Initialize": "Initializing analysis", @@ -61,7 +58,7 @@ }, "Section": { "WorkView": "Work View", - "NoGrouped": "No grouped {scope}findings available.", + "NoGrouped": "No grouped findings available.", "NoPrompt": "The analysis can be started directly from this view.", "Running": "Analysis in progress...", "Samples": "Examples", @@ -118,10 +115,6 @@ }, "Export": { "Filename": "kosmos-storage-audit-{timestamp}.json" - }, - "Scope": { - "Warning": "warning ", - "Empty": "" } } } diff --git a/module.json b/module.json index 9b693ac..80488bc 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.27", + "version": "0.0.28", "compatibility": { "minimum": "13", "verified": "13" diff --git a/scripts/apps/audit-report-app.js b/scripts/apps/audit-report-app.js index 93ab685..abd4618 100644 --- a/scripts/apps/audit-report-app.js +++ b/scripts/apps/audit-report-app.js @@ -5,7 +5,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV tag: "div", actions: { runAnalysis: StorageAuditReportApp.#onRunAnalysis, - toggleShowAll: StorageAuditReportApp.#onToggleShowAll, exportReport: StorageAuditReportApp.#onExportReport }, window: { @@ -21,7 +20,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV #analysis = null; #loading = false; - #showAll = false; #progress = null; constructor(options = {}) { @@ -31,12 +29,10 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV async _prepareContext() { const findings = this.#analysis?.findings ?? []; - const visibleFindings = this.#showAll ? findings : findings.filter(f => f.severity !== "info"); - const groupedFindings = await enrichGroupedFindings(groupFindings(visibleFindings)); + const groupedFindings = await enrichGroupedFindings(groupFindings(findings)); return { loading: this.#loading, hasAnalysis: !!this.#analysis, - showAll: this.#showAll, progress: this.#progress, notices: this.#analysis?.notices ?? [], moduleVersion: game.modules.get("kosmos-storage-audit")?.version ?? null, @@ -68,35 +64,12 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV ${localize("KSA.Action.Export")} -
- ${localize("KSA.Action.ScopeLabel")} -
- - -
-
${renderProgress(context.progress, context.loading)} ${renderNotices(context.notices, context.loading)} ${renderSummary(context.summary, context.loading)} - ${renderGroupedFindingList(context.groupedFindings, context.hasAnalysis, context.loading, context.showAll)} + ${renderGroupedFindingList(context.groupedFindings, context.hasAnalysis, context.loading)} `; return container; } @@ -133,16 +106,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV } } - toggleShowAll() { - this.#showAll = !this.#showAll; - return this.render({ force: true }); - } - - setShowAll(value) { - this.#showAll = !!value; - return this.render({ force: true }); - } - exportReport() { if (!this.#analysis) return; const payload = { @@ -203,17 +166,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV return this.runAnalysis(); } - static #onToggleShowAll(_event, _button) { - const mode = _button?.dataset?.mode; - if (mode === "warnings") { - return this.setShowAll(false); - } - if (mode === "all") { - return this.setShowAll(true); - } - return this.toggleShowAll(); - } - static #onExportReport(_event, _button) { return this.exportReport(); } @@ -299,7 +251,7 @@ function renderSummary(summary, loading) { `; } -function renderGroupedFindingList(groupedFindings, hasAnalysis, loading, showAll) { +function renderGroupedFindingList(groupedFindings, hasAnalysis, loading) { if (loading || !hasAnalysis) return ""; const sections = []; @@ -327,7 +279,7 @@ function renderGroupedFindingList(groupedFindings, hasAnalysis, loading, showAll )); } - if (showAll && groupedFindings.orphans.length) { + if (groupedFindings.orphans.length) { sections.push(renderGroupedSection( localize("KSA.Section.OrphanCandidates"), localize("KSA.Section.OrphanCandidatesDesc"), @@ -344,7 +296,7 @@ function renderGroupedFindingList(groupedFindings, hasAnalysis, loading, showAll

${localize("KSA.Section.WorkView")}

-

${format("KSA.Section.NoGrouped", { scope: localize(showAll ? "KSA.Scope.Empty" : "KSA.Scope.Warning") })}

+

${localize("KSA.Section.NoGrouped")}

`; diff --git a/styles/audit.css b/styles/audit.css index 615c901..0ad194b 100644 --- a/styles/audit.css +++ b/styles/audit.css @@ -163,32 +163,6 @@ width: 100%; } -.storage-audit__toggle-group { - display: grid; - gap: 0.35rem; -} - -.storage-audit__toggle-label { - font-size: 0.9em; - opacity: 0.8; - padding: 0 0.2rem; -} - -.storage-audit__toggle-buttons { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 0.45rem; -} - -.storage-audit__toggle-buttons .button { - min-width: 0; -} - -.storage-audit__toggle-buttons .button.active { - box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 25%, transparent); - background: color-mix(in srgb, currentColor 10%, transparent); -} - .storage-audit__actions .button[disabled] { opacity: 0.5; }