Rename positions nav to order monitor and set as default landing page.
Remove stats recalculate button; login and home now open /positions without affecting refresh on other routes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -145,29 +145,11 @@
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var viewSel = document.getElementById('stats-view-select');
|
||||
var refreshBtn = document.getElementById('stats-refresh-btn');
|
||||
if (viewSel) {
|
||||
viewSel.addEventListener('change', function () {
|
||||
renderBreakdown(this.value);
|
||||
});
|
||||
}
|
||||
if (refreshBtn) {
|
||||
refreshBtn.addEventListener('click', function () {
|
||||
var btn = this;
|
||||
btn.disabled = true;
|
||||
btn.textContent = '计算中…';
|
||||
fetch('/api/stats/refresh', { method: 'POST' })
|
||||
.then(function (r) { return r.json(); })
|
||||
.then(applyData)
|
||||
.catch(function () {
|
||||
alert('重新计算失败');
|
||||
})
|
||||
.finally(function () {
|
||||
btn.disabled = false;
|
||||
btn.textContent = '重新计算';
|
||||
});
|
||||
});
|
||||
}
|
||||
loadStats();
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user