Release 0.0.10
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"id": "kosmos-storage-audit",
|
"id": "kosmos-storage-audit",
|
||||||
"title": "Kosmos Storage Audit",
|
"title": "Kosmos Storage Audit",
|
||||||
"description": "Analyzes media references and risky storage locations across Foundry data and public roots.",
|
"description": "Analyzes media references and risky storage locations across Foundry data and public roots.",
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "13",
|
"minimum": "13",
|
||||||
"verified": "13"
|
"verified": "13"
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ import { analyzeStorage } from "../core/analyzer.js";
|
|||||||
import { isMediaPath, normalizePath } from "../core/path-utils.js";
|
import { isMediaPath, normalizePath } from "../core/path-utils.js";
|
||||||
|
|
||||||
async function* walkFilePicker(storage, target = "", onProgress = null) {
|
async function* walkFilePicker(storage, target = "", onProgress = null) {
|
||||||
onProgress?.({ phase: "files", label: format("KSA.Progress.BrowseStorage", { storage, path: target || "/" }) });
|
onProgress?.({
|
||||||
|
phase: "files",
|
||||||
|
label: format("KSA.Progress.ScanFiles"),
|
||||||
|
currentSource: format("KSA.Progress.BrowseStorage", { storage, path: target || "/" })
|
||||||
|
});
|
||||||
const result = await FilePicker.browse(storage, target);
|
const result = await FilePicker.browse(storage, target);
|
||||||
for (const file of result.files ?? []) {
|
for (const file of result.files ?? []) {
|
||||||
const path = normalizePath(file);
|
const path = normalizePath(file);
|
||||||
@@ -83,7 +87,11 @@ async function* packagePackEntries(onProgress = null) {
|
|||||||
const ownerType = pack.metadata.packageType;
|
const ownerType = pack.metadata.packageType;
|
||||||
const ownerId = pack.metadata.packageName;
|
const ownerId = pack.metadata.packageName;
|
||||||
if (!["module", "system"].includes(ownerType) || !ownerId) continue;
|
if (!["module", "system"].includes(ownerType) || !ownerId) continue;
|
||||||
onProgress?.({ phase: "sources", label: format("KSA.Progress.ReadPack", { pack: pack.collection }), currentSource: pack.collection });
|
onProgress?.({
|
||||||
|
phase: "sources",
|
||||||
|
label: format("KSA.Progress.ReadReferences"),
|
||||||
|
currentSource: format("KSA.Progress.ReadPack", { pack: pack.collection })
|
||||||
|
});
|
||||||
const documents = await pack.getDocuments();
|
const documents = await pack.getDocuments();
|
||||||
for (const document of documents) {
|
for (const document of documents) {
|
||||||
yield {
|
yield {
|
||||||
|
|||||||
@@ -120,8 +120,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
|
|||||||
ui.notifications.error(format("KSA.Notify.Failed", { message: error.message }));
|
ui.notifications.error(format("KSA.Notify.Failed", { message: error.message }));
|
||||||
} finally {
|
} finally {
|
||||||
this.#loading = false;
|
this.#loading = false;
|
||||||
const currentWidth = this.position?.width ?? 0;
|
|
||||||
if (currentWidth < 980) this.setPosition({ width: 980 });
|
|
||||||
await this.render({ force: true });
|
await this.render({ force: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,12 +61,14 @@
|
|||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
font-size: 0.92rem;
|
font-size: 0.92rem;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storage-audit__progress-source {
|
.storage-audit__progress-source {
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storage-audit__group-header {
|
.storage-audit__group-header {
|
||||||
@@ -83,9 +85,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.storage-audit__hero {
|
.storage-audit__hero {
|
||||||
display: flex;
|
display: grid;
|
||||||
justify-content: space-between;
|
grid-template-columns: minmax(0, 1fr) minmax(14rem, 16rem);
|
||||||
gap: 1rem;
|
gap: 1rem 1.25rem;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +123,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
min-width: 12rem;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storage-audit__actions .button {
|
.storage-audit__actions .button {
|
||||||
@@ -280,13 +282,12 @@
|
|||||||
margin: 0 0.25rem;
|
margin: 0 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 1100px) {
|
||||||
.storage-audit__hero {
|
.storage-audit__hero {
|
||||||
flex-direction: column;
|
grid-template-columns: minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
|
|
||||||
.storage-audit__actions {
|
.storage-audit__actions {
|
||||||
min-width: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user