feat: 更新前端UI,增强审计和日志视图功能

This commit is contained in:
caoxiaozhu
2026-05-18 02:51:25 +00:00
parent 35a3783481
commit 9d90bf5299
10 changed files with 3544 additions and 954 deletions

View File

@@ -26,6 +26,10 @@
gap: 12px;
}
.skill-detail.spreadsheet-skill-detail {
gap: 10px;
}
.skill-list {
display: flex;
flex-direction: column;
@@ -474,6 +478,7 @@ tbody tr.spotlight {
}
.skill-avatar.emerald { background: linear-gradient(135deg, #10b981, #059669); }
.skill-avatar.rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.skill-avatar.violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.skill-avatar.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.skill-avatar.amber { background: linear-gradient(135deg, #f59e0b, #ea580c); }
@@ -557,6 +562,13 @@ tbody tr.spotlight {
gap: 16px;
}
.spreadsheet-skill-detail .detail-scroll {
min-height: 0;
overflow: hidden;
align-content: stretch;
grid-template-rows: minmax(0, 1fr);
}
.detail-hero {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
@@ -581,6 +593,7 @@ tbody tr.spotlight {
}
.skill-badge.emerald { background: linear-gradient(135deg, #10b981, #059669); }
.skill-badge.rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.skill-badge.violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.skill-badge.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.skill-badge.amber { background: linear-gradient(135deg, #f59e0b, #ea580c); }
@@ -813,6 +826,832 @@ tbody tr.spotlight {
gap: 12px;
}
.spreadsheet-rule-card {
display: grid;
gap: 14px;
}
.spreadsheet-editor-shell {
min-height: 0;
height: 100%;
display: flex;
flex-direction: column;
gap: 8px;
padding: 10px;
}
.spreadsheet-editor-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.spreadsheet-editor-title {
min-width: 0;
display: flex;
align-items: flex-start;
gap: 12px;
}
.spreadsheet-editor-title h2 {
color: #0f172a;
font-size: 18px;
font-weight: 850;
}
.spreadsheet-editor-title p {
margin-top: 2px;
max-width: 760px;
color: #64748b;
font-size: 12px;
line-height: 1.4;
}
.spreadsheet-editor-actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.spreadsheet-editor-meta {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.spreadsheet-editor-meta span {
min-height: 28px;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 10px;
border-radius: 999px;
background: #f8fafc;
color: #475569;
font-size: 12px;
font-weight: 750;
}
.spreadsheet-editor-meta strong {
color: #0f172a;
font-weight: 850;
}
.spreadsheet-editor-body {
flex: 1 1 auto;
min-height: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) 286px;
gap: 14px;
align-items: start;
}
.spreadsheet-main-stage {
min-height: 0;
height: 100%;
display: flex;
flex-direction: column;
gap: 10px;
}
.spreadsheet-workbench {
flex: 1 1 auto;
position: relative;
min-height: 0;
overflow: visible;
border: 1px solid #dbe4ee;
border-radius: 12px;
background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.spreadsheet-workbench .rule-spreadsheet-host {
min-height: 0;
height: 100%;
overflow: visible;
}
.spreadsheet-editor-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #64748b;
font-size: 12px;
line-height: 1.5;
}
.spreadsheet-version-center {
min-height: 0;
height: 100%;
align-self: stretch;
display: grid;
grid-template-rows: auto auto minmax(0, 1fr) auto;
gap: 12px;
padding: 14px;
border: 1px solid #dbe4ee;
border-radius: 14px;
background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
overflow: hidden;
}
.version-center-head h3,
.version-center-head p,
.version-center-section header,
.version-center-section p {
margin: 0;
}
.version-center-head h3 {
color: #0f172a;
font-size: 15px;
font-weight: 900;
}
.version-center-head p {
margin-top: 3px;
color: #64748b;
font-size: 12px;
}
.version-pair-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
}
.version-pair-card {
display: grid;
gap: 4px;
min-height: 84px;
padding: 10px;
border-radius: 12px;
}
.version-pair-card span {
color: #64748b;
font-size: 11px;
font-weight: 800;
}
.version-pair-card strong {
color: #0f172a;
font-size: 16px;
font-weight: 900;
}
.version-pair-card b {
width: fit-content;
min-height: 20px;
display: inline-flex;
align-items: center;
padding: 0 7px;
border-radius: 999px;
font-size: 11px;
font-weight: 850;
}
.version-pair-card.published {
background: rgba(16, 185, 129, 0.1);
}
.version-pair-card.published b {
background: #dcfce7;
color: #059669;
}
.version-pair-card.working {
background: rgba(37, 99, 235, 0.08);
}
.version-pair-card.working b {
background: #dbeafe;
color: #2563eb;
}
.version-center-section {
display: grid;
gap: 8px;
}
.version-history-section {
min-height: 0;
grid-template-rows: auto minmax(0, 1fr);
}
.version-center-section > header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.version-center-section > header strong {
color: #0f172a;
font-size: 13px;
font-weight: 900;
}
.version-center-section > header small,
.version-center-section > header button {
color: #64748b;
font-size: 11px;
font-weight: 800;
}
.version-center-section > header button {
padding: 0;
border: 0;
background: transparent;
color: #2563eb;
cursor: pointer;
}
.version-center-list {
display: grid;
align-content: start;
gap: 8px;
min-height: 0;
overflow-y: auto;
padding-right: 2px;
}
.version-center-item {
display: grid;
gap: 8px;
padding: 10px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
}
.version-center-item.active {
border-color: rgba(16, 185, 129, 0.35);
background: rgba(16, 185, 129, 0.05);
}
.version-center-item > button {
display: grid;
gap: 5px;
padding: 0;
border: 0;
background: transparent;
text-align: left;
cursor: pointer;
}
.version-center-item > button div {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.version-center-item > button strong {
color: #0f172a;
font-size: 13px;
font-weight: 900;
}
.version-center-item > button span,
.version-center-item > button p {
color: #64748b;
font-size: 11px;
}
.version-center-item > button p {
margin: 0;
line-height: 1.45;
}
.version-center-item footer {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.version-center-item footer button {
min-height: 24px;
padding: 0 9px;
border: 0;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
font-size: 11px;
font-weight: 850;
cursor: pointer;
}
.version-center-item footer button:nth-child(2) {
background: #eef2ff;
color: #4f46e5;
}
.version-center-item footer button:nth-child(3) {
background: #fff7ed;
color: #ea580c;
}
.version-flow-preview {
display: grid;
gap: 8px;
}
.version-flow-preview article {
display: grid;
grid-template-columns: 22px minmax(0, 1fr);
gap: 8px;
align-items: start;
}
.version-flow-preview i {
color: #2563eb;
font-size: 16px;
}
.version-flow-preview div {
display: grid;
gap: 2px;
}
.version-flow-preview strong {
color: #0f172a;
font-size: 12px;
}
.version-flow-preview span,
.version-flow-preview small,
.version-flow-empty {
color: #64748b;
font-size: 11px;
}
.version-flow-preview small {
grid-column: 2;
}
.rule-drawer-backdrop {
position: fixed;
inset: 0;
z-index: 80;
display: flex;
justify-content: flex-end;
background: rgba(15, 23, 42, 0.34);
backdrop-filter: blur(3px);
}
.rule-drawer {
width: min(860px, 78vw);
height: 100%;
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
gap: 18px;
padding: 22px;
overflow: auto;
background: #fff;
box-shadow: -18px 0 42px rgba(15, 23, 42, 0.18);
}
.timeline-drawer {
width: min(640px, 62vw);
}
.rule-drawer-head {
display: flex;
align-items: start;
justify-content: space-between;
gap: 16px;
}
.rule-drawer-head span {
color: #2563eb;
font-size: 12px;
font-weight: 850;
}
.rule-drawer-head h3 {
margin: 4px 0 0;
color: #0f172a;
font-size: 20px;
font-weight: 950;
}
.rule-drawer-head button {
width: 34px;
height: 34px;
border: 0;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
cursor: pointer;
}
.rule-drawer-state {
min-height: 160px;
display: grid;
place-items: center;
gap: 10px;
color: #64748b;
}
.rule-drawer-state.error {
color: #dc2626;
}
.rule-timeline-list {
display: grid;
align-content: start;
}
.rule-timeline-item {
position: relative;
display: grid;
grid-template-columns: 30px minmax(0, 1fr);
gap: 12px;
padding-bottom: 20px;
}
.rule-timeline-item:not(:last-child)::after {
content: '';
position: absolute;
left: 14px;
top: 28px;
bottom: 0;
width: 2px;
background: #e2e8f0;
}
.rule-timeline-item > i {
position: relative;
z-index: 1;
width: 30px;
height: 30px;
display: grid;
place-items: center;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
}
.rule-timeline-item > i.success {
background: #dcfce7;
color: #059669;
}
.rule-timeline-item > i.warning {
background: #fef3c7;
color: #d97706;
}
.rule-timeline-item > i.danger {
background: #fee2e2;
color: #dc2626;
}
.rule-timeline-item > i.info {
background: #dbeafe;
color: #2563eb;
}
.rule-timeline-item header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.rule-timeline-item header strong {
color: #0f172a;
font-size: 14px;
}
.rule-timeline-item header b {
min-height: 22px;
display: inline-flex;
align-items: center;
padding: 0 8px;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
font-size: 11px;
}
.rule-timeline-item header span,
.rule-timeline-item p,
.rule-timeline-item small {
color: #64748b;
}
.rule-timeline-item p {
margin: 8px 0 4px;
line-height: 1.6;
}
.compare-toolbar {
display: flex;
align-items: end;
gap: 12px;
}
.compare-toolbar label {
min-width: 0;
display: grid;
gap: 6px;
flex: 1;
}
.compare-toolbar span {
color: #64748b;
font-size: 12px;
font-weight: 850;
}
.compare-toolbar select {
width: 100%;
min-height: 40px;
padding: 0 12px;
border: 1px solid #cbd5e1;
border-radius: 12px;
background: #fff;
}
.compare-toolbar i {
margin-bottom: 10px;
color: #94a3b8;
}
.compare-summary-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 10px;
}
.compare-summary-grid article {
display: grid;
gap: 4px;
min-height: 76px;
padding: 12px;
border-radius: 14px;
background: #f8fafc;
}
.compare-summary-grid span {
color: #64748b;
font-size: 12px;
}
.compare-summary-grid strong {
color: #0f172a;
font-size: 24px;
font-weight: 950;
}
.compare-panel {
display: grid;
gap: 10px;
}
.compare-panel header {
display: flex;
align-items: center;
justify-content: space-between;
}
.compare-panel header strong {
color: #0f172a;
font-size: 14px;
}
.compare-panel p,
.compare-panel small {
color: #64748b;
}
.compare-sheet-list {
display: grid;
gap: 8px;
}
.compare-sheet-list article {
min-height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 0 12px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
}
.compare-sheet-list strong {
min-width: 0;
color: #0f172a;
font-size: 13px;
font-weight: 850;
overflow-wrap: anywhere;
}
.compare-sheet-list b {
min-height: 24px;
display: inline-flex;
align-items: center;
flex: 0 0 auto;
padding: 0 9px;
border-radius: 999px;
font-size: 12px;
font-weight: 850;
}
.compare-sheet-list b.success {
background: #dcfce7;
color: #059669;
}
.compare-sheet-list b.danger {
background: #fee2e2;
color: #dc2626;
}
.compare-table-wrap {
overflow: auto;
border: 1px solid #e2e8f0;
border-radius: 14px;
}
.compare-table-wrap table {
width: 100%;
border-collapse: collapse;
}
.compare-table-wrap th,
.compare-table-wrap td {
padding: 10px 12px;
border-bottom: 1px solid #eef2f7;
text-align: left;
vertical-align: top;
}
.compare-table-wrap th {
color: #475569;
font-size: 12px;
background: #f8fafc;
}
.compare-table-wrap td {
color: #0f172a;
font-size: 13px;
}
.compare-table-wrap td b {
min-height: 22px;
display: inline-flex;
align-items: center;
padding: 0 8px;
border-radius: 999px;
font-size: 11px;
}
.compare-table-wrap td b.success {
background: #dcfce7;
color: #059669;
}
.compare-table-wrap td b.warning {
background: #fef3c7;
color: #d97706;
}
.compare-table-wrap td b.danger {
background: #fee2e2;
color: #dc2626;
}
@media (max-width: 1280px) {
.spreadsheet-editor-body {
grid-template-columns: 1fr;
}
}
@media (max-width: 900px) {
.rule-drawer,
.timeline-drawer {
width: 100%;
}
.compare-summary-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
.rule-spreadsheet-toolbar {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.spreadsheet-mode-pill {
min-height: 28px;
display: inline-flex;
align-items: center;
padding: 0 10px;
border-radius: 999px;
background: #eff6ff;
color: #1d4ed8;
font-size: 12px;
font-weight: 800;
}
.spreadsheet-upload-input {
display: none;
}
.spreadsheet-meta-strip {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.spreadsheet-meta-strip span {
min-height: 28px;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 10px;
border-radius: 999px;
background: #f8fafc;
color: #475569;
font-size: 12px;
font-weight: 750;
}
.spreadsheet-meta-strip strong {
color: #0f172a;
font-weight: 850;
}
.rule-spreadsheet-stage {
position: relative;
min-height: 720px;
overflow: hidden;
border: 1px solid #dbe4ee;
border-radius: 14px;
background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.rule-spreadsheet-host {
width: 100%;
height: 100%;
min-height: 720px;
}
.rule-spreadsheet-host.hidden {
visibility: hidden;
}
.rule-spreadsheet-state {
position: absolute;
inset: 0;
display: grid;
place-items: center;
gap: 8px;
padding: 24px;
background: rgba(248, 250, 252, 0.94);
color: #475569;
font-size: 13px;
font-weight: 800;
text-align: center;
}
.rule-spreadsheet-state i {
font-size: 22px;
}
.rule-spreadsheet-state.error {
color: #dc2626;
}
.preview-mode-note {
display: inline-flex;
align-items: center;
gap: 8px;
margin-top: 14px;
padding: 10px 12px;
border: 1px solid rgba(14, 165, 233, 0.22);
border-radius: 12px;
background: linear-gradient(180deg, rgba(240, 249, 255, 0.96), rgba(224, 242, 254, 0.9));
color: #075985;
font-size: 12px;
font-weight: 760;
line-height: 1.5;
}
.preview-mode-note i {
font-size: 16px;
}
.markdown-card .field {
min-height: 0;
grid-template-rows: auto minmax(0, 1fr);
@@ -958,7 +1797,6 @@ tbody tr.spotlight {
border-left: 0;
background: transparent;
text-align: left;
cursor: pointer;
transition: background 180ms ease;
}
@@ -976,6 +1814,17 @@ tbody tr.spotlight {
background: rgba(16, 185, 129, 0.08);
}
.version-main {
display: grid;
gap: 6px;
width: 100%;
padding: 0;
border: 0;
background: transparent;
text-align: left;
cursor: pointer;
}
.version-row-head {
display: grid;
grid-template-columns: minmax(52px, 1fr) 46px 82px;
@@ -1017,12 +1866,76 @@ tbody tr.spotlight {
font-weight: 850;
}
.version-current-slot .current-version.working {
background: #dbeafe;
color: #2563eb;
}
.version-row p {
color: #64748b;
font-size: 12px;
line-height: 1.5;
}
.version-row-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.version-state {
min-height: 22px;
display: inline-flex;
align-items: center;
padding: 0 8px;
border-radius: 999px;
font-size: 11px;
font-weight: 850;
}
.version-state.success {
background: #dcfce7;
color: #059669;
}
.version-state.warning {
background: #fef3c7;
color: #d97706;
}
.version-state.danger {
background: #fee2e2;
color: #dc2626;
}
.version-state.draft {
background: #e2e8f0;
color: #475569;
}
.version-state.disabled {
background: #f1f5f9;
color: #64748b;
}
.version-restore-btn {
min-height: 24px;
padding: 0 9px;
border: 0;
border-radius: 999px;
background: #eef2ff;
color: #4f46e5;
font-size: 11px;
font-weight: 850;
cursor: pointer;
}
.version-restore-btn:disabled {
cursor: not-allowed;
opacity: 0.55;
}
.empty-side-note {
min-height: 120px;
display: grid;
@@ -1392,6 +2305,11 @@ tbody tr.spotlight {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rule-spreadsheet-stage,
.rule-spreadsheet-host {
min-height: 620px;
}
.detail-grid {
grid-template-columns: 1fr;
}