Restructure tool details panel layout (THE-114)

Move Open Tool button to top (below breadcrumb), add HR dividers,
split Input→Output into its own section separate from Usage Context,
and rename Rating label to Community Rating.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
s0lray
2026-03-26 10:49:47 -04:00
co-authored by Paperclip
parent 1dec3d3e47
commit ef885f481e
3 changed files with 56 additions and 24 deletions
+23 -3
View File
@@ -146,6 +146,22 @@
line-height: 1.5;
}
/* Input → Output */
#panel-io-section {
display: flex;
flex-direction: column;
gap: var(--space-2);
}
#panel-io-section.empty {
display: none;
}
#panel-io {
font-size: var(--font-size-sm);
color: var(--color-text-secondary);
}
/* OPSEC notes */
#panel-opsec-section {
display: flex;
@@ -179,11 +195,15 @@
color: var(--color-text-primary);
}
/* Dividers */
.panel-divider {
border: none;
border-top: 1px solid var(--color-border);
margin: 0;
}
/* CTA button */
#panel-cta-section {
margin-top: auto;
padding-top: var(--space-4);
border-top: 1px solid var(--color-border);
flex-shrink: 0;
}
+16 -5
View File
@@ -45,6 +45,14 @@
<div id="panel-body">
<div id="panel-breadcrumb" class="empty"></div>
<hr class="panel-divider">
<div id="panel-cta-section" class="empty">
<a id="panel-open-tool" href="#" target="_blank" rel="noopener noreferrer">Open Tool &rarr;</a>
</div>
<hr class="panel-divider">
<div id="panel-badges" class="empty"></div>
<div id="panel-description-section" class="empty">
@@ -57,23 +65,26 @@
<span id="panel-usage"></span>
</div>
<div id="panel-io-section" class="empty">
<span class="panel-section-label">Input &rarr; Output</span>
<span id="panel-io"></span>
</div>
<hr class="panel-divider">
<div id="panel-opsec-section" class="empty">
<span class="panel-section-label">OPSEC Notes</span>
<span id="panel-opsec"></span>
</div>
<div id="panel-rating-section" class="empty">
<span class="panel-section-label">Rating</span>
<span class="panel-section-label">Community Rating</span>
<span id="panel-rating"></span>
</div>
<div id="panel-report-section">
<a id="panel-report-link" href="https://github.com/lockfale/OSINT-Framework/issues/new?template=tool-feedback.md" target="_blank" rel="noopener noreferrer">Report an issue with this tool</a>
</div>
<div id="panel-cta-section" class="empty">
<a id="panel-open-tool" href="#" target="_blank" rel="noopener noreferrer">Open Tool &rarr;</a>
</div>
</div>
</div>
+17 -16
View File
@@ -469,31 +469,32 @@ function openPanel(d) {
descSection.classList.remove("empty");
}
// Usage context: bestFor + input → output (hidden when all empty)
// Usage context: bestFor only (hidden when empty)
var usageSection = document.getElementById("panel-usage-section");
var usageEl = document.getElementById("panel-usage");
if (usageSection && usageEl) {
var hasUsage = d.data.bestFor || d.data.input || d.data.output;
if (hasUsage) {
var usageHtml = "";
if (d.data.bestFor) {
usageHtml += '<div class="usage-best-for"><strong>Best for:</strong> ' + escapeHtml(d.data.bestFor) + '</div>';
}
if (d.data.input || d.data.output) {
usageHtml += '<div class="usage-io">' +
(d.data.input ? escapeHtml(d.data.input) : "") +
' &rarr; ' +
(d.data.output ? escapeHtml(d.data.output) : "") +
'</div>';
}
usageEl.innerHTML = usageHtml;
if (d.data.bestFor) {
usageEl.textContent = d.data.bestFor;
usageSection.classList.remove("empty");
} else {
usageEl.innerHTML = "";
usageEl.textContent = "";
usageSection.classList.add("empty");
}
}
// Input → Output (separate section, hidden when both empty)
var ioSection = document.getElementById("panel-io-section");
var ioEl = document.getElementById("panel-io");
if (ioSection && ioEl) {
if (d.data.input || d.data.output) {
ioEl.textContent = (d.data.input || "") + " \u2192 " + (d.data.output || "");
ioSection.classList.remove("empty");
} else {
ioEl.textContent = "";
ioSection.classList.add("empty");
}
}
// OPSEC: colored badge + optional note (always shown)
var opsecSection = document.getElementById("panel-opsec-section");
var opsecEl = document.getElementById("panel-opsec");