feat(admin): scope tools dialog with category tabs and table

- top category tabs with per-category counts and selected badges
- table layout: checkbox, tool name, description, type, status
- header checkbox for select-all with indeterminate state
- search filter and selected-only toggle
- footer summary of cross-category selections
- keep existing data-testid hooks for E2E tests
This commit is contained in:
my_local_kimi_dev2
2026-09-16 11:35:17 +08:00
parent 487a41df74
commit 12de320459
2 changed files with 81 additions and 12 deletions
+8 -7
View File
@@ -52,13 +52,14 @@ code { font-family: Menlo, Consolas, monospace; font-size: 12px; }
.audit-toolbar .el-input { width: 150px; }
.audit-toolbar .el-select { width: 140px; }
.audit-toolbar .el-date-editor { width: 150px; }
.tool-groups { display: block; max-height: 520px; overflow: auto; }
.tool-group { margin-bottom: 12px; border: 1px solid #ebeef5; border-radius: 4px; }
.tool-group h3 { margin: 0; padding: 9px 12px; font-size: 14px; background: #fafafa; border-bottom: 1px solid #ebeef5; }
.tool-group .el-checkbox { width: 100%; height: auto; margin: 0; padding: 9px 12px; align-items: flex-start; }
.tool-group .el-checkbox + .el-checkbox { border-top: 1px solid #f2f3f5; }
.tool-group .el-checkbox__label { display: flex; flex-direction: column; white-space: normal; }
.tool-group small { margin-top: 3px; color: #909399; }
.scope-tools-toolbar { display: flex; gap: 12px; align-items: center; }
.scope-tools-toolbar .el-input { max-width: 260px; }
.scope-tools-tabs { margin-top: 4px; }
.scope-tools-tabs .el-tabs__header { margin-bottom: 8px; }
.tab-badge { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 12px; line-height: 16px; border-radius: 8px; background: #f0f9eb; color: #67c23a; vertical-align: 2px; }
.scope-tools-footer { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.scope-tools-summary { color: #606266; font-size: 13px; text-align: left; }
.el-table .row-selected { background: #ecf5ff; }
.token-secret { display: block; margin-top: 14px; padding: 14px; word-break: break-all; border-radius: 4px; background: #f4f4f5; font-size: 13px; }
.issued-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.issued-row .token-secret { flex: 1; margin-top: 0; padding: 9px 12px; }