feat: v1.3.0 - 五项优化
1. 显存/内存进度条置顶显示 (sticky) - 滚动页面时始终可见 VRAM 和内存占用情况 - GPU+CPU 模式时内存条也同步显示在 sticky 区域 2. 系统内存配置合并到 GPU 配置区域内 - GPU+CPU 模式时无缝衔接在显存占用下方 - 去掉单独面板,去掉单位选择,固定为 GB - 填入 >0 即为有限制,0 为无限制 3. 参数同时显示简写和完整标志 - 如 -ngl / --n-gpu-layers 4. 生成命令区域增加智能提示 - 显存不足时提示调整参数或切换模式 - 内存不足时提示增加上限或减少 GPU 层 - 显存充足时显示确认信息 - 未选模型/GPU 时给出引导提示 5. 自然语言输入改为多行 textarea - 支持多行输入 - placeholder 说明可以自然对话描述需求
This commit is contained in:
+97
-3
@@ -14,6 +14,103 @@
|
||||
--radius: 8px;
|
||||
}
|
||||
|
||||
/* ===== Sticky Memory Bar ===== */
|
||||
.sticky-mem-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 200;
|
||||
background: var(--bg-panel);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 16px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.4);
|
||||
}
|
||||
.sticky-vram-row, .sticky-ram-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.sticky-ram-row { margin-top: 4px; }
|
||||
.sticky-ram-row.hidden { display: none; }
|
||||
.sticky-label {
|
||||
font-size: 0.8em;
|
||||
font-weight: 600;
|
||||
color: var(--text-dim);
|
||||
min-width: 60px;
|
||||
}
|
||||
.sticky-bar-container {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
height: 22px;
|
||||
background: var(--bg);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.sticky-bar {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #4ecca3, #e9c46a);
|
||||
border-radius: 3px;
|
||||
transition: width 0.3s;
|
||||
width: 0%;
|
||||
}
|
||||
.sticky-bar.warning { background: linear-gradient(90deg, #e9c46a, #f4a261); }
|
||||
.sticky-bar.danger { background: linear-gradient(90deg, #f4a261, #e94560); }
|
||||
.ram-sticky-bar { background: linear-gradient(90deg, #4e9cca, #4ecca3); }
|
||||
.sticky-bar-text {
|
||||
position: absolute;
|
||||
top: 50%; left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 0.75em;
|
||||
font-weight: 600;
|
||||
color: white;
|
||||
text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ===== Inline Memory Config ===== */
|
||||
.inline-memory-config { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
|
||||
.inline-memory-config.hidden { display: none; }
|
||||
.memory-input-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
|
||||
.memory-input-row label { font-size: 0.85em; color: var(--text-dim); }
|
||||
.memory-input-row input {
|
||||
background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
|
||||
padding: 6px 10px; border-radius: 4px; width: 100px;
|
||||
}
|
||||
.memory-unit { font-size: 0.85em; color: var(--text-dim); }
|
||||
|
||||
/* ===== Parameter Items (show long flag) ===== */
|
||||
.param-item .param-flag-long {
|
||||
font-family: monospace;
|
||||
font-size: 0.8em;
|
||||
color: var(--text-dim);
|
||||
background: var(--bg);
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
min-width: 80px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ===== Command Hints ===== */
|
||||
.command-hint { margin-top: 8px; font-size: 0.85em; }
|
||||
.hint-error { color: var(--accent); padding: 6px 10px; background: rgba(233, 69, 96, 0.1); border-radius: 4px; margin-bottom: 4px; border-left: 3px solid var(--accent); }
|
||||
.hint-warning { color: #e9c46a; padding: 6px 10px; background: rgba(233, 196, 106, 0.1); border-radius: 4px; margin-bottom: 4px; border-left: 3px solid #e9c46a; }
|
||||
.hint-info { color: var(--text-dim); padding: 6px 10px; background: rgba(136, 146, 176, 0.1); border-radius: 4px; margin-bottom: 4px; border-left: 3px solid var(--text-dim); }
|
||||
.hint-ok { color: var(--accent2); padding: 6px 10px; background: rgba(78, 204, 163, 0.1); border-radius: 4px; margin-bottom: 4px; border-left: 3px solid var(--accent2); }
|
||||
|
||||
/* ===== Natural Language Textarea ===== */
|
||||
.nl-input-container { display: flex; gap: 8px; align-items: flex-end; }
|
||||
.nl-input-container textarea {
|
||||
flex: 1; background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
|
||||
padding: 10px 14px; border-radius: var(--radius); font-size: 0.95em; resize: vertical; font-family: inherit;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.nl-input-container textarea:focus { outline: none; border-color: var(--accent); }
|
||||
.nl-input-container button { padding: 10px 24px; background: var(--accent2); color: var(--bg); border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600; flex-shrink: 0; }
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
@@ -234,9 +331,6 @@ header h1 {
|
||||
.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); }
|
||||
|
||||
Reference in New Issue
Block a user