Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5169d368bf |
@@ -209,6 +209,8 @@ header h1 {
|
|||||||
.top-controls { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
|
.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 { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
|
||||||
|
.control-group.control-group-small { flex: 0.5; min-width: 140px; }
|
||||||
|
.control-group.control-group-large { flex: 2; min-width: 300px; }
|
||||||
|
|
||||||
.control-group label { font-size: 0.85em; color: var(--text-dim); font-weight: 500; }
|
.control-group label { font-size: 0.85em; color: var(--text-dim); font-weight: 500; }
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -36,14 +36,14 @@
|
|||||||
<label>llama.cpp 版本</label>
|
<label>llama.cpp 版本</label>
|
||||||
<select id="version-select" onchange="onVersionChange()"></select>
|
<select id="version-select" onchange="onVersionChange()"></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group control-group-large">
|
||||||
<label>运行模式</label>
|
<label>运行模式</label>
|
||||||
<div class="mode-switch">
|
<div class="mode-switch">
|
||||||
<button class="mode-btn active" data-mode="gpu" onclick="switchMode('gpu')">🎮 GPU 模式</button>
|
<button class="mode-btn active" data-mode="gpu" onclick="switchMode('gpu')">🎮 GPU 模式</button>
|
||||||
<button class="mode-btn" data-mode="gpu_cpu" onclick="switchMode('gpu_cpu')">🎮+💻 GPU+CPU 模式</button>
|
<button class="mode-btn" data-mode="gpu_cpu" onclick="switchMode('gpu_cpu')">🎮+💻 GPU+CPU 模式</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group control-group-small">
|
||||||
<label>二进制程序</label>
|
<label>二进制程序</label>
|
||||||
<select id="binary-select">
|
<select id="binary-select">
|
||||||
<option value="llama-server">llama-server</option>
|
<option value="llama-server">llama-server</option>
|
||||||
|
|||||||
@@ -287,6 +287,19 @@ function isParamModified(p, val) {
|
|||||||
|
|
||||||
function setParam(key, value) {
|
function setParam(key, value) {
|
||||||
state.paramValues[key] = value;
|
state.paramValues[key] = value;
|
||||||
|
// Update this item's visual state without full re-render (preserves focus)
|
||||||
|
const item = document.querySelector(`.param-item[data-key="${key}"]`);
|
||||||
|
if (item) {
|
||||||
|
const p = state.params.find(p => p.param_key === key);
|
||||||
|
if (p) {
|
||||||
|
item.classList.remove('param-empty', 'param-changed');
|
||||||
|
if (p.param_key === 'model' && (!value || String(value).trim() === '')) {
|
||||||
|
item.classList.add('param-empty');
|
||||||
|
} else if (isParamModified(p, value)) {
|
||||||
|
item.classList.add('param-changed');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// If on 'modified' tab, re-render to update the list
|
// If on 'modified' tab, re-render to update the list
|
||||||
if (state.currentTab === 'modified') renderParams();
|
if (state.currentTab === 'modified') renderParams();
|
||||||
generateCommand(); updateEstimate();
|
generateCommand(); updateEstimate();
|
||||||
|
|||||||
Reference in New Issue
Block a user