fix(vulnerabilities): hide default scope headings

This commit is contained in:
Sycun 2026-11-13 17:35:07 +08:00
parent 648002b09b
commit 0c8bdcf215
3 changed files with 7 additions and 5 deletions

View File

@ -93,7 +93,7 @@
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; }
.vulnerability-host-heading-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-inline-start: auto; }
.vulnerability-host-heading-actions [hidden] { display: none; }
#page-vulnerabilities .vulnerability-host-results-heading { align-items: start; }
#vulnerability-host-selection {
@ -104,6 +104,7 @@
-webkit-line-clamp: 2;
overflow: hidden;
}
#vulnerability-host-selection[hidden] { display: none; }
.vulnerability-table-name {
flex: 1;
min-width: 0;

View File

@ -1560,9 +1560,10 @@ function renderVulnerabilityBrowserTable() {
});
const selectedOption = Array.from(document.querySelectorAll('#vulnerabilities-list [data-host-key]')).find(option => option.dataset.hostKey === selection);
const label = selection ? (selectedOption?.querySelector('[title]')?.title || selectedOption?.title || selection.slice(selection.indexOf(':') + 1))
: vulnT(vulnerabilityView === 'task' ? 'vulnerabilityPage.allTasks' : 'vulnerabilityPage.allHosts');
: '';
const heading = document.getElementById('vulnerability-host-selection');
heading.textContent = label || vulnT('vulnerabilityPage.unknownHost');
heading.hidden = !selection;
heading.textContent = selection ? label || vulnT('vulnerabilityPage.unknownHost') : '';
heading.title = heading.textContent;
document.getElementById('vulnerability-host-clear').hidden = !selection;
document.getElementById('vulnerability-host-selection-count').textContent =

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-tree-panel-height">
<link rel="stylesheet" href="/static/css/vulnerability-workspace.css?v=20261113-selection-heading">
<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-compact-rows"></script>
<script src="/static/js/vulnerability.js?v=20261113-selection-heading"></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>