upated
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<main class="wrap" style="display:grid; gap: 1rem;">
|
||||
<section class="card">
|
||||
<div class="controls">
|
||||
<label>Max points <input id="maxPoints" type="number" value="{{ SERIES_MAX_POINTS_DEFAULT }}" min="200" max="{{ SERIES_MAX_POINTS_HARD }}" step="200"></label>
|
||||
<label>Max points <input id="maxPoints" type="number" value="{{ SERIES_MAX_POINTS_DEFAULT }}" min="0" max="{{ SERIES_MAX_POINTS_HARD }}" step="200"></label>
|
||||
<button id="reloadSeries">Reload series</button>
|
||||
<span class="muted" id="seriesMeta"></span>
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<script>
|
||||
async function loadSeries() {
|
||||
const maxPoints = Math.max(200, Math.min({{ SERIES_MAX_POINTS_HARD }}, Number(document.getElementById('maxPoints').value||{{ SERIES_MAX_POINTS_DEFAULT }})));
|
||||
const maxPoints = Math.max(1, Math.min({{ SERIES_MAX_POINTS_HARD }}, Number(document.getElementById('maxPoints').value||{{ SERIES_MAX_POINTS_DEFAULT }})));
|
||||
const url = new URL('/api/series', window.location.origin);
|
||||
url.searchParams.set('max_points', maxPoints);
|
||||
const res = await fetch(url);
|
||||
|
||||
Reference in New Issue
Block a user