去掉系统已打开页面页签及无用关闭入口和样式;保留面包屑、来源路径与分页。左侧文字16px、图标20px,导航项最小44px。 验证:顶部页签移除与导航字号回归分别先红后绿,相关测试和类型检查通过;完整门禁与部署验收待执行。
This commit is contained in:
+1
-35
@@ -52,7 +52,7 @@ import { fetchSourceConnections, fetchSourceScanDetail, fetchSourceScans, trigge
|
||||
import type { SourceConnectionPage, SourceScanDetail, SourceScanPage } from './sourceConnections'
|
||||
import { fetchTestPublications, retryPublication } from './testPublications'
|
||||
import type { ProcessingState, TestPublicationPage } from './testPublications'
|
||||
import { closeModule, initialWorkspace, openModule, restoreWorkspace } from './workspace'
|
||||
import { initialWorkspace, openModule, restoreWorkspace } from './workspace'
|
||||
import type { ModuleId, WorkspaceState } from './workspace'
|
||||
|
||||
const workspaceStorageKey = 'knowledge-governance.workspace.v1'
|
||||
@@ -69,7 +69,6 @@ const modules: ReadonlyArray<{ id: ModuleId; label: string; icon: string }> = [
|
||||
interface WorkspaceShellProps {
|
||||
workspace: WorkspaceState
|
||||
onOpen: (moduleId: ModuleId) => void
|
||||
onClose: (moduleId: ModuleId) => void
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
@@ -141,38 +140,6 @@ export function WorkspaceShell(props: WorkspaceShellProps) {
|
||||
</span>
|
||||
<b>{activeModule?.label ?? '工作台'}</b>
|
||||
</div>
|
||||
<div className="tab-list" role="tablist" aria-label="已打开页面">
|
||||
{props.workspace.openTabs.map((tabId) => {
|
||||
const module = modules.find((item) => item.id === tabId)
|
||||
if (!module) return null
|
||||
const active = props.workspace.activeTab === tabId
|
||||
return (
|
||||
<div className={active ? 'workspace-tab active' : 'workspace-tab'} key={tabId}>
|
||||
<button
|
||||
className="tab-activate"
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-current={active ? 'page' : undefined}
|
||||
aria-selected={active}
|
||||
onClick={() => props.onOpen(tabId)}
|
||||
>
|
||||
<span aria-hidden="true">{module.icon}</span>
|
||||
{module.label}
|
||||
</button>
|
||||
{tabId !== 'dashboard' ? (
|
||||
<button
|
||||
className="tab-close"
|
||||
type="button"
|
||||
aria-label={`关闭${module.label}标签`}
|
||||
onClick={() => props.onClose(tabId)}
|
||||
>
|
||||
×
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<WorkspaceContextTabsBar tabs={contextTabs} />
|
||||
<TopBarUser />
|
||||
</header>
|
||||
@@ -2992,7 +2959,6 @@ export default function App() {
|
||||
<WorkspaceShell
|
||||
workspace={workspace}
|
||||
onOpen={(moduleId) => setWorkspace((current) => openModule(current, moduleId))}
|
||||
onClose={(moduleId) => setWorkspace((current) => closeModule(current, moduleId))}
|
||||
>
|
||||
{workspace.activeTab === 'dashboard' ? (
|
||||
<SourceCatalogBrowser />
|
||||
|
||||
Reference in New Issue
Block a user