diff --git a/app/main.py b/app/main.py index d995417..fa22f89 100644 --- a/app/main.py +++ b/app/main.py @@ -373,7 +373,6 @@ PAGE_HTML = """ display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; } - .board-row:first-child .board-rank { background: var(--green-deep); color: #fff; } .board-main { flex: 1; min-width: 0; } .board-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; } .board-cost { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; } @@ -535,6 +534,11 @@ PAGE_HTML = """
@@ -757,18 +761,31 @@ function setUsageMode(mode) { $('view-coop').style.display = mode === 'coop' ? '' : 'none'; } +let boardSort = 'cost'; // default: rank by cost (requests made nomic-embed dominate) +let coopModels = []; + +function setBoardSort(mode) { + boardSort = mode; + $('sort-cost').className = 'mode-btn' + (mode === 'cost' ? ' active' : ''); + $('sort-requests').className = 'mode-btn' + (mode === 'requests' ? ' active' : ''); + renderBoard(); +} + function renderBoard(models) { + if (models !== undefined) coopModels = models || []; const el = $('coop-board'); - if (!models.length) { + if (!coopModels.length) { el.innerHTML = '