Spaces:
Paused
Paused
icebear0828 Claude Opus 4.6 commited on
Commit ·
f514d06
1
Parent(s): bbf1e14
fix: restore model dropdown selector, keep URL/key readonly
Browse filesCo-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- public/dashboard.html +18 -5
public/dashboard.html
CHANGED
|
@@ -135,7 +135,12 @@
|
|
| 135 |
<div class="space-y-1.5">
|
| 136 |
<label class="text-xs font-semibold text-slate-700 dark:text-text-main" data-i18n="defaultModel">Default Model</label>
|
| 137 |
<div class="relative">
|
| 138 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
</div>
|
| 140 |
</div>
|
| 141 |
<!-- API Key -->
|
|
@@ -625,17 +630,24 @@ async function loadStatus() {
|
|
| 625 |
}
|
| 626 |
|
| 627 |
async function populateModelDropdown() {
|
| 628 |
-
const
|
| 629 |
try {
|
| 630 |
const resp = await fetch('/v1/models');
|
| 631 |
const data = await resp.json();
|
| 632 |
const models = data.data.map(m => m.id);
|
| 633 |
if (models.length > 0) {
|
| 634 |
-
|
| 635 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 636 |
}
|
| 637 |
} catch {
|
| 638 |
-
|
| 639 |
}
|
| 640 |
}
|
| 641 |
|
|
@@ -843,5 +855,6 @@ applyI18n();
|
|
| 843 |
updateLangToggle();
|
| 844 |
loadStatus();
|
| 845 |
loadAccounts();
|
|
|
|
| 846 |
</script>
|
| 847 |
</body></html>
|
|
|
|
| 135 |
<div class="space-y-1.5">
|
| 136 |
<label class="text-xs font-semibold text-slate-700 dark:text-text-main" data-i18n="defaultModel">Default Model</label>
|
| 137 |
<div class="relative">
|
| 138 |
+
<select id="defaultModel" class="w-full appearance-none pl-3 pr-10 py-2.5 bg-white dark:bg-bg-dark border border-gray-200 dark:border-border-dark rounded-lg text-[0.78rem] text-slate-700 dark:text-text-main font-medium focus:ring-1 focus:ring-primary focus:border-primary outline-none cursor-pointer transition-colors">
|
| 139 |
+
<option value="codex">codex</option>
|
| 140 |
+
</select>
|
| 141 |
+
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500 dark:text-text-dim">
|
| 142 |
+
<svg class="size-[18px]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5"/></svg>
|
| 143 |
+
</div>
|
| 144 |
</div>
|
| 145 |
</div>
|
| 146 |
<!-- API Key -->
|
|
|
|
| 630 |
}
|
| 631 |
|
| 632 |
async function populateModelDropdown() {
|
| 633 |
+
const sel = document.getElementById('defaultModel');
|
| 634 |
try {
|
| 635 |
const resp = await fetch('/v1/models');
|
| 636 |
const data = await resp.json();
|
| 637 |
const models = data.data.map(m => m.id);
|
| 638 |
if (models.length > 0) {
|
| 639 |
+
sel.innerHTML = '';
|
| 640 |
+
models.forEach(id => {
|
| 641 |
+
const opt = document.createElement('option');
|
| 642 |
+
opt.value = id;
|
| 643 |
+
opt.textContent = id;
|
| 644 |
+
sel.appendChild(opt);
|
| 645 |
+
});
|
| 646 |
+
const preferred = models.find(n => n.includes('5.3-codex'));
|
| 647 |
+
if (preferred) sel.value = preferred;
|
| 648 |
}
|
| 649 |
} catch {
|
| 650 |
+
sel.innerHTML = '<option value="codex">codex</option>';
|
| 651 |
}
|
| 652 |
}
|
| 653 |
|
|
|
|
| 855 |
updateLangToggle();
|
| 856 |
loadStatus();
|
| 857 |
loadAccounts();
|
| 858 |
+
document.getElementById('defaultModel').addEventListener('change', () => updateCodeExamples());
|
| 859 |
</script>
|
| 860 |
</body></html>
|