feat(web): 来源与目录批量条按选中高亮并换用线性图标
为什么:「对内/对外/禁止导入」是三块实心色按钮挤在右上角,「已选 N 项」缩在 禁止导入下面;没选中时整条也一样抢眼,📁/📄 emoji 与工作台风格不协调。 改了什么(策略按钮的启用条件、调用与确认不变): - 批量条:「全选当前页」后紧跟「已选 N 项」,策略按钮归入一组(role=group); 只有选中后整条才浅钴蓝高亮。 - 策略按钮改为浅底语义色描边,与表格内策略徽标同色同形。 - 📁/📄 换成 CSS mask 线性图标;文件夹名改为深色正文、悬停变钴蓝。 - 表头/单元格字号统一(11→12.5px),行悬停底色;页头接入共享 .page-header。 - 删除重复的列宽规则与被后文覆盖的禁止导入样式(同一含义只留一份), 目录区硬编码蓝/灰映射回令牌。 验证:typecheck、vitest 全量通过(App 用例按新 h1 标记更新);浏览器只读核对 勾选→高亮/已选 1 项、取消→恢复中性、文件格式筛选展开;未点击任何策略按钮。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -174,10 +174,10 @@ export function SourceCatalogBrowserView({
|
||||
refreshJob?.state === 'pending' || refreshJob?.state === 'running' || refreshJob?.state === 'retry'
|
||||
return (
|
||||
<main className="page-shell catalog-browser">
|
||||
<header className="hero compact">
|
||||
<header className="hero compact page-header">
|
||||
<div>
|
||||
<h1>来源与目录</h1>
|
||||
<p className="subtitle">各个知识源头的资料总览与标注</p>
|
||||
<h1 className="page-title">来源与目录</h1>
|
||||
<p className="subtitle page-subtitle">各个知识源头的资料总览与标注</p>
|
||||
</div>
|
||||
<button onClick={onRefresh} disabled={loading || refreshActive}>
|
||||
{refreshActive ? '实时刷新中…' : '实时刷新目录'}
|
||||
@@ -343,7 +343,7 @@ export function SourceCatalogBrowserView({
|
||||
</details>
|
||||
|
||||
{visibleItems.length ? (
|
||||
<section className="catalog-routing">
|
||||
<section className={selectedCount ? 'catalog-routing has-selection' : 'catalog-routing'}>
|
||||
<div className="routing-actions">
|
||||
<label className="routing-check">
|
||||
<input
|
||||
@@ -359,7 +359,8 @@ export function SourceCatalogBrowserView({
|
||||
/>
|
||||
全选当前页
|
||||
</label>
|
||||
<div className="catalog-policy-actions">
|
||||
<small className="selected-count">已选 {selectedCount} 项</small>
|
||||
<div className="catalog-policy-actions" role="group" aria-label="处理策略">
|
||||
<button
|
||||
className="internal-policy-button"
|
||||
disabled={!routeReady || !selectedNodeIDs.length || !policyEnabled('internal')}
|
||||
@@ -374,16 +375,13 @@ export function SourceCatalogBrowserView({
|
||||
>
|
||||
对外
|
||||
</button>
|
||||
<div className="blocked-policy-stack">
|
||||
<button
|
||||
className="blocked-policy-button"
|
||||
disabled={!routeReady || !selectedNodeIDs.length}
|
||||
onClick={() => void applyPolicy('blocked')}
|
||||
>
|
||||
禁止导入
|
||||
</button>
|
||||
<small className="selected-count">已选 {selectedCount} 项</small>
|
||||
</div>
|
||||
<button
|
||||
className="blocked-policy-button"
|
||||
disabled={!routeReady || !selectedNodeIDs.length}
|
||||
onClick={() => void applyPolicy('blocked')}
|
||||
>
|
||||
禁止导入
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{routingMessage ? <p role="status">{routingMessage}</p> : null}
|
||||
@@ -417,7 +415,7 @@ export function SourceCatalogBrowserView({
|
||||
onChange={() => toggleNode(node.node_id)}
|
||||
/>
|
||||
<button className="catalog-name" onClick={() => onOpenFolder(node)}>
|
||||
<span aria-hidden="true">📁</span>
|
||||
<span className="catalog-icon folder" aria-hidden="true" />
|
||||
{node.name}
|
||||
</button>
|
||||
</div>
|
||||
@@ -429,7 +427,7 @@ export function SourceCatalogBrowserView({
|
||||
checked={selectedIDs.includes(node.node_id)}
|
||||
onChange={() => toggleNode(node.node_id)}
|
||||
/>
|
||||
<span aria-hidden="true">📄</span>
|
||||
<span className="catalog-icon file" aria-hidden="true" />
|
||||
{node.name}
|
||||
</label>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user