Rework the daily team screens, share its team block and give the race its admin tab
The daily team page now opens on a welcome screen with the three steps, and the recruitment keeps the same look: golden steps, the choice in a golden panel with the hidden stars, a team summary of colored mini cards and its strengths, and a reroll badge. One "Your team" block is shared by the Guild, the recruitment and the ready team. The header shows the extra golden stars and the balms; the tips button is gone. On the Guild, team quests carry a "En groupe" sign until the team is ready and the streak badge stays readable. The race gets its own admin tab: its own opening, the day's circuit and results, rewards by place and the watchers' skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
327337075b
commit
52b35880f2
23 changed files with 570 additions and 253 deletions
39
website/src/features/cards/TeamTable.jsx
Normal file
39
website/src/features/cards/TeamTable.jsx
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// Rôle : bloc « Votre équipe », le même sur la Guilde et sur la page Équipe du jour : la table de l'équipe en fond, ses compagnons
|
||||
// (ou leurs places à pourvoir, numérotées en pointillés), puis ses points forts. L'équipe n'y est liée à aucun jeu.
|
||||
import { STAT_IDS } from "./expeditionFormat.js";
|
||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||
import { TeamCompanion } from "./TeamCompanion.jsx";
|
||||
import { fateOf, teamBest } from "./teamFormat.js";
|
||||
|
||||
const TABLE_ART = "/static/img/cards/guild/tavern.webp";
|
||||
|
||||
// Meilleure valeur de l'équipe dans chaque stat.
|
||||
export function TeamBest({ companions, content, statLabels }) {
|
||||
const best = teamBest(companions);
|
||||
return <dl className="nebula-team-best" aria-label={content.bestTitle}>{STAT_IDS.map((stat) => <div key={stat} style={{ "--specialty": `var(--color-stat-${stat})` }}>
|
||||
<dt><MaskIcon name={stat} />{statLabels[stat]}</dt><dd>{best[stat]}</dd>
|
||||
</div>)}</dl>;
|
||||
}
|
||||
|
||||
// `status` : phrase à côté du titre ; `action` : bouton de l'en-tête ; `powers` : paliers d'un recrutement, pour dire ce que chaque
|
||||
// compagnon y est devenu ; `size` : « sm » (Guilde, recrutement) ou « md » (équipe prête) ; `currentLabel` : la première place libre
|
||||
// est celle du compagnon en cours de recrutement.
|
||||
export function TeamTable({ catalog, companions, slots = 5, content, statLabels, title, titleId, titleRef = null, status = null, action = null, powers = null, size = "sm", showBest = true, seatLabel, currentLabel = "" }) {
|
||||
return <section className="nds-panel nebula-team-table" data-size={size} aria-labelledby={titleId}>
|
||||
<img className="nebula-team-table-bg" src={TABLE_ART} alt="" />
|
||||
<div className="nebula-team-table-head">
|
||||
<h3 id={titleId} ref={titleRef} tabIndex={titleRef ? -1 : undefined}>{title}</h3>
|
||||
{status && <p>{status}</p>}
|
||||
{action}
|
||||
</div>
|
||||
<ol className="nebula-team-table-list">{Array.from({ length: Math.max(slots, companions.length) }, (_, index) => {
|
||||
const companion = companions[index];
|
||||
const current = currentLabel && index === companions.length;
|
||||
if (!companion) return <li key={`slot-${index}`}><span className="nebula-team-table-slot" data-current={current || undefined}><strong>{index + 1}</strong>{current ? currentLabel : seatLabel}</span></li>;
|
||||
const fate = powers && fateOf(companion, powers, content);
|
||||
return <li key={companion.cardId}><TeamCompanion catalog={catalog} companion={companion} content={content} statLabels={statLabels} size={size}
|
||||
footer={fate && <span className="nebula-team-fate" data-fate={fate.kind}>{fate.text}</span>} /></li>;
|
||||
})}</ol>
|
||||
{showBest && companions.length > 0 && <div className="nebula-team-table-best"><span>{content.bestLabel}</span><TeamBest companions={companions} content={content} statLabels={statLabels} /></div>}
|
||||
</section>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue