1
0

refactor: 优化卡片显示一致性与可扩展性

- 统一 Summary Cards 和 Target Cards 宽度为 280px(CSS 变量控制)
- 分组统计改为徽章展示(纯数字 + 颜色区分)
- 目标名称添加 title 属性支持显示完整名称
- 建立类型映射系统,Command 显示为 CMD,支持扩展
- 移除移动端响应式代码,简化维护
- 新增 target-type-display 能力规格
- 更新 card-dashboard 和 target-detail-modal 规格
This commit is contained in:
2026-05-11 18:36:16 +08:00
parent 48a9e96ec2
commit 767f26617e
10 changed files with 163 additions and 34 deletions

View File

@@ -0,0 +1,10 @@
export const TARGET_TYPE_DISPLAY = {
http: "HTTP",
command: "CMD",
} as const;
export type TargetType = keyof typeof TARGET_TYPE_DISPLAY;
export function getTargetTypeDisplay(type: string): string {
return TARGET_TYPE_DISPLAY[type as TargetType] || type.toUpperCase();
}