Spaces:
Running
Running
Commit ·
b4bbe97
1
Parent(s): b7a336f
Improve radar visibility and cache refresh
Browse files- app/static/app.js +2 -1
- app/templates/index.html +2 -2
app/static/app.js
CHANGED
|
@@ -393,6 +393,7 @@ function renderHealth(state) {
|
|
| 393 |
function renderState(payload) {
|
| 394 |
const state = payload && typeof payload === "object" ? payload : {};
|
| 395 |
const picks = Array.isArray(state.picks) ? state.picks : [];
|
|
|
|
| 396 |
|
| 397 |
setStatus(state.status || "waiting");
|
| 398 |
$("s-events").textContent = integer(state.summary?.events);
|
|
@@ -404,7 +405,7 @@ function renderState(payload) {
|
|
| 404 |
|
| 405 |
$("picks").innerHTML = picks.length
|
| 406 |
? picks.map(pickCard).join("")
|
| 407 |
-
: `<div class="panel empty"><div class="empty-content"><span class="empty-icon">✓</span><strong>Nenhuma aposta SAFE foi liberada</strong><small>O Risk Gate não força entradas. Os times monitorados ficam no Radar, sem recomendação de aposta.</small><a class="empty-radar-link" href="#radar">Ver times no Radar <span aria-hidden="true">↓</span></a></div></div>`;
|
| 408 |
$("picks").setAttribute("aria-busy", "false");
|
| 409 |
renderRadar(state);
|
| 410 |
|
|
|
|
| 393 |
function renderState(payload) {
|
| 394 |
const state = payload && typeof payload === "object" ? payload : {};
|
| 395 |
const picks = Array.isArray(state.picks) ? state.picks : [];
|
| 396 |
+
const radarCount = Array.isArray(state.radar) ? state.radar.length : Array.isArray(state.radar?.items) ? state.radar.items.length : 0;
|
| 397 |
|
| 398 |
setStatus(state.status || "waiting");
|
| 399 |
$("s-events").textContent = integer(state.summary?.events);
|
|
|
|
| 405 |
|
| 406 |
$("picks").innerHTML = picks.length
|
| 407 |
? picks.map(pickCard).join("")
|
| 408 |
+
: `<div class="panel empty"><div class="empty-content"><span class="empty-icon">✓</span><strong>Nenhuma aposta SAFE foi liberada</strong><small>O Risk Gate não força entradas. ${radarCount ? `${radarCount} jogo${radarCount === 1 ? '' : 's'} está${radarCount === 1 ? '' : 'ão'} em observação no Radar.` : 'Os times monitorados ficam no Radar, sem recomendação de aposta.'}</small><a class="empty-radar-link" href="#radar">Ver times no Radar <span aria-hidden="true">↓</span></a></div></div>`;
|
| 409 |
$("picks").setAttribute("aria-busy", "false");
|
| 410 |
renderRadar(state);
|
| 411 |
|
app/templates/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
<meta name="theme-color" content="#07100d">
|
| 7 |
<meta name="description" content="Safe Bet AI: inteligência estatística e gestão de risco para futebol.">
|
| 8 |
<title>Safe Bet AI — Painel de precisão</title>
|
| 9 |
-
<link rel="stylesheet" href="/static/style.css?v=
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<a class="skip-link" href="#main-content">Ir para o conteúdo</a>
|
|
@@ -225,6 +225,6 @@
|
|
| 225 |
</main>
|
| 226 |
|
| 227 |
<div id="toast" class="toast" role="status" aria-live="polite" aria-atomic="true"></div>
|
| 228 |
-
<script src="/static/app.js?v=
|
| 229 |
</body>
|
| 230 |
</html>
|
|
|
|
| 6 |
<meta name="theme-color" content="#07100d">
|
| 7 |
<meta name="description" content="Safe Bet AI: inteligência estatística e gestão de risco para futebol.">
|
| 8 |
<title>Safe Bet AI — Painel de precisão</title>
|
| 9 |
+
<link rel="stylesheet" href="/static/style.css?v=b7a336f">
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<a class="skip-link" href="#main-content">Ir para o conteúdo</a>
|
|
|
|
| 225 |
</main>
|
| 226 |
|
| 227 |
<div id="toast" class="toast" role="status" aria-live="polite" aria-atomic="true"></div>
|
| 228 |
+
<script src="/static/app.js?v=b7a336f"></script>
|
| 229 |
</body>
|
| 230 |
</html>
|