mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 13:10:22 +08:00
fix: 发布 1.1.35,技能路径跟随安装目录
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7fc64e4b45
commit
065d00633b
28 files changed
+363
-168
No files matched your search
+10
-4
@@ -2293,7 +2293,9 @@ window.__ModuleLoader__.load({
|
||||
|
||||
const stats = (data && data.stats) || { total: 0, verified: 0, reused: 0, byKind: [], bySource: [] }
|
||||
const items = (data && data.items) || []
|
||||
const tpl = (data && data.templates) || { dir: null, total: 0, matched: 0, offset: 0, items: [] }
|
||||
const tpl = (data && data.templates) || { dir: null, total: 0, matched: 0, offset: 0, items: [], byCategory: [] }
|
||||
const tplByCat = new Map((tpl.byCategory || []).map((c) => [c.code, c.n || 0]))
|
||||
const catShown = (c) => (c.n || 0) + (tplByCat.get(c.code) || 0)
|
||||
const tplItems = tpl.items || []
|
||||
const tplMatched = tpl.matched != null ? tpl.matched : tpl.total
|
||||
const tplStart = Number(tpl.offset) || 0
|
||||
@@ -2370,17 +2372,20 @@ window.__ModuleLoader__.load({
|
||||
h('button', { className: 'rt-btn', disabled: busy, onClick: () => query() }, busy ? '检索中…' : '刷新')),
|
||||
/* 归类总览:点一下就是按该类筛选,一眼看清"哪类武器攒了多少、哪类还是空的" */
|
||||
h('div', { className: 'rt-kb-cats' },
|
||||
(stats.byCategory || []).filter((c) => c.n > 0 || POC_CAT_ORDER.includes(c.code)).map((c) => h('span', {
|
||||
(stats.byCategory || []).filter((c) => catShown(c) > 0 || POC_CAT_ORDER.includes(c.code)).map((c) => h('span', {
|
||||
key: c.code,
|
||||
className: 'rt-concl-i' + (category === c.code ? ' on' : ''),
|
||||
title: c.hint || ('筛选:' + (POC_CAT_NAME[c.code] || c.code)),
|
||||
title: (c.hint || POC_CAT_NAME[c.code] || c.code)
|
||||
+ ' · 本机模板 ' + (tplByCat.get(c.code) || 0)
|
||||
+ ' · 知识库 ' + (c.n || 0)
|
||||
+ (c.verified ? '(已验证 ' + c.verified + ')' : ''),
|
||||
onClick: () => {
|
||||
const next = category === c.code ? '' : c.code
|
||||
setCategory(next)
|
||||
query({ category: next || undefined })
|
||||
},
|
||||
},
|
||||
h('b', null, String(c.n || 0)),
|
||||
h('b', null, String(catShown(c))),
|
||||
h('span', null, (POC_CAT_NAME[c.code] || c.code) + (c.verified ? '(已验证 ' + c.verified + ')' : ''))))),
|
||||
h('div', { className: 'rt-kb-filter' },
|
||||
h('input', {
|
||||
@@ -2445,6 +2450,7 @@ window.__ModuleLoader__.load({
|
||||
+ '(直接 `nuclei -t <模板路径>`)'),
|
||||
tplItems.map((t, i) => h('div', { key: 't' + tplStart + '-' + i, className: 'rt-kb-tpl-row' },
|
||||
h('span', { className: 'rt-tag' }, t.severity || '—'),
|
||||
t.category ? h('span', { className: 'rt-tag' }, POC_CAT_NAME[t.category] || t.category) : null,
|
||||
h('span', { className: 'rt-mono rt-kb-tpl-path', title: t.path }, t.path),
|
||||
h('span', { className: 'rt-kb-tpl-name', title: t.name }, t.name || ''),
|
||||
h('button', {
|
||||
|
||||
Reference in new issue
Block a user