diff --git a/lang/de.json b/lang/de.json
index dffbd1f..b71c2a9 100644
--- a/lang/de.json
+++ b/lang/de.json
@@ -16,8 +16,12 @@
"Run": "Analyse starten",
"Running": "Analysiere...",
"Export": "Report exportieren",
+ "ScopeLabel": "Umfang",
"ShowAll": "Alle Findings",
"ShowWarnings": "Nur Warnungen",
+ "DetailLabel": "Details",
+ "GroupedOnly": "Nur Gruppen",
+ "WithRaw": "Mit Einzelfällen",
"ShowRaw": "Einzelfälle anzeigen",
"HideRaw": "Einzelfälle ausblenden"
},
diff --git a/lang/en.json b/lang/en.json
index 680d31e..aa1bb61 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -16,8 +16,12 @@
"Run": "Start Analysis",
"Running": "Analyzing...",
"Export": "Export Report",
+ "ScopeLabel": "Scope",
"ShowAll": "All Findings",
"ShowWarnings": "Warnings Only",
+ "DetailLabel": "Details",
+ "GroupedOnly": "Grouped Only",
+ "WithRaw": "With Raw Entries",
"ShowRaw": "Show Raw Entries",
"HideRaw": "Hide Raw Entries"
},
diff --git a/module.json b/module.json
index c606702..fa732aa 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.20",
+ "version": "0.0.21",
"compatibility": {
"minimum": "13",
"verified": "13"
diff --git a/scripts/apps/audit-report-app.js b/scripts/apps/audit-report-app.js
index a7b3c5c..355ed1c 100644
--- a/scripts/apps/audit-report-app.js
+++ b/scripts/apps/audit-report-app.js
@@ -67,14 +67,52 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
${localize("KSA.Action.Export")}
-
-
+
+
${localize("KSA.Action.ScopeLabel")}
+
+
+
+
+
+
+
${localize("KSA.Action.DetailLabel")}
+
+
+
+
+
${renderProgress(context.progress, context.loading)}
@@ -122,11 +160,21 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
return this.render({ force: true });
}
+ setShowAll(value) {
+ this.#showAll = !!value;
+ return this.render({ force: true });
+ }
+
toggleRaw() {
this.#showRaw = !this.#showRaw;
return this.render({ force: true });
}
+ setShowRaw(value) {
+ this.#showRaw = !!value;
+ return this.render({ force: true });
+ }
+
exportReport() {
if (!this.#analysis) return;
const payload = {
@@ -187,10 +235,24 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
}
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 #onToggleRaw(_event, _button) {
+ const mode = _button?.dataset?.mode;
+ if (mode === "grouped") {
+ return this.setShowRaw(false);
+ }
+ if (mode === "raw") {
+ return this.setShowRaw(true);
+ }
return this.toggleRaw();
}
diff --git a/styles/audit.css b/styles/audit.css
index a85ad51..8ccab1e 100644
--- a/styles/audit.css
+++ b/styles/audit.css
@@ -145,6 +145,32 @@
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;
}