web-next: estado del reino como Online/Offline (puerto 8085) en vez del conteo

En el recuadro de estado de la home, la fila del reino mostraba el conteo de
personajes online (0). Ahora muestra Online/Offline según un TCP check al
worldserver (puerto 8085), con color verde/rojo como la fila Login.
lib/home.ts añade world_status (checkServerStatus address:8085).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 11:16:39 +00:00
parent d6acba4ad5
commit a93527cef7
2 changed files with 13 additions and 3 deletions
+3 -2
View File
@@ -33,7 +33,8 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
setRequestLocale(locale)
const { noticias, status } = await getData()
const online = status ? status.online_characters : 0
const worldStatus = status ? status.world_status : 'Offline'
const worldClass = worldStatus === 'Online' ? 'green-info' : 'red-info'
const loginStatus = status ? status.status : 'Offline'
const loginClass = loginStatus === 'Online' ? 'green-info' : 'red-info'
@@ -56,7 +57,7 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
{status?.server_name ?? '—'}{' '}
<span className="blue-info small-font">{status?.expansion ?? ''}</span>
</td>
<td className="real-info-box green-info">{online}</td>
<td className={`real-info-box ${worldClass}`}>{worldStatus}</td>
</tr>
<tr>
<td>Login</td>