d-points: tabla de niveles especifica también el importe en euros

La tabla de niveles mostraba solo PD ("Hasta 100 PD"); ahora añade el equivalente
en la moneda (100 PD = 1 €): "Hasta 100 PD (1 €)" / "Up to 100 PD (1 €)". Se
sustituyen los 14 mensajes range1..14 por 3 plantillas parametrizadas
(rangeFrom/rangeUpTo/rangeOver) con {pd}/{price}/{sym}; RANK_ROWS lleva el umbral
en PD y el tipo. Adaptado a la moneda (DP_CURRENCY).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 20:34:45 +00:00
parent 8a5ce82afa
commit f37bf71dc0
3 changed files with 28 additions and 47 deletions
+20 -17
View File
@@ -9,21 +9,22 @@ const RANKS = '/nw-themes/nw-ryu/nw-images/nw-ranks'
type TabId = 'Info' | 'Stripe' | 'SumUp'
const RANK_ROWS: [string, number, string][] = [
['1_Newbie', 1, 'range1'],
['2_Rookie', 2, 'range2'],
['3_Apprentice', 3, 'range3'],
['4_Explorer', 4, 'range4'],
['5_Contributor', 5, 'range5'],
['6_Enthusiast', 6, 'range6'],
['7_Collaborator', 7, 'range7'],
['8_Regular', 8, 'range8'],
['9_RisingStar', 9, 'range9'],
['10_Proficient', 10, 'range10'],
['11_Experienced', 11, 'range11'],
['12_Mentor', 12, 'range12'],
['13_Veteran', 13, 'range13'],
['14_GrandMaster', 14, 'range14'],
// [archivo, nivel, umbral en PD, tipo de rango]. El euro = PD / 100 (1 unidad = 100 PD).
const RANK_ROWS: [string, number, number, 'from' | 'upto' | 'over'][] = [
['1_Newbie', 1, 0, 'from'],
['2_Rookie', 2, 100, 'upto'],
['3_Apprentice', 3, 200, 'upto'],
['4_Explorer', 4, 300, 'upto'],
['5_Contributor', 5, 400, 'upto'],
['6_Enthusiast', 6, 500, 'upto'],
['7_Collaborator', 7, 600, 'upto'],
['8_Regular', 8, 700, 'upto'],
['9_RisingStar', 9, 800, 'upto'],
['10_Proficient', 10, 900, 'upto'],
['11_Experienced', 11, 1000, 'upto'],
['12_Mentor', 12, 5000, 'upto'],
['13_Veteran', 13, 10000, 'upto'],
['14_GrandMaster', 14, 10000, 'over'],
]
export function DPointsTabs({ realm, currency }: { realm: string; currency: string }) {
@@ -75,11 +76,13 @@ export function DPointsTabs({ realm, currency }: { realm: string; currency: stri
<div className="rank-div" id="rank-div" style={{ display: 'block' }}>
<table className="rank-table">
<tbody>
{RANK_ROWS.map(([file, level, rangeKey]) => (
{RANK_ROWS.map(([file, level, pd, type]) => (
<tr key={file}>
<td><img src={`${RANKS}/${file}.svg`} alt={t('tabs.level', { n: level })} title={t('tabs.level', { n: level })} width="24px" /></td>
<td>{t('tabs.level', { n: level })}</td>
<td className="second-brown">{t(`tabs.${rangeKey}`)}</td>
<td className="second-brown">
{t(`tabs.range${type === 'from' ? 'From' : type === 'over' ? 'Over' : 'UpTo'}`, { pd: String(pd), price: String(pd / 100), sym })}
</td>
</tr>
))}
</tbody>