Apple: grey out the VRAM box on Mac (unified memory only)
Browse files- static/app.js +15 -3
- static/index.html +1 -1
- static/style.css +4 -0
static/app.js
CHANGED
|
@@ -230,10 +230,22 @@ function syncProviderForComputer() {
|
|
| 230 |
}
|
| 231 |
fillGpu();
|
| 232 |
// Apple Silicon shares one memory pool, so the RAM field IS the unified memory
|
| 233 |
-
// (the engine already budgets Apple off this number); label it honestly
|
|
|
|
|
|
|
| 234 |
const ramLabel = $("#ram-label");
|
| 235 |
-
if (ramLabel)
|
| 236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 237 |
}
|
| 238 |
}
|
| 239 |
|
|
|
|
| 230 |
}
|
| 231 |
fillGpu();
|
| 232 |
// Apple Silicon shares one memory pool, so the RAM field IS the unified memory
|
| 233 |
+
// (the engine already budgets Apple off this number); label it honestly, and
|
| 234 |
+
// disable the separate-VRAM box, which is meaningless on Apple.
|
| 235 |
+
const isMac = state.computer === "Mac";
|
| 236 |
const ramLabel = $("#ram-label");
|
| 237 |
+
if (ramLabel) ramLabel.textContent = isMac ? "Unified memory" : "Memory (RAM)";
|
| 238 |
+
const vram = $("#vram");
|
| 239 |
+
if (vram) {
|
| 240 |
+
vram.disabled = isMac;
|
| 241 |
+
if (isMac) vram.value = ""; // no separate VRAM on Apple; clear any stale value
|
| 242 |
+
vram.placeholder = isMac ? "Not applicable on Apple Silicon" : "e.g. 8";
|
| 243 |
+
}
|
| 244 |
+
const vramHint = $("#vram-hint");
|
| 245 |
+
if (vramHint) {
|
| 246 |
+
vramHint.textContent = isMac
|
| 247 |
+
? "Not used on Apple Silicon: it shares one unified memory pool, set above."
|
| 248 |
+
: "Overrides the GPU picker above. Leave blank to use the picker.";
|
| 249 |
}
|
| 250 |
}
|
| 251 |
|
static/index.html
CHANGED
|
@@ -94,7 +94,7 @@
|
|
| 94 |
<div class="field">
|
| 95 |
<span class="label">Graphics memory (VRAM), if you know it</span>
|
| 96 |
<input type="number" id="vram" placeholder="e.g. 8" min="0" max="200" step="1" />
|
| 97 |
-
<div class="hint">Overrides the GPU picker above. Leave blank to use the picker.</div>
|
| 98 |
</div>
|
| 99 |
</div>
|
| 100 |
</details>
|
|
|
|
| 94 |
<div class="field">
|
| 95 |
<span class="label">Graphics memory (VRAM), if you know it</span>
|
| 96 |
<input type="number" id="vram" placeholder="e.g. 8" min="0" max="200" step="1" />
|
| 97 |
+
<div class="hint" id="vram-hint">Overrides the GPU picker above. Leave blank to use the picker.</div>
|
| 98 |
</div>
|
| 99 |
</div>
|
| 100 |
</details>
|
static/style.css
CHANGED
|
@@ -230,6 +230,10 @@ select:hover, input:hover, textarea:hover { border-color: var(--border-hi); }
|
|
| 230 |
select:focus, input:focus, textarea:focus {
|
| 231 |
outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong);
|
| 232 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
select {
|
| 234 |
appearance: none;
|
| 235 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8' fill='%235d7d6e' shape-rendering='crispEdges'%3E%3Crect x='0' y='2' width='1' height='1'/%3E%3Crect x='1' y='3' width='1' height='1'/%3E%3Crect x='2' y='4' width='1' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='5' y='3' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3C/svg%3E");
|
|
|
|
| 230 |
select:focus, input:focus, textarea:focus {
|
| 231 |
outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong);
|
| 232 |
}
|
| 233 |
+
select:disabled, input:disabled, textarea:disabled {
|
| 234 |
+
opacity: .45; cursor: not-allowed; border-color: var(--line-2);
|
| 235 |
+
}
|
| 236 |
+
select:disabled:hover, input:disabled:hover { border-color: var(--line-2); }
|
| 237 |
select {
|
| 238 |
appearance: none;
|
| 239 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8' fill='%235d7d6e' shape-rendering='crispEdges'%3E%3Crect x='0' y='2' width='1' height='1'/%3E%3Crect x='1' y='3' width='1' height='1'/%3E%3Crect x='2' y='4' width='1' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect x='5' y='3' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3C/svg%3E");
|