Remove severity column from grouped tables
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.33",
|
"version": "0.0.34",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "13",
|
"minimum": "13",
|
||||||
"verified": "13"
|
"verified": "13"
|
||||||
|
|||||||
@@ -357,7 +357,6 @@ function renderOrphanFilterToggle(key, label, checked) {
|
|||||||
|
|
||||||
function renderGroupedTable(groups, { includeOwner=false, includeReason=false, includeSources=false }={}) {
|
function renderGroupedTable(groups, { includeOwner=false, includeReason=false, includeSources=false }={}) {
|
||||||
const headers = [
|
const headers = [
|
||||||
`<th>${localize("KSA.Table.Severity")}</th>`,
|
|
||||||
`<th>${localize("KSA.Field.Target")}</th>`,
|
`<th>${localize("KSA.Field.Target")}</th>`,
|
||||||
`<th>${localize("KSA.Table.References")}</th>`
|
`<th>${localize("KSA.Table.References")}</th>`
|
||||||
];
|
];
|
||||||
@@ -369,8 +368,7 @@ function renderGroupedTable(groups, { includeOwner=false, includeReason=false, i
|
|||||||
? buildGroupedTooltip(group)
|
? buildGroupedTooltip(group)
|
||||||
: "";
|
: "";
|
||||||
const cells = [
|
const cells = [
|
||||||
`<td><span class="storage-audit__severity storage-audit__severity--inline storage-audit__severity--hint severity-${group.severity}" ${note ? `title="${escapeHtml(note)}"` : ""}>${severityLabel(group.severity)}</span></td>`,
|
`<td><div class="storage-audit__target-cell"><code>${escapeHtml(group.target)}</code>${note ? `<span class="storage-audit__hint-anchor" title="${escapeHtml(note)}" aria-label="${escapeHtml(note)}">?</span>` : ""}</div></td>`,
|
||||||
`<td><code>${escapeHtml(group.target)}</code></td>`,
|
|
||||||
`<td>${group.count ?? ""}</td>`
|
`<td>${group.count ?? ""}</td>`
|
||||||
];
|
];
|
||||||
if (includeOwner) cells.push(`<td><code>${escapeHtml(group.ownerLabel ?? "")}</code></td>`);
|
if (includeOwner) cells.push(`<td><code>${escapeHtml(group.ownerLabel ?? "")}</code></td>`);
|
||||||
@@ -528,12 +526,6 @@ function format(key, data) {
|
|||||||
return game.i18n?.format(key, data) ?? key;
|
return game.i18n?.format(key, data) ?? key;
|
||||||
}
|
}
|
||||||
|
|
||||||
function severityLabel(severity) {
|
|
||||||
const key = `KSA.Severity.${severity}`;
|
|
||||||
const localized = localize(key);
|
|
||||||
return localized === key ? severity : localized;
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatCount(count, nounKey) {
|
function formatCount(count, nounKey) {
|
||||||
return `${count} ${localize(nounKey)}`;
|
return `${count} ${localize(nounKey)}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,13 +266,33 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storage-audit__table th:first-child,
|
.storage-audit__table th:nth-child(2),
|
||||||
.storage-audit__table td:first-child,
|
.storage-audit__table td:nth-child(2) {
|
||||||
.storage-audit__table th:nth-child(3),
|
|
||||||
.storage-audit__table td:nth-child(3) {
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.storage-audit__target-cell {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.45rem;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-audit__hint-anchor {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 1.15rem;
|
||||||
|
height: 1.15rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
|
||||||
|
font-size: 0.78em;
|
||||||
|
font-weight: 700;
|
||||||
|
opacity: 0.82;
|
||||||
|
cursor: help;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.storage-audit__source-list {
|
.storage-audit__source-list {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.35rem;
|
gap: 0.35rem;
|
||||||
@@ -295,41 +315,6 @@
|
|||||||
|
|
||||||
.storage-audit__finding header strong { opacity: 0.9; }
|
.storage-audit__finding header strong { opacity: 0.9; }
|
||||||
|
|
||||||
.storage-audit__severity {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
min-width: 4.75rem;
|
|
||||||
border-radius: 999px;
|
|
||||||
padding: 0.2rem 0.6rem;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.04em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.storage-audit__severity--inline {
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.storage-audit__severity--hint {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
|
|
||||||
.severity-high .storage-audit__severity {
|
|
||||||
background: color-mix(in srgb, #b03e29 80%, transparent);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.severity-warning .storage-audit__severity {
|
|
||||||
background: color-mix(in srgb, #b8902b 80%, transparent);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.severity-info .storage-audit__severity {
|
|
||||||
background: color-mix(in srgb, #466d7a 80%, transparent);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.storage-audit__finding dl {
|
.storage-audit__finding dl {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.35rem;
|
gap: 0.35rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user