Fix turbo nav for settings and stats pages.
Extract settings.js, preserve inline scripts from raw HTML (DOMParser strips them), and load trade config via JSON script tag. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+6
-2
@@ -138,8 +138,11 @@
|
||||
}
|
||||
|
||||
function loadStats() {
|
||||
fetch('/api/stats')
|
||||
.then(function (r) { return r.json(); })
|
||||
fetch('/api/stats', { credentials: 'same-origin' })
|
||||
.then(function (r) {
|
||||
if (!r.ok) throw new Error('HTTP ' + r.status);
|
||||
return r.json();
|
||||
})
|
||||
.then(applyData)
|
||||
.catch(function () {
|
||||
var updated = document.getElementById('stats-updated');
|
||||
@@ -148,6 +151,7 @@
|
||||
}
|
||||
|
||||
function bootStatsPage() {
|
||||
if (!document.getElementById('stats-summary')) return;
|
||||
var viewSel = document.getElementById('stats-view-select');
|
||||
if (viewSel && !viewSel.dataset.statsBound) {
|
||||
viewSel.dataset.statsBound = '1';
|
||||
|
||||
Reference in New Issue
Block a user