Initial commit of LLM speed test app

This commit is contained in:
2026-09-06 11:45:52 +08:00
commit 5544b5f9f9
38 changed files with 8587 additions and 0 deletions
+440
View File
@@ -0,0 +1,440 @@
/* 速度测试助手 UI 样式 */
:root {
--primary: #6366f1;
--primary-dark: #4f46e5;
--success: #22c55e;
--warning: #f59e0b;
--danger: #ef4444;
--gray-50: #f8fafc;
--gray-100: #f1f5f9;
--gray-200: #e2e8f0;
--gray-300: #cbd5e1;
--gray-600: #475569;
--gray-700: #334155;
--gray-800: #1e293b;
--gray-900: #0f172a;
--radius: 8px;
--shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
--shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
background: var(--gray-50);
color: var(--gray-800);
line-height: 1.6;
}
.app-container {
display: grid;
grid-template-columns: 320px 1fr;
min-height: 100vh;
}
/* 左侧面板 */
.sidebar {
background: white;
border-right: 1px solid var(--gray-200);
padding: 20px;
overflow-y: auto;
height: 100vh;
position: sticky;
top: 0;
}
.sidebar-header {
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 2px solid var(--gray-200);
}
.sidebar-header h1 {
font-size: 18px;
color: var(--primary);
margin-bottom: 5px;
}
.sidebar-header .version {
font-size: 12px;
color: var(--gray-600);
}
.panel {
margin-bottom: 20px;
}
.panel-title {
font-size: 14px;
font-weight: 600;
color: var(--gray-700);
margin-bottom: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.test-case-item {
display: flex;
align-items: center;
padding: 10px;
margin-bottom: 6px;
border-radius: var(--radius);
cursor: pointer;
transition: background 0.2s;
border: 1px solid transparent;
}
.test-case-item:hover {
background: var(--gray-100);
}
.test-case-item input[type="checkbox"] {
margin-right: 10px;
cursor: pointer;
}
.test-case-info {
flex: 1;
}
.test-case-name {
font-size: 13px;
font-weight: 500;
}
.test-case-diff {
font-size: 11px;
color: var(--gray-600);
margin-top: 2px;
}
.diff-简单 { color: var(--success); }
.diff-中等 { color: var(--warning); }
.diff-耗时 { color: var(--danger); }
.quick-actions {
display: flex;
gap: 8px;
margin-bottom: 15px;
}
.quick-actions button {
flex: 1;
padding: 6px 10px;
font-size: 12px;
border: 1px solid var(--gray-300);
border-radius: var(--radius);
background: white;
cursor: pointer;
transition: all 0.2s;
}
.quick-actions button:hover {
background: var(--gray-100);
}
.config-group {
margin-bottom: 15px;
}
.config-group label {
display: block;
font-size: 13px;
font-weight: 500;
margin-bottom: 5px;
color: var(--gray-700);
}
.config-group input, .config-group select {
width: 100%;
padding: 8px 12px;
border: 1px solid var(--gray-300);
border-radius: var(--radius);
font-size: 13px;
}
.config-group input:focus, .config-group select:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.btn {
display: block;
width: 100%;
padding: 12px;
border: none;
border-radius: var(--radius);
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
margin-bottom: 10px;
}
.btn-primary {
background: var(--primary);
color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
background: var(--gray-100);
color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* 右侧主区域 */
.main-content {
padding: 20px 30px;
overflow-y: auto;
}
.status-panel {
background: white;
border-radius: var(--radius);
padding: 20px;
margin-bottom: 20px;
box-shadow: var(--shadow);
display: none;
}
.status-panel.active {
display: block;
}
.status-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
}
.status-text {
font-size: 16px;
font-weight: 600;
}
.status-text.running { color: var(--primary); }
.status-text.complete { color: var(--success); }
.status-text.error { color: var(--danger); }
.progress-bar-container {
width: 100%;
height: 8px;
background: var(--gray-200);
border-radius: 4px;
overflow: hidden;
margin-bottom: 15px;
}
.progress-bar {
height: 100%;
background: linear-gradient(90deg, var(--primary), #8b5cf6);
border-radius: 4px;
transition: width 0.3s ease;
width: 0%;
}
.step-list {
list-style: none;
padding: 0;
}
.step-item {
display: flex;
align-items: center;
padding: 8px 0;
font-size: 13px;
color: var(--gray-600);
}
.step-item.completed { color: var(--success); }
.step-item.active { color: var(--primary); font-weight: 500; }
.step-icon {
width: 20px;
margin-right: 10px;
text-align: center;
}
/* 结果区域 */
.results-area {
display: none;
}
.results-area.visible {
display: block;
}
.report-card {
background: white;
border-radius: var(--radius);
padding: 25px;
margin-bottom: 20px;
box-shadow: var(--shadow);
}
.report-card h2 {
font-size: 18px;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid var(--gray-200);
}
.metric-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 15px;
margin-bottom: 20px;
}
.metric-card {
background: var(--gray-50);
padding: 15px;
border-radius: var(--radius);
border-left: 4px solid var(--primary);
}
.metric-card .label {
font-size: 12px;
color: var(--gray-600);
text-transform: uppercase;
}
.metric-card .value {
font-size: 24px;
font-weight: bold;
margin-top: 5px;
color: var(--gray-800);
}
.metric-card-value-desc {
font-size: 11px;
color: var(--gray-600);
margin-top: 4px;
}
.metric-description {
background: var(--gray-50);
padding: 15px;
border-radius: var(--radius);
margin-top: 15px;
font-size: 13px;
line-height: 1.8;
color: var(--gray-700);
}
.metric-description p {
margin-bottom: 8px;
}
.metric-description p:last-child {
margin-bottom: 0;
}
.metric-description strong {
color: var(--gray-900);
}
.metric-card.success { border-left-color: var(--success); }
.metric-card.warning { border-left-color: var(--warning); }
.metric-card.danger { border-left-color: var(--danger); }
table.data-table {
width: 100%;
border-collapse: collapse;
}
table.data-table th,
table.data-table td {
padding: 10px 12px;
text-align: left;
border-bottom: 1px solid var(--gray-200);
font-size: 13px;
}
table.data-table th {
background: var(--gray-100);
font-weight: 600;
font-size: 12px;
text-transform: uppercase;
color: var(--gray-600);
}
table.data-table tr:hover {
background: var(--gray-50);
}
.mono {
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
font-size: 12px;
}
.chart-wrapper {
position: relative;
height: 350px;
margin: 20px 0;
}
.action-buttons {
display: flex;
gap: 10px;
margin-top: 20px;
}
.action-buttons button {
padding: 10px 20px;
border: 1px solid var(--gray-300);
border-radius: var(--radius);
background: white;
cursor: pointer;
font-size: 13px;
font-weight: 500;
transition: all 0.2s;
}
.action-buttons button:hover {
background: var(--gray-100);
}
.action-buttons button.primary {
background: var(--primary);
color: white;
border-color: var(--primary);
}
.action-buttons button.primary:hover {
background: var(--primary-dark);
}
/* 错误提示 */
.error-banner {
background: #fef2f2;
border: 1px solid #fecaca;
border-left: 4px solid var(--danger);
color: #b91c1c;
padding: 12px 15px;
border-radius: var(--radius);
margin-bottom: 15px;
font-size: 13px;
}
/* 响应式 */
@media (max-width: 1024px) {
.app-container {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
height: auto;
}
}