1. 模型选择改为两步式:先搜索选择基模型,再选择量化版本 - 自动选中默认量化版本(Q4_K_M),后台可配置 - 模型新增 base_model 字段,按基模型分组 - 后台模型管理增加基模型字段 2. 参数搜索改为全局搜索 - 搜索时跨所有分类显示匹配参数 - 隐藏分类标签页,显示匹配数量 3. 自然语言支持 LLM 接口 - 后台可配置 LLM API (URL/Key/Model/System Prompt) - 启用后优先调用 LLM 解析,失败自动回退正则解析 - 兼容 OpenAI API 格式
386 lines
15 KiB
CSS
386 lines
15 KiB
CSS
/* ===== Base Styles ===== */
|
|
:root {
|
|
--bg: #1a1a2e;
|
|
--bg-panel: #16213e;
|
|
--bg-input: #0f3460;
|
|
--bg-hover: #1a3a6b;
|
|
--text: #e0e0e0;
|
|
--text-dim: #8892b0;
|
|
--accent: #e94560;
|
|
--accent-hover: #ff6b6b;
|
|
--accent2: #4ecca3;
|
|
--border: #2a3a5c;
|
|
--shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
|
--radius: 8px;
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
line-height: 1.6;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
#app, #admin-app {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* ===== Header ===== */
|
|
header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 20px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 1.8em;
|
|
background: linear-gradient(135deg, var(--accent), var(--accent2));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.header-right { display: flex; gap: 12px; align-items: center; }
|
|
|
|
.admin-link {
|
|
color: var(--accent2);
|
|
text-decoration: none;
|
|
padding: 8px 16px;
|
|
border: 1px solid var(--accent2);
|
|
border-radius: var(--radius);
|
|
transition: all 0.2s;
|
|
font-size: 0.9em;
|
|
}
|
|
.admin-link:hover { background: var(--accent2); color: var(--bg); }
|
|
|
|
.btn-logout {
|
|
padding: 8px 16px;
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: var(--radius);
|
|
cursor: pointer;
|
|
font-size: 0.9em;
|
|
}
|
|
.btn-logout:hover { background: var(--accent-hover); }
|
|
|
|
/* ===== Login Screen ===== */
|
|
.login-screen {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 60vh;
|
|
}
|
|
|
|
.login-box {
|
|
background: var(--bg-panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 40px;
|
|
text-align: center;
|
|
min-width: 320px;
|
|
}
|
|
|
|
.login-box h2 {
|
|
color: var(--accent2);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.login-box input {
|
|
width: 100%;
|
|
padding: 10px 14px;
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
border-radius: var(--radius);
|
|
font-size: 1em;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.login-box .btn-primary { width: 100%; }
|
|
|
|
.login-error { color: var(--accent); margin-top: 8px; font-size: 0.9em; }
|
|
|
|
/* ===== Top Controls ===== */
|
|
.top-controls { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
|
|
|
|
.control-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
|
|
|
|
.control-group label { font-size: 0.85em; color: var(--text-dim); font-weight: 500; }
|
|
|
|
.control-group input, .control-group select {
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius);
|
|
font-size: 0.95em;
|
|
}
|
|
.control-group input:focus, .control-group select:focus { outline: none; border-color: var(--accent); }
|
|
|
|
/* ===== Mode Switch ===== */
|
|
.mode-switch { display: flex; gap: 0; flex: 1; }
|
|
|
|
.mode-btn {
|
|
flex: 1;
|
|
padding: 8px 16px;
|
|
border: 1px solid var(--border);
|
|
background: var(--bg-input);
|
|
color: var(--text-dim);
|
|
cursor: pointer;
|
|
font-size: 0.9em;
|
|
}
|
|
.mode-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
|
|
.mode-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }
|
|
.mode-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
|
|
|
|
/* ===== Panels ===== */
|
|
.panel {
|
|
background: var(--bg-panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.panel h2 { font-size: 1.2em; margin-bottom: 16px; color: var(--accent2); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
|
|
|
|
.hidden { display: none !important; }
|
|
|
|
/* ===== GPU Slots ===== */
|
|
.gpu-slot { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; padding: 10px; background: var(--bg-input); border-radius: var(--radius); border: 1px solid var(--border); }
|
|
.gpu-slot .gpu-index { font-weight: bold; color: var(--accent); min-width: 30px; }
|
|
.gpu-slot select { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: 4px; }
|
|
.gpu-slot .vram-info { color: var(--accent2); font-size: 0.9em; min-width: 120px; }
|
|
.gpu-slot .btn-remove { background: var(--accent); color: white; border: none; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; font-size: 1.1em; display: flex; align-items: center; justify-content: center; }
|
|
|
|
.btn-add { background: transparent; border: 1px dashed var(--border); color: var(--text-dim); padding: 8px 16px; border-radius: var(--radius); cursor: pointer; width: 100%; margin-top: 8px; }
|
|
.btn-add:hover { border-color: var(--accent2); color: var(--accent2); }
|
|
|
|
/* ===== VRAM Display ===== */
|
|
.vram-display { margin-top: 16px; padding: 12px; background: var(--bg-input); border-radius: var(--radius); }
|
|
.vram-bar-container { position: relative; height: 30px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
|
|
.vram-bar { height: 100%; background: linear-gradient(90deg, #4ecca3, #e9c46a); border-radius: 3px; transition: width 0.3s; width: 0%; }
|
|
.vram-bar.warning { background: linear-gradient(90deg, #e9c46a, #f4a261); }
|
|
.vram-bar.danger { background: linear-gradient(90deg, #f4a261, #e94560); }
|
|
.ram-bar { background: linear-gradient(90deg, #4e9cca, #4ecca3); }
|
|
.vram-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.85em; font-weight: 600; color: white; text-shadow: 1px 1px 2px rgba(0,0,0,0.8); white-space: nowrap; }
|
|
.vram-breakdown { margin-top: 10px; font-size: 0.85em; color: var(--text-dim); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
|
|
.vram-breakdown .breakdown-item { display: flex; justify-content: space-between; padding: 4px 8px; background: var(--bg); border-radius: 4px; }
|
|
|
|
/* ===== Model Selection (two-step) ===== */
|
|
.model-step { margin-bottom: 12px; }
|
|
.model-step.hidden { display: none; }
|
|
.model-step-label { display: block; font-size: 0.85em; color: var(--text-dim); margin-bottom: 6px; }
|
|
.model-select-container { position: relative; }
|
|
.model-select-container input {
|
|
width: 100%;
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 10px 14px;
|
|
border-radius: var(--radius);
|
|
font-size: 0.95em;
|
|
}
|
|
.model-select-container input:focus { outline: none; border-color: var(--accent); }
|
|
|
|
.model-dropdown {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0; right: 0;
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border);
|
|
border-radius: 0 0 var(--radius) var(--radius);
|
|
z-index: 100;
|
|
}
|
|
|
|
.model-option {
|
|
padding: 10px 14px;
|
|
cursor: pointer;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
.model-option:hover { background: var(--bg-hover); }
|
|
.model-name { font-size: 0.9em; }
|
|
.model-meta { font-size: 0.8em; color: var(--text-dim); }
|
|
|
|
.quant-btn {
|
|
display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
|
|
padding: 8px 16px; background: var(--bg-input); border: 1px solid var(--border);
|
|
color: var(--text); border-radius: var(--radius); cursor: pointer; font-size: 0.85em; margin-right: 8px; margin-bottom: 8px; transition: all 0.15s;
|
|
}
|
|
.quant-btn:hover { border-color: var(--accent2); }
|
|
.quant-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
|
|
.quant-size { font-size: 0.75em; color: var(--text-dim); }
|
|
.quant-btn.active .quant-size { color: rgba(255,255,255,0.8); }
|
|
|
|
.model-selected-info { margin-top: 12px; }
|
|
.model-detail { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.85em; }
|
|
.detail-item { background: var(--bg-input); padding: 4px 10px; border-radius: 4px; }
|
|
.detail-item b { color: var(--accent2); }
|
|
|
|
/* ===== Natural Language ===== */
|
|
.nl-input-container { display: flex; gap: 8px; }
|
|
.nl-input-container input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: var(--radius); }
|
|
.nl-input-container button { padding: 10px 24px; background: var(--accent2); color: var(--bg); border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600; }
|
|
.nl-result { margin-top: 10px; font-size: 0.9em; color: var(--text-dim); }
|
|
.parsed-param { display: inline-block; margin: 2px 4px; padding: 2px 8px; background: var(--bg-input); border-radius: 4px; border: 1px solid var(--border); }
|
|
.parsed-param .key { color: var(--accent2); }
|
|
.parsed-param .value { color: var(--accent); }
|
|
|
|
/* ===== Parameter Tabs ===== */
|
|
.param-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
|
|
.tab-btn { padding: 6px 14px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius); cursor: pointer; font-size: 0.85em; }
|
|
.tab-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
|
|
|
|
/* ===== Param Search ===== */
|
|
.param-search-container { margin-bottom: 12px; position: relative; }
|
|
.param-search-container input {
|
|
width: 100%;
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius);
|
|
font-size: 0.9em;
|
|
}
|
|
.param-search-container input:focus { outline: none; border-color: var(--accent); }
|
|
.search-hint { font-size: 0.8em; color: var(--text-dim); margin-left: 8px; }
|
|
|
|
/* ===== Settings (wide textarea) ===== */
|
|
.settings-form .setting-item-wide { grid-column: 1 / -1; }
|
|
.settings-form textarea {
|
|
background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
|
|
padding: 8px 12px; border-radius: var(--radius); font-size: 0.85em; resize: vertical; width: 100%; font-family: inherit;
|
|
}
|
|
|
|
/* ===== Parameter Items (one per line) ===== */
|
|
#param-container { display: flex; flex-direction: column; gap: 6px; }
|
|
|
|
.param-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 12px;
|
|
background: var(--bg-input);
|
|
border-radius: var(--radius);
|
|
border: 1px solid var(--border);
|
|
transition: border-color 0.15s;
|
|
}
|
|
.param-item:hover { border-color: var(--accent2); }
|
|
.param-item.modified { border-color: var(--accent); background: rgba(233, 69, 96, 0.05); }
|
|
|
|
.param-item .param-flag {
|
|
font-family: monospace;
|
|
font-size: 0.8em;
|
|
color: var(--accent2);
|
|
background: var(--bg);
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
min-width: 80px;
|
|
text-align: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.param-item .vram-badge {
|
|
color: var(--accent);
|
|
font-size: 0.7em;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.param-item .param-desc-text {
|
|
font-size: 0.85em;
|
|
color: var(--text-dim);
|
|
flex: 1;
|
|
min-width: 0;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.param-item input[type="text"],
|
|
.param-item input[type="number"],
|
|
.param-item select {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 5px 8px;
|
|
border-radius: 4px;
|
|
font-size: 0.85em;
|
|
width: 200px;
|
|
flex-shrink: 0;
|
|
}
|
|
.param-item input:focus, .param-item select:focus { outline: none; border-color: var(--accent); }
|
|
|
|
.param-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
|
|
|
|
.param-item .param-unit {
|
|
font-size: 0.8em;
|
|
color: var(--text-dim);
|
|
flex-shrink: 0;
|
|
min-width: 40px;
|
|
}
|
|
|
|
/* ===== Toggle Advanced ===== */
|
|
.btn-toggle-advanced { margin-top: 8px; padding: 8px 16px; background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius); cursor: pointer; font-size: 0.85em; width: 100%; }
|
|
.btn-toggle-advanced:hover { border-color: var(--accent); color: var(--accent); }
|
|
|
|
/* ===== Command Output ===== */
|
|
.command-panel { position: sticky; bottom: 20px; }
|
|
.command-output { background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 0.9em; color: #4ecca3; word-break: break-all; min-height: 60px; white-space: pre-wrap; }
|
|
.command-actions { margin-top: 12px; display: flex; gap: 8px; }
|
|
.btn-copy, .btn-gen { padding: 8px 20px; border: none; border-radius: var(--radius); cursor: pointer; font-size: 0.9em; font-weight: 500; }
|
|
.btn-copy { background: var(--accent2); color: var(--bg); }
|
|
.btn-copy:hover { opacity: 0.85; }
|
|
.btn-gen { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); }
|
|
|
|
/* ===== Admin ===== */
|
|
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
|
|
.admin-tab { padding: 8px 20px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius); cursor: pointer; }
|
|
.admin-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
|
|
.admin-section { display: none; }
|
|
.admin-section.active { display: block; }
|
|
.admin-add-form { background: var(--bg-input); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; border: 1px solid var(--border); }
|
|
.admin-add-form h3 { margin-bottom: 12px; color: var(--accent2); font-size: 1em; }
|
|
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
.form-row input { flex: 1; min-width: 120px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }
|
|
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
|
|
.form-grid input, .form-grid select { padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }
|
|
.btn-primary { padding: 8px 20px; background: var(--accent); color: white; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 500; margin-top: 8px; }
|
|
.btn-primary:hover { background: var(--accent-hover); }
|
|
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
|
|
.admin-table th, .admin-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
|
|
.admin-table th { color: var(--accent2); font-weight: 600; }
|
|
.admin-table tr:hover { background: var(--bg-input); }
|
|
.admin-table .btn-action { padding: 4px 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85em; margin-right: 4px; }
|
|
.btn-edit { background: var(--accent2); color: var(--bg); }
|
|
.btn-delete { background: var(--accent); color: white; }
|
|
.admin-table input, .admin-table select { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 4px 6px; border-radius: 3px; width: 100%; }
|
|
.settings-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 16px; }
|
|
.settings-form .setting-item { display: flex; flex-direction: column; gap: 4px; }
|
|
.settings-form label { font-size: 0.85em; color: var(--text-dim); }
|
|
.settings-form input { background: var(--bg-input); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: var(--radius); }
|
|
|
|
/* ===== Responsive ===== */
|
|
@media (max-width: 768px) {
|
|
.top-controls { flex-direction: column; }
|
|
.param-item { flex-wrap: wrap; }
|
|
.param-item .param-desc-text { white-space: normal; }
|
|
.param-item input[type="text"], .param-item input[type="number"], .param-item select { width: 150px; }
|
|
.form-row { flex-direction: column; }
|
|
}
|