mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 09:45:24 -04:00
Settings: promote Added Models to its own sidebar menu
Move the Added Models endpoint lists out of the Add Models card into a dedicated sidebar tab between Add Models and AI Defaults. The card now focuses purely on adding (Local / API tabs), while the new panel owns the existing endpoints + Probe and Clear-offline controls. admin.js: defensive fallback so a stale 'added' value in localStorage falls back to 'local' instead of leaving both panes hidden.
This commit is contained in:
+5
-1
@@ -1452,8 +1452,12 @@ function initEndpointForm() {
|
||||
const panes = document.querySelectorAll('.adm-models-pane');
|
||||
if (!tabs.length || !panes.length) return;
|
||||
const KEY = 'odysseus.addModels.activeTab';
|
||||
const validTabs = new Set(Array.from(tabs).map((t) => t.dataset.modelsTab));
|
||||
let active = 'local';
|
||||
try { active = localStorage.getItem(KEY) || 'local'; } catch {}
|
||||
try {
|
||||
const stored = localStorage.getItem(KEY);
|
||||
if (stored && validTabs.has(stored)) active = stored;
|
||||
} catch {}
|
||||
const apply = (name) => {
|
||||
active = name;
|
||||
try { localStorage.setItem(KEY, name); } catch {}
|
||||
|
||||
Reference in New Issue
Block a user