Group Sokko TCG's interface files by Guild quest and card rendering

The 48 files of the Daily Card, Expeditions, Daily Team and race, Broken
Mirror and card rendering move to daily/, expeditions/, team/, mirror/ and
rendering/ under website/src/features/cards, with every relative import
rewritten. The root keeps the page, server calls, cache and the player
sections outside the Guild. The cards README, the quest recipe and the
current docs follow the new paths; dated audits and plans keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-12-01 11:35:18 +01:00
parent 863050437f
commit 88c7bf8317
74 changed files with 165 additions and 161 deletions

View file

@ -1,51 +0,0 @@
/**
* @file Accueil de l'Équipe du jour quand le joueur n'a pas d'équipe (ou qu'elle s'est reposée) : un appel à
* recruter, cinq places à pourvoir, puis les trois étapes (recruter, améliorer, partir en quête),
* chacune avec un visuel. L'équipe n'est liée à aucun jeu.
*/
import { CurrencyIcon } from "./Currency.jsx";
import { fillTemplate } from "./dailyShare.js";
const TABLE_ART = "/static/img/cards/guild/tavern.webp";
// Trois personnages du catalogue, pris loin les uns des autres, pour montrer une proposition de recrutement.
function sampleCards(catalog) {
const cards = catalog.cards.filter((card) => card.image && card.expedition?.profile);
const pool = cards.length >= 3 ? cards : catalog.cards.filter((card) => card.image);
return pool.length ? [0, Math.floor(pool.length / 2), pool.length - 1].map((index) => pool[index]) : [];
}
const STEP_VISUALS = {
recruit: ({ catalog }) => <span className="nebula-team-welcome-fan">{sampleCards(catalog).map((card) => <img key={card.id} src={card.image} alt="" loading="lazy" />)}</span>,
improve: () => <span className="nebula-team-welcome-stars">
<i data-kind="gold">★</i><i data-kind="gold">★</i><i data-kind="hidden">?</i><i data-kind="black">✖</i><i data-kind="dust"><CurrencyIcon kind="stardust" /></i>
</span>,
quest: ({ maxDays }) => <span className="nebula-team-welcome-days">{Array.from({ length: maxDays }, (_, index) => <i key={index}>{index + 1}</i>)}</span>
};
export function TeamWelcome({ catalog, team, content, action }) {
const expired = team.status === "expired";
return <>
<section className="nds-panel nebula-team-welcome" aria-labelledby="nebula-team-none-title">
<img className="nebula-team-welcome-bg" src={TABLE_ART} alt="" />
<div className="nebula-team-welcome-copy">
<h3 id="nebula-team-none-title">{expired ? content.expiredTitle : content.noneTitle}</h3>
<p>{fillTemplate(expired ? content.expiredText : content.noneText, { max: team.maxDays })}</p>
<ol className="nebula-team-welcome-slots" aria-hidden="true">{Array.from({ length: 5 }, (_, index) => <li key={index}>{index + 1}</li>)}</ol>
{action}
</div>
</section>
<ol className="nebula-team-welcome-steps" aria-label={content.welcomeStepsLabel}>{content.welcomeSteps.map((step, index) => {
const Visual = STEP_VISUALS[step.id];
return <li key={step.id} className="nds-card">
<div className="nebula-team-welcome-visual" aria-hidden="true"><span className="nebula-team-welcome-number">{index + 1}</span>{Visual && <Visual catalog={catalog} maxDays={team.maxDays} />}</div>
<div className="nds-card-body">
<h4>{step.title}</h4>
<p>{fillTemplate(step.text, { max: team.maxDays })}</p>
{step.tip && <p className="nebula-team-welcome-tip">{step.tip}</p>}
</div>
</li>;
})}</ol>
</>;
}