fix: polish landing qa details
This commit is contained in:
@@ -596,7 +596,7 @@ h2 {
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
transform 160ms ease,
|
||||
border-color 160ms ease,
|
||||
|
||||
@@ -157,12 +157,15 @@ function setServersDataState(badgeNode, state) {
|
||||
return;
|
||||
}
|
||||
|
||||
const hasTimestamp = typeof state.timestampLabel === "string" && state.timestampLabel;
|
||||
badgeNode.textContent = hasTimestamp
|
||||
? `Actualizado ${state.timestampLabel}`
|
||||
const hasLabel = typeof state.label === "string" && state.label;
|
||||
badgeNode.textContent = hasLabel
|
||||
? state.label
|
||||
: "Actualizado no disponible";
|
||||
badgeNode.classList.toggle("status-chip--ok", Boolean(hasTimestamp));
|
||||
badgeNode.classList.toggle("status-chip--fallback", !hasTimestamp);
|
||||
badgeNode.classList.toggle("status-chip--ok", Boolean(hasLabel && state.isFresh));
|
||||
badgeNode.classList.toggle(
|
||||
"status-chip--fallback",
|
||||
!hasLabel || !state.isFresh,
|
||||
);
|
||||
}
|
||||
|
||||
function renderServerStatsCard(server) {
|
||||
@@ -201,11 +204,7 @@ function renderServerStatsCard(server) {
|
||||
}
|
||||
|
||||
function renderServerSections(latestItems) {
|
||||
return `
|
||||
<div class="servers-grid servers-grid--section">
|
||||
${latestItems.map((server) => renderServerStatsCard(server)).join("")}
|
||||
</div>
|
||||
`;
|
||||
return latestItems.map((server) => renderServerStatsCard(server)).join("");
|
||||
}
|
||||
|
||||
function renderServerAction(server) {
|
||||
@@ -271,10 +270,22 @@ function isRealA2SSnapshot(item) {
|
||||
}
|
||||
|
||||
function deriveSnapshotState(serversData) {
|
||||
const timestampLabel = serversData?.last_snapshot_at
|
||||
? formatTimestamp(serversData.last_snapshot_at)
|
||||
: "";
|
||||
if (!timestampLabel) {
|
||||
return {
|
||||
label: "",
|
||||
isFresh: false,
|
||||
};
|
||||
}
|
||||
|
||||
const isFresh = serversData?.is_stale !== true;
|
||||
return {
|
||||
timestampLabel: serversData?.last_snapshot_at
|
||||
? formatTimestamp(serversData.last_snapshot_at)
|
||||
: "",
|
||||
label: isFresh
|
||||
? `Actualizado ${timestampLabel}`
|
||||
: `Ultimo snapshot ${timestampLabel}`,
|
||||
isFresh,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</head>
|
||||
<body
|
||||
data-backend-base-url="http://127.0.0.1:8000"
|
||||
data-server-refresh-ms="60000"
|
||||
data-server-refresh-ms="120000"
|
||||
>
|
||||
<div class="page-shell">
|
||||
<header class="hero">
|
||||
@@ -35,7 +35,7 @@
|
||||
<span class="hero__title-accent">HLL Vietnam</span>
|
||||
</h1>
|
||||
<p class="hero__text">
|
||||
Centro de reunión para escuadras, eventos y acceso directo al
|
||||
Centro de reunion para escuadras, eventos y acceso directo al
|
||||
Discord oficial de la comunidad.
|
||||
</p>
|
||||
<div class="hero__actions">
|
||||
@@ -85,6 +85,9 @@
|
||||
Actualizado no disponible
|
||||
</p>
|
||||
</div>
|
||||
<p class="panel__intro panel__intro--tight">
|
||||
El panel muestra el ultimo snapshot disponible consultado desde backend.
|
||||
</p>
|
||||
<div class="servers-grid" id="servers-list">
|
||||
<article class="server-card server-card--stats server-card--real">
|
||||
<div class="server-card__top server-card__top--stats">
|
||||
|
||||
Reference in New Issue
Block a user