fix(vulnerabilities): remove empty scope heading space

This commit is contained in:
Sycun 2026-11-13 17:44:07 +08:00
parent 0c8bdcf215
commit e11be75402
3 changed files with 11 additions and 9 deletions

View File

@ -93,9 +93,10 @@
cursor: pointer;
}
.vulnerability-domain-label[aria-pressed="true"] { color: var(--accent-color); font-weight: 600; }
.vulnerability-host-heading-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-inline-start: auto; }
.vulnerability-host-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; max-width: 100%; margin-inline-start: auto; }
.vulnerability-host-heading-actions [hidden] { display: none; }
#page-vulnerabilities .vulnerability-host-results-heading { align-items: start; }
#page-vulnerabilities .vulnerability-host-results-heading[hidden] { display: none; }
#vulnerability-host-selection {
min-width: 0;
flex: 1 1 180px;

View File

@ -1477,15 +1477,15 @@ function renderVulnerabilityBrowser(vulnerabilities, opts) {
<section class="vulnerability-host-results">
<div class="vulnerability-host-results-heading">
<h3 id="vulnerability-host-selection"></h3>
<div class="vulnerability-host-heading-actions">
<button type="button" id="vulnerability-host-clear" class="btn-ghost" onclick="vulnerabilityBrowserSelection='';renderVulnerabilityBrowserTable()" hidden>${escapeHtml(vulnT(isTask ? 'vulnerabilityPage.clearTaskSelection' : 'vulnerabilityPage.clearHostSelection'))}</button>
<span id="vulnerability-host-selection-count"></span>
</div>
</div>
<div class="vulnerability-host-overview">
<div id="vulnerability-host-risk-summary"></div>
<button type="button" class="btn-secondary" id="vulnerability-host-export"
onclick="exportVisibleVulnerabilityBrowser()" data-require-permission="vulnerability:read">${escapeHtml(vulnT('vulnerabilityPage.exportVisibleHosts'))}</button>
<div class="vulnerability-host-heading-actions">
<button type="button" id="vulnerability-host-clear" class="btn-ghost" onclick="vulnerabilityBrowserSelection='';renderVulnerabilityBrowserTable()" hidden>${escapeHtml(vulnT(isTask ? 'vulnerabilityPage.clearTaskSelection' : 'vulnerabilityPage.clearHostSelection'))}</button>
<span id="vulnerability-host-selection-count"></span>
<button type="button" class="btn-secondary" id="vulnerability-host-export"
onclick="exportVisibleVulnerabilityBrowser()" data-require-permission="vulnerability:read">${escapeHtml(vulnT('vulnerabilityPage.exportVisibleHosts'))}</button>
</div>
</div>
<div id="vulnerability-host-table"></div>
</section>
@ -1563,6 +1563,7 @@ function renderVulnerabilityBrowserTable() {
: '';
const heading = document.getElementById('vulnerability-host-selection');
heading.hidden = !selection;
heading.parentElement.hidden = !selection;
heading.textContent = selection ? label || vulnT('vulnerabilityPage.unknownHost') : '';
heading.title = heading.textContent;
document.getElementById('vulnerability-host-clear').hidden = !selection;

View File

@ -47,7 +47,7 @@
<link rel="stylesheet" href="/static/vendor/xterm.css">
<!-- 移动端样式层:全部规则限定在 767.98px 以下,桌面端零影响 -->
<link rel="stylesheet" href="/static/css/mobile.css?v=20261015-project-table-3">
<link rel="stylesheet" href="/static/css/vulnerability-workspace.css?v=20261113-selection-heading">
<link rel="stylesheet" href="/static/css/vulnerability-workspace.css?v=20261113-aligned-overview">
<link rel="stylesheet" href="/static/css/vulnerability-list.css?v=20261113-compact-rows">
<script src="/static/js/router.js?v=20261011-token-settings"></script>
</head>
@ -7097,7 +7097,7 @@
<script src="/static/js/skills.js?v=20261027-pagination-custom-select"></script>
<script src="/static/js/fact-graph.js"></script>
<script src="/static/js/projects.js?v=20260819-1-pagination-20261027"></script>
<script src="/static/js/vulnerability.js?v=20261113-selection-heading"></script>
<script src="/static/js/vulnerability.js?v=20261113-aligned-overview"></script>
<script src="/static/js/vulnerability-workspace.js?v=20261113-compact-rows"></script>
<script src="/static/js/vulnerability-download.js?v=20261030-2"></script>
<script src="/static/js/webshell.js?v=20261011-token-usage"></script>