Página de votación de usuario (/vote-points) + enlace en cabecera

- lib/vote.ts: getVoteSites (home_votesite), registerVote (cooldown 12h30 vía
  home_votelog, acredita PV en home_api_points, registra el voto).
- Route /api/vote (POST {url}, guard sesión). Página /vote-points (VotePanel:
  abre el sitio + registra el voto, muestra PV/cooldown). Enlace "Votar" en cabecera.
- Cierra el ciclo con el admin de sitios de voto.

Verificado: /vote-points 200, POST 401 sin sesión; lógica probada: voto -> +PV,
segundo voto -> cooldown 12h29m.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 00:06:57 +00:00
parent 934bee2aec
commit f9609aad99
7 changed files with 211 additions and 2 deletions
+15 -1
View File
@@ -10,7 +10,8 @@
"account": "My account",
"logout": "Log out",
"language": "Language",
"forum": "Forums"
"forum": "Forums",
"vote": "Vote"
},
"Home": {
"brand": "Nova WoW",
@@ -300,5 +301,18 @@
"voteImage": "Image URL",
"votePoints": "VP per vote",
"noVotes": "No vote sites."
},
"Vote": {
"title": "Vote for us",
"info": "Vote for {server} on the sites below and earn VP. You can vote on each site every 12 hours.",
"vote": "Vote",
"voting": "Voting…",
"pv": "VP",
"success": "Thanks for voting on {site}! {points} VP credited.",
"cooldown": "You must wait {hours}h {minutes}m to vote again on this site.",
"siteNotFound": "Vote site not found.",
"genericError": "Something went wrong. Please try again later.",
"noSites": "No vote sites configured yet.",
"loginToVote": "Sign in to vote."
}
}