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
|
|
@ -406,6 +406,7 @@
|
|||
"teamRecruit": "Recruter",
|
||||
"teamResume": "Reprendre",
|
||||
"raceKind": "Avec votre équipe",
|
||||
"groupSign": "En groupe",
|
||||
"raceTitle": "Course des courants",
|
||||
"raceDescription": "Choisissez un coureur : ses quatre équipiers lui donnent des élans.",
|
||||
"raceToRun": "La course du jour vous attend.",
|
||||
|
|
@ -433,24 +434,18 @@
|
|||
"dailyChoose": "Choisir ma récompense",
|
||||
"dailyDone": "Quêtes du jour",
|
||||
"dailyCount": "{done} sur {total}",
|
||||
"goldStars": "Étoiles dorées en réserve",
|
||||
"goldStarsLabel": "{count} sur {max}",
|
||||
"balms": "Baumes",
|
||||
"teamTitle": "Votre équipe",
|
||||
"teamReady": "Elle vous accompagne : jour {day} sur {max}",
|
||||
"teamRecruiting": "Votre recrutement n’est pas terminé.",
|
||||
"teamEmpty": "Personne pour l’instant : recrutez cinq compagnons.",
|
||||
"teamSeat": "À recruter",
|
||||
"teamOpen": "Voir l’équipe",
|
||||
"teamStar": "Votre étoile dorée en réserve sera utilisée.",
|
||||
"teamStars": "Vos {count} étoiles dorées en réserve seront utilisées.",
|
||||
"boardTitle": "Tableau des quêtes",
|
||||
"missionsTitle": "Grandes missions",
|
||||
"greetings": {
|
||||
"dailyFirst": { "title": "Bienvenue à la Guilde !", "text": "Commencez par la Carte du jour : elle peut vous rapporter une étoile dorée, avant de former votre équipe." },
|
||||
"daily": { "title": "Bienvenue à la Guilde !", "text": "Une nouvelle Carte du jour est affichée au tableau." },
|
||||
"reward": { "title": "Bravo pour la Carte du jour !", "text": "Il vous reste à choisir votre récompense." },
|
||||
"recruit": { "title": "Vous n’avez pas encore d’équipe.", "text": "Recrutez-en une : la Course des courants en a besoin." },
|
||||
"recruit": { "title": "Vous n’avez pas encore d’équipe.", "text": "Recrutez-en une : les quêtes en groupe en ont besoin." },
|
||||
"recruiting": { "title": "Votre recrutement vous attend.", "text": "Terminez-le pour prendre part aux quêtes d’équipe." },
|
||||
"race": { "title": "Votre équipe est prête.", "text": "La Course des courants vous attend au tableau." },
|
||||
"loot": { "title": "Une expédition est de retour !", "text": "Son butin vous attend dans les grandes missions." },
|
||||
|
|
@ -800,6 +795,7 @@
|
|||
"noReward": "Pas de récompense cette fois.",
|
||||
"next": "Prochaine course dans {time}",
|
||||
"needTeam": "Il faut une équipe pour courir.",
|
||||
"closed": "La Course des courants est fermée pour le moment.",
|
||||
"recruitFirst": "Recruter une équipe"
|
||||
},
|
||||
"team": {
|
||||
|
|
@ -808,16 +804,19 @@
|
|||
"back": "Retour à la Guilde",
|
||||
"retry": "Réessayer",
|
||||
"closed": "L’Équipe du jour est fermée pour le moment.",
|
||||
"reserve": "Étoiles dorées",
|
||||
"reserveLabel": "Étoiles dorées en réserve : {count} sur {max}",
|
||||
"reserve": "Étoiles dorées supplémentaires",
|
||||
"reserveLabel": "Étoiles dorées supplémentaires : {count} sur {max}",
|
||||
"balms": "Baumes",
|
||||
"balmsLabel": "Baumes disponibles : {count}",
|
||||
"balmsHelp": "Un Baume soigne un compagnon affaibli par une étoile noire. Ils se trouvent en expédition.",
|
||||
"power": "Puissance {power}",
|
||||
"balanced": "Équilibré",
|
||||
"lent": "Prêté",
|
||||
"unknownCard": "Personnage inconnu",
|
||||
"missing": "Manque à votre équipe",
|
||||
"stepCount": "Compagnon {count} sur {max}",
|
||||
"stepRecruit": "1. Recruter",
|
||||
"stepImprove": "2. Améliorer",
|
||||
"stepRecruit": "Recruter",
|
||||
"stepImprove": "Améliorer",
|
||||
"offerTitle": "Choisissez un compagnon à recruter",
|
||||
"offerText": "Il arrive avec {power} de Puissance. Vous pourrez ensuite tenter de l’améliorer.",
|
||||
"reserveUsed": {
|
||||
|
|
@ -861,7 +860,11 @@
|
|||
"many": "Amélioré {count} fois"
|
||||
},
|
||||
"yourTeam": "Votre équipe",
|
||||
"emptySlot": "Compagnon {number}",
|
||||
"seat": "À recruter",
|
||||
"stageBestTitle": "Votre équipe en bref",
|
||||
"stageBestEmpty": "Pas encore de compagnon : toutes les stats sont à couvrir.",
|
||||
"seatCurrent": "En cours",
|
||||
"bestLabel": "Points forts :",
|
||||
"recruitedTitle": "Compagnons recrutés",
|
||||
"bestTitle": "Meilleure valeur de chaque stat",
|
||||
"reroll": "Proposer trois autres personnages",
|
||||
|
|
@ -870,21 +873,6 @@
|
|||
"many": "Encore {count} fois pour ce recrutement."
|
||||
},
|
||||
"rerollsNone": "Vous avez utilisé toutes vos nouvelles propositions.",
|
||||
"guideTitle": "Comment recruter une bonne équipe ?",
|
||||
"guideHowTitle": "Comment faire",
|
||||
"guideHow": [
|
||||
"Choisissez un compagnon parmi les trois proposés. Les personnages de votre album viennent en premier.",
|
||||
"Révélez des étoiles : une dorée l’améliore, une noire l’affaiblit et met fin à ses améliorations. Vous pouvez vous arrêter quand vous voulez.",
|
||||
"Recommencez jusqu’à cinq compagnons. Votre équipe sert ensuite dans les mini-jeux, pendant {max} jours au plus."
|
||||
],
|
||||
"guideTipsTitle": "Nos conseils",
|
||||
"guideTips": [
|
||||
"Couvrez les quatre stats : les mini-jeux en demandent plusieurs, et elles changent chaque jour.",
|
||||
"Regardez d’abord le grand nombre : un compagnon très fort dans une stat sert souvent plus qu’un compagnon moyen partout.",
|
||||
"Comptez les étoiles noires : moins il en reste, plus vous pouvez tenter. Celles déjà révélées ne reviennent pas.",
|
||||
"Un Baume des Veilleurs, rapporté d’Expédition, remonte aussitôt un compagnon affaibli à sa Puissance de départ.",
|
||||
"La rareté ne compte pas : à Puissance égale, toutes les cartes ont le même total de stats."
|
||||
],
|
||||
"readyTitle": "Votre équipe est prête",
|
||||
"readyText": "Puissance moyenne : {power}.",
|
||||
"readyDust": "Vous avez trouvé {count} de poussière d’étoiles.",
|
||||
|
|
@ -899,6 +887,12 @@
|
|||
"expiredTitle": "Votre équipe se repose",
|
||||
"expiredText": "Elle a servi {max} jours : il faut en recruter une nouvelle.",
|
||||
"recruitStart": "Recruter une équipe",
|
||||
"welcomeStepsLabel": "Comment ça marche",
|
||||
"welcomeSteps": [
|
||||
{ "id": "recruit", "title": "Recruter", "text": "Choisissez un compagnon parmi trois, chacun avec un profil différent. Les personnages de votre album passent en premier." },
|
||||
{ "id": "improve", "title": "Améliorer", "text": "Révélez les étoiles de votre choix : une dorée augmente sa Puissance, une noire l’affaiblit et arrête ses améliorations, une poussière vous en rapporte. Arrêtez-vous quand vous voulez.", "tip": "La Carte du jour peut vous rapporter une étoile dorée de plus pour votre prochain recrutement." },
|
||||
{ "id": "quest", "title": "Partir en quête", "text": "Votre équipe vous accompagne {max} jours dans les quêtes en groupe de la Guilde. Chaque jour, vous pouvez la garder ou en recruter une nouvelle." }
|
||||
],
|
||||
"recruitAnother": "Recruter une autre équipe",
|
||||
"reserveWillBeUsed": {
|
||||
"one": "Votre étoile dorée en réserve sera utilisée.",
|
||||
|
|
@ -915,8 +909,6 @@
|
|||
"starGold": "améliorent",
|
||||
"starBlack": "font tomber à {power}",
|
||||
"starDust": "+{value} de poussière chacune",
|
||||
"guideAction": "Conseils",
|
||||
"guideClose": "Fermer",
|
||||
"devReset": "Remettre à zéro (dev)"
|
||||
},
|
||||
"daily": {
|
||||
|
|
|
|||
|
|
@ -2,25 +2,28 @@
|
|||
// missions (les Expéditions, mises en avant), l'équipe du joueur, puis le tableau des quêtes du jour. Chaque quête a sa tuile, avec son état.
|
||||
import { useEffect, useState } from "react";
|
||||
import { dailyQuestStatus, fillTemplate, formatStreak } from "./dailyShare.js";
|
||||
import { expeditionQuestStatus, ITEM_ART } from "./expeditionFormat.js";
|
||||
import { expeditionQuestStatus } from "./expeditionFormat.js";
|
||||
import { guildGreeting, guildQuests, questDone } from "./guildQuests.js";
|
||||
import { TeamCompanion } from "./TeamCompanion.jsx";
|
||||
import { TeamTable } from "./TeamTable.jsx";
|
||||
|
||||
const ART = {
|
||||
hall: "/static/img/cards/guild/hall.webp",
|
||||
table: "/static/img/cards/guild/tavern.webp",
|
||||
clerk: "/static/img/cards/guild-veilleurs.webp",
|
||||
daily: "/static/img/cards/guild/quest-daily.webp",
|
||||
race: "/static/img/cards/guild/quest-race.webp",
|
||||
expeditions: "/static/img/cards/guild/quest-expeditions.webp"
|
||||
};
|
||||
|
||||
// Tuile d'une quête : son illustration, son type, son état et le bouton qui y mène. `badge` se pose sur l'illustration.
|
||||
function QuestTile({ id, art, kind, title, description, status, action, href, primary, badge = null, locked = false, done = false }) {
|
||||
// Tuile d'une quête : son illustration, son type, son état et le bouton qui y mène. `badge` se pose sur l'illustration ; `sign`, une
|
||||
// pancarte de bois penchée, signale une quête qui demande une équipe tant que le joueur n'en a pas.
|
||||
function QuestTile({ id, art, kind, title, description, status, action, href, primary, badge = null, sign = "", locked = false, done = false }) {
|
||||
return <article className="nds-card nebula-quest" data-quest={id} data-done={done || undefined} data-locked={locked || undefined} aria-labelledby={`nebula-quest-${id}-title`}>
|
||||
<div className="nebula-quest-media">
|
||||
{/* L'illustration mène aussi à la quête, comme les couvertures des Toolboxes ; le bouton reste le lien annoncé. */}
|
||||
<a className="nds-card-cover nebula-quest-cover" href={href} tabIndex={-1} aria-hidden="true"><img src={art} alt="" loading="lazy" /></a>
|
||||
{/* L'illustration mène aussi à la quête, comme les couvertures des Toolboxes ; le bouton reste le lien annoncé. Celle qui porte
|
||||
la pancarte (quête en équipe, sans équipe prête) ne l'est pas. */}
|
||||
{sign ? <div className="nds-card-cover nebula-quest-cover" aria-hidden="true"><img src={art} alt="" loading="lazy" /></div>
|
||||
: <a className="nds-card-cover nebula-quest-cover" href={href} tabIndex={-1} aria-hidden="true"><img src={art} alt="" loading="lazy" /></a>}
|
||||
{sign && <span className="nebula-quest-sign">{sign}</span>}
|
||||
{badge}
|
||||
</div>
|
||||
<div className="nds-card-body nebula-quest-body">
|
||||
|
|
@ -46,7 +49,7 @@ function RaceQuest({ summary: team, pending, content }) {
|
|||
const status = locked ? content.raceLocked : { running: content.raceRunning, finished: content.raceFinished }[team.race] || content.raceToRun;
|
||||
return <QuestTile id="race" art={ART.race} kind={content.raceKind} title={content.raceTitle} description={content.raceDescription} status={status}
|
||||
action={locked ? content.raceToTeam : team.race === "finished" ? content.raceResult : content.raceAction} href={locked ? "#/cards/team" : "#/cards/race"}
|
||||
primary={pending && !locked} locked={locked} done={team.race === "finished"} />;
|
||||
primary={pending && !locked} locked={locked} done={team.race === "finished"} sign={locked ? content.groupSign : ""} />;
|
||||
}
|
||||
|
||||
function ExpeditionsQuest({ summary, pending, content, now }) {
|
||||
|
|
@ -80,30 +83,15 @@ function GuildCounter({ state, quests, content, now }) {
|
|||
</header>;
|
||||
}
|
||||
|
||||
// Votre équipe : les cinq compagnons (ou leurs places à pourvoir), et à côté ce qui sert à la former ou la soigner.
|
||||
function GuildTeam({ catalog, state, team, content, teamContent, statLabels }) {
|
||||
// Votre équipe : le même bloc que sur la page Équipe du jour, avec le bouton qui y mène.
|
||||
function GuildTeam({ catalog, team, content, teamContent, statLabels }) {
|
||||
const ready = team.status === "ready";
|
||||
const recruiting = team.status === "recruiting";
|
||||
const text = ready ? fillTemplate(content.teamReady, { day: team.teamDay, max: team.maxDays }) : recruiting ? content.teamRecruiting : content.teamEmpty;
|
||||
const slots = Array.from({ length: 5 }, (_, index) => team.companions[index] || null);
|
||||
return <section className="nds-panel nebula-guild-team" aria-labelledby="nebula-guild-team-title">
|
||||
<img className="nebula-guild-team-bg" src={ART.table} alt="" />
|
||||
<div className="nebula-guild-team-head">
|
||||
<h3 id="nebula-guild-team-title">{content.teamTitle}</h3>
|
||||
<p>{text}{ready && <span className="nebula-guild-days" aria-hidden="true">{Array.from({ length: team.maxDays }, (_, index) => <i key={index} data-on={index < team.teamDay || undefined} />)}</span>}</p>
|
||||
</div>
|
||||
<ol className="nebula-guild-team-list">{slots.map((companion, index) => <li key={companion?.cardId ?? `slot-${index}`}>
|
||||
{companion ? <TeamCompanion catalog={catalog} companion={companion} content={teamContent} statLabels={statLabels} size="sm" /> : <span className="nebula-guild-team-slot">{content.teamSeat}</span>}
|
||||
</li>)}</ol>
|
||||
<aside className="nebula-guild-team-side">
|
||||
<dl>
|
||||
<div><dt>{content.goldStars}</dt><dd className="nebula-guild-stars" aria-label={fillTemplate(content.goldStarsLabel, { count: team.goldStars, max: team.maxGoldStars })}>{"★".repeat(team.goldStars)}<i>{"★".repeat(team.maxGoldStars - team.goldStars)}</i></dd></div>
|
||||
<div><dt><img src={ITEM_ART.balm} alt="" />{content.balms}</dt><dd>{state.items?.balm ?? 0}</dd></div>
|
||||
</dl>
|
||||
{!ready && team.goldStars > 0 && <p>{fillTemplate(team.goldStars > 1 ? content.teamStars : content.teamStar, { count: team.goldStars })}</p>}
|
||||
<a className="nds-button" data-size="sm" data-variant={ready ? "secondary" : "primary"} href="#/cards/team">{ready ? content.teamOpen : recruiting ? content.teamResume : content.teamRecruit}</a>
|
||||
</aside>
|
||||
</section>;
|
||||
return <TeamTable catalog={catalog} companions={team.companions} content={teamContent} statLabels={statLabels} showBest={ready} seatLabel={teamContent.seat}
|
||||
title={content.teamTitle} titleId="nebula-guild-team-title"
|
||||
status={<>{text}{ready && <span className="nebula-team-days" aria-hidden="true">{Array.from({ length: team.maxDays }, (_, index) => <i key={index} data-on={index < team.teamDay || undefined} />)}</span>}</>}
|
||||
action={<a className="nds-button" data-size="sm" data-variant={ready ? "secondary" : "primary"} href="#/cards/team">{ready ? content.teamOpen : recruiting ? content.teamResume : content.teamRecruit}</a>} />;
|
||||
}
|
||||
|
||||
export function GuildPanel({ catalog, state, content, teamContent, statLabels }) {
|
||||
|
|
@ -119,7 +107,7 @@ export function GuildPanel({ catalog, state, content, teamContent, statLabels })
|
|||
const listed = guildQuests(state, now);
|
||||
const team = state.team;
|
||||
// La Course figure au tableau dès que l'Équipe du jour est ouverte, verrouillée tant qu'il n'y a pas d'équipe.
|
||||
const quests = team?.enabled && !listed.some((quest) => quest.id === "race") ? [...listed, { id: "race", pending: false, summary: team }] : listed;
|
||||
const quests = team?.raceEnabled && !listed.some((quest) => quest.id === "race") ? [...listed, { id: "race", pending: false, summary: team }] : listed;
|
||||
const tile = ({ id, summary, pending }) => {
|
||||
const Tile = QUEST_TILES[id];
|
||||
return Tile ? <Tile key={id} catalog={catalog} summary={summary} pending={pending} content={content} now={now} /> : null;
|
||||
|
|
@ -132,7 +120,7 @@ export function GuildPanel({ catalog, state, content, teamContent, statLabels })
|
|||
<h3 id="nebula-guild-missions-title">{content.missionsTitle}</h3>
|
||||
{missions.map(tile)}
|
||||
</section>}
|
||||
{team && (team.enabled || team.status === "recruiting") && <GuildTeam catalog={catalog} state={state} team={team} content={content} teamContent={teamContent} statLabels={statLabels} />}
|
||||
{team && (team.enabled || team.status === "recruiting") && <GuildTeam catalog={catalog} team={team} content={content} teamContent={teamContent} statLabels={statLabels} />}
|
||||
{board.length > 0 && <section className="nebula-guild-board" aria-labelledby="nebula-guild-board-title">
|
||||
<h3 id="nebula-guild-board-title">{content.boardTitle}</h3>
|
||||
<div className="nebula-guild-notices">{board.map(tile)}</div>
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ export function RacePanel({ catalog, runMutation, busy, content, teamContent, st
|
|||
|
||||
const { race } = team;
|
||||
const interrupted = !live && race?.status === "running";
|
||||
const choosing = !live && !race && team.status === "ready" && team.enabled;
|
||||
const choosing = !live && !race && team.status === "ready" && team.raceEnabled;
|
||||
return <section className="nebula-race" aria-labelledby="nebula-race-title">
|
||||
<div className="nds-section-heading nebula-section-heading">
|
||||
<div><p className="eyebrow">{content.eyebrow}</p><h2 id="nebula-race-title">{content.title}</h2></div>
|
||||
|
|
@ -112,7 +112,7 @@ export function RacePanel({ catalog, runMutation, busy, content, teamContent, st
|
|||
onBoost={(boosts) => { recordRaceBoosts(boosts).catch(() => {}); }} onFinish={finish} onOver={over} />}
|
||||
{interrupted && <div className="nds-panel nebula-race-interrupted"><h3>{content.interruptedTitle}</h3><p>{content.interruptedText}</p><button className="nds-button" data-variant="primary" type="button" disabled={busy} onClick={finishInterrupted}>{content.interruptedAction}</button></div>}
|
||||
{showResult && <RaceResult catalog={catalog} race={race} nextAt={team.nextAt} content={content} teamContent={teamContent} titleRef={titleRef} />}
|
||||
{!live && !race && !choosing && <div className="nds-empty-state"><p>{team.enabled ? content.needTeam : teamContent.closed}</p>{team.enabled && <a className="nds-button" data-variant="primary" href="#/cards/team">{content.recruitFirst}</a>}</div>}
|
||||
{!live && !race && !choosing && <div className="nds-empty-state"><p>{!team.enabled ? teamContent.closed : !team.raceEnabled ? content.closed : content.needTeam}</p>{team.raceEnabled && <a className="nds-button" data-variant="primary" href="#/cards/team">{content.recruitFirst}</a>}</div>}
|
||||
{choosing && <>
|
||||
<RaceCircuit zones={team.zones} content={content} statLabels={statLabels} />
|
||||
<section className="nebula-race-choice" aria-labelledby="nebula-race-choice-title">
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
// Rôle : fenêtre d'aide de l'Équipe du jour : comment recruter, et ce qui est conseillé.
|
||||
import { useState } from "react";
|
||||
import { Modal } from "../../components/Modal.jsx";
|
||||
import { fillTemplate } from "./dailyShare.js";
|
||||
|
||||
export function TeamGuide({ content, maxDays }) {
|
||||
const [open, setOpen] = useState(false);
|
||||
return <>
|
||||
<button className="nds-button" data-size="sm" data-variant="secondary" type="button" onClick={() => setOpen(true)}>{content.guideAction}</button>
|
||||
{open && <Modal dialogClassName="confirm-modal nds-modal nebula-team-guide" labelledBy="nebula-team-guide-title" onRequestClose={() => setOpen(false)}>
|
||||
<h2 id="nebula-team-guide-title">{content.guideTitle}</h2>
|
||||
<h3>{content.guideHowTitle}</h3>
|
||||
<ol>{content.guideHow.map((text) => <li key={text}>{fillTemplate(text, { max: maxDays })}</li>)}</ol>
|
||||
<h3>{content.guideTipsTitle}</h3>
|
||||
<ul>{content.guideTips.map((text) => <li key={text}>{text}</li>)}</ul>
|
||||
<div className="nds-toolbar"><button className="nds-button" data-variant="primary" type="button" onClick={() => setOpen(false)}>{content.guideClose}</button></div>
|
||||
</Modal>}
|
||||
</>;
|
||||
}
|
||||
|
|
@ -2,11 +2,12 @@
|
|||
import { useEffect, useRef, useState } from "react";
|
||||
import { chooseTeamCharacter, healTeamCompanion, keepTeamCompanion, loadTeam, recruitTeam, rerollTeamOffer, resetTeam, revealTeamStar } from "./cardsApi.js";
|
||||
import { fillTemplate } from "./dailyShare.js";
|
||||
import { TeamCompanion } from "./TeamCompanion.jsx";
|
||||
import { TeamGuide } from "./TeamGuide.jsx";
|
||||
import { TeamBest, TeamRecruitment } from "./TeamRecruitment.jsx";
|
||||
import { ITEM_ART } from "./expeditionFormat.js";
|
||||
import { TeamRecruitment } from "./TeamRecruitment.jsx";
|
||||
import { TeamSky } from "./TeamSky.jsx";
|
||||
import { averagePower, countText, fateOf } from "./teamFormat.js";
|
||||
import { TeamTable } from "./TeamTable.jsx";
|
||||
import { TeamWelcome } from "./TeamWelcome.jsx";
|
||||
import { averagePower, countText } from "./teamFormat.js";
|
||||
|
||||
function GoldReserve({ team, content }) {
|
||||
return <span className="nebula-team-reserve" role="img" aria-label={fillTemplate(content.reserveLabel, { count: team.goldStars, max: team.maxGoldStars })}>
|
||||
|
|
@ -15,6 +16,13 @@ function GoldReserve({ team, content }) {
|
|||
</span>;
|
||||
}
|
||||
|
||||
// Baumes disponibles, à côté des étoiles dorées : ils soignent un compagnon affaibli pendant le recrutement.
|
||||
function BalmCount({ team, content }) {
|
||||
return <span className="nebula-team-balms" role="img" aria-label={fillTemplate(content.balmsLabel, { count: team.balms ?? 0 })} title={content.balmsHelp}>
|
||||
<img src={ITEM_ART.balm} alt="" /><span>{content.balms}</span><strong>{team.balms ?? 0}</strong>
|
||||
</span>;
|
||||
}
|
||||
|
||||
// Recruter remplace l'équipe : une équipe encore utilisable demande une confirmation.
|
||||
function RecruitAction({ team, content, busy, onRecruit }) {
|
||||
const [confirming, setConfirming] = useState(false);
|
||||
|
|
@ -33,13 +41,6 @@ function RecruitAction({ team, content, busy, onRecruit }) {
|
|||
</div>;
|
||||
}
|
||||
|
||||
function TeamMembers({ catalog, companions, powers, content, statLabels }) {
|
||||
return <ul className="nebula-team-list">{companions.map((companion) => {
|
||||
const fate = powers && fateOf(companion, powers, content);
|
||||
return <li key={companion.cardId}><TeamCompanion catalog={catalog} companion={companion} content={content} statLabels={statLabels} footer={fate && <span className="nebula-team-fate" data-fate={fate.kind}>{fate.text}</span>} /></li>;
|
||||
})}</ul>;
|
||||
}
|
||||
|
||||
export function TeamPanel({ catalog, state, runMutation, busy, content, statLabels }) {
|
||||
const [team, setTeam] = useState(null);
|
||||
const [loadError, setLoadError] = useState("");
|
||||
|
|
@ -85,35 +86,33 @@ export function TeamPanel({ catalog, state, runMutation, busy, content, statLabe
|
|||
const recruiting = team.status === "recruiting";
|
||||
const dailyToPlay = state.daily && (state.daily.status === "playing" || state.daily.rewardPending);
|
||||
const recruit = () => play(() => recruitTeam(team.day));
|
||||
const recruitBlock = team.canRecruit && <>
|
||||
{dailyToPlay && team.goldStars < team.maxGoldStars && <p className="nds-inline-notice" role="status">{content.dailyFirst} <a href="#/cards/daily">{content.dailyLink}</a></p>}
|
||||
<RecruitAction key={team.status} team={team} content={content} busy={busy} onRecruit={recruit} />
|
||||
</>;
|
||||
return <section className="nebula-team" aria-labelledby="nebula-team-title" aria-busy={busy || undefined}>
|
||||
<div className="nds-section-heading nebula-section-heading">
|
||||
<div><p className="eyebrow">{content.eyebrow}</p><h2 id="nebula-team-title">{content.title}</h2></div>
|
||||
<div className="nebula-team-heading-actions"><GoldReserve team={team} content={content} /><TeamGuide content={content} maxDays={team.maxDays} />{team.devReset && <button className="nds-button" data-size="sm" data-variant="danger" type="button" disabled={busy} onClick={() => { setFinishedPowers(null); play(() => resetTeam()); }}>{content.devReset}</button>}<a className="nds-button" data-size="sm" data-variant="secondary" href="#/cards/guild">{content.back}</a></div>
|
||||
<div className="nebula-team-heading-actions"><GoldReserve team={team} content={content} /><BalmCount team={team} content={content} />{team.devReset && <button className="nds-button" data-size="sm" data-variant="danger" type="button" disabled={busy} onClick={() => { setFinishedPowers(null); play(() => resetTeam()); }}>{content.devReset}</button>}<a className="nds-button" data-size="sm" data-variant="secondary" href="#/cards/guild">{content.back}</a></div>
|
||||
</div>
|
||||
{notice && <p className="nds-inline-notice" data-variant="warning" role="status">{notice}</p>}
|
||||
{!team.enabled && !recruiting && <p className="nds-inline-notice" role="status">{content.closed}</p>}
|
||||
{recruiting && <TeamRecruitment catalog={catalog} team={team} content={content} statLabels={statLabels} busy={busy}
|
||||
onChoose={(cardId) => play(() => chooseTeamCharacter(cardId))} onReroll={(offer) => play(() => rerollTeamOffer(offer))} onReveal={(index) => play(() => revealTeamStar(index))} onHeal={() => play(() => healTeamCompanion(team.recruitment.current.cardId))} onKeep={() => play(() => keepTeamCompanion(team.recruitment.current.cardId))} />}
|
||||
{!recruiting && finishedPowers && team.status === "ready" && <section className="nebula-team-ready" aria-labelledby="nebula-team-ready-title">
|
||||
<h3 id="nebula-team-ready-title" ref={readyTitleRef} tabIndex={-1}>{content.readyTitle}</h3>
|
||||
<p>{fillTemplate(content.readyText, { power: averagePower(team.companions) })}{team.lastDust > 0 && ` ${fillTemplate(content.readyDust, { count: team.lastDust })}`}</p>
|
||||
<TeamMembers catalog={catalog} companions={team.companions} powers={finishedPowers} content={content} statLabels={statLabels} />
|
||||
<TeamBest companions={team.companions} content={content} statLabels={statLabels} />
|
||||
{!recruiting && finishedPowers && team.status === "ready" && <section className="nebula-team-ready" aria-label={content.readyTitle}>
|
||||
<TeamTable catalog={catalog} companions={team.companions} content={content} statLabels={statLabels} powers={finishedPowers} size="md"
|
||||
title={content.readyTitle} titleId="nebula-team-ready-title" titleRef={readyTitleRef}
|
||||
status={<>{fillTemplate(content.readyText, { power: averagePower(team.companions) })}{team.lastDust > 0 && ` ${fillTemplate(content.readyDust, { count: team.lastDust })}`}</>}
|
||||
action={<button className="nds-button" data-size="sm" data-variant="primary" type="button" onClick={() => setFinishedPowers(null)}>{content.readyAction}</button>} />
|
||||
<div className="nds-panel nebula-team-stars-panel"><p>{content.skyRevealed}</p><TeamSky sky={team.lastSky} content={content} /></div>
|
||||
<div className="nds-toolbar nebula-team-actions"><button className="nds-button" data-variant="primary" type="button" onClick={() => setFinishedPowers(null)}>{content.readyAction}</button></div>
|
||||
</section>}
|
||||
{!recruiting && !(finishedPowers && team.status === "ready") && <>
|
||||
{team.status === "ready" ? <section className="nebula-team-ready" aria-labelledby="nebula-team-current-title">
|
||||
<h3 id="nebula-team-current-title">{fillTemplate(content.teamDay, { day: team.teamDay, max: team.maxDays })}</h3>
|
||||
<p>{team.teamDay === team.maxDays ? content.lastDay : team.canRecruit ? content.keepOrRecruit : content.teamText}</p>
|
||||
<TeamMembers catalog={catalog} companions={team.companions} content={content} statLabels={statLabels} />
|
||||
<TeamBest companions={team.companions} content={content} statLabels={statLabels} />
|
||||
</section> : <section className="nebula-team-ready" aria-labelledby="nebula-team-none-title">
|
||||
<h3 id="nebula-team-none-title">{team.status === "expired" ? content.expiredTitle : content.noneTitle}</h3>
|
||||
<p>{fillTemplate(team.status === "expired" ? content.expiredText : content.noneText, { max: team.maxDays })}</p>
|
||||
</section>}
|
||||
{team.canRecruit && dailyToPlay && team.goldStars < team.maxGoldStars && <p className="nds-inline-notice" role="status">{content.dailyFirst} <a href="#/cards/daily">{content.dailyLink}</a></p>}
|
||||
{team.canRecruit && <RecruitAction key={team.status} team={team} content={content} busy={busy} onRecruit={recruit} />}
|
||||
{team.status === "ready" ? <section className="nebula-team-ready" aria-label={content.yourTeam}>
|
||||
<TeamTable catalog={catalog} companions={team.companions} content={content} statLabels={statLabels} size="md"
|
||||
title={fillTemplate(content.teamDay, { day: team.teamDay, max: team.maxDays })} titleId="nebula-team-current-title"
|
||||
status={<>{team.teamDay === team.maxDays ? content.lastDay : team.canRecruit ? content.keepOrRecruit : content.teamText}<span className="nebula-team-days" aria-hidden="true">{Array.from({ length: team.maxDays }, (_, index) => <i key={index} data-on={index < team.teamDay || undefined} />)}</span></>} />
|
||||
</section> : <TeamWelcome catalog={catalog} team={team} content={content} action={recruitBlock} />}
|
||||
{team.status === "ready" && recruitBlock}
|
||||
</>}
|
||||
</section>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,18 +2,12 @@
|
|||
import { useEffect, useRef } from "react";
|
||||
import { CurrencyIcon } from "./Currency.jsx";
|
||||
import { fillTemplate } from "./dailyShare.js";
|
||||
import { ITEM_ART, STAT_IDS } from "./expeditionFormat.js";
|
||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||
import { ITEM_ART } from "./expeditionFormat.js";
|
||||
import { TeamCompanion } from "./TeamCompanion.jsx";
|
||||
import { TeamSky } from "./TeamSky.jsx";
|
||||
import { countText, fateOf, isMissing, mainStats, riskLevel, riskPct, teamBest } from "./teamFormat.js";
|
||||
|
||||
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>;
|
||||
}
|
||||
import { TeamBest, TeamTable } from "./TeamTable.jsx";
|
||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||
import { BALANCED, bandOf, countText, isMissing, mainStats, riskLevel, riskPct, specialtyStyle } from "./teamFormat.js";
|
||||
|
||||
// Étoiles encore cachées : un nombre par sorte, avec son effet en quelques mots.
|
||||
function StarsLeft({ recruitment, content }) {
|
||||
|
|
@ -31,30 +25,27 @@ function StarsLeft({ recruitment, content }) {
|
|||
</section>;
|
||||
}
|
||||
|
||||
// Équipe en construction : sa meilleure valeur par stat, à côté du choix.
|
||||
function TeamSummary({ team, content, statLabels }) {
|
||||
return <section className="nebula-team-summary" aria-labelledby="nebula-team-summary-title">
|
||||
<h3 id="nebula-team-summary-title">{content.yourTeam}</h3>
|
||||
<TeamBest companions={team} content={content} statLabels={statLabels} />
|
||||
</section>;
|
||||
}
|
||||
|
||||
// Ses compagnons, en petit, sous le choix.
|
||||
function TeamMembers({ catalog, team, recruitment, content, statLabels }) {
|
||||
return <ol className="nebula-team-members" aria-label={content.recruitedTitle}>{Array.from({ length: recruitment.size }, (_, index) => {
|
||||
const companion = team[index];
|
||||
if (!companion) return <li key={index}><span className="nebula-team-slot">{fillTemplate(content.emptySlot, { number: index + 1 })}</span></li>;
|
||||
const fate = fateOf(companion, recruitment.powers, content);
|
||||
return <li key={index}><TeamCompanion catalog={catalog} companion={companion} content={content} statLabels={statLabels} size="sm" footer={<span className="nebula-team-fate" data-fate={fate.kind}>{fate.text}</span>} /></li>;
|
||||
// Les deux étapes d'un compagnon, avec les numéros dorés de l'accueil.
|
||||
// L'équipe en bref : une mini-carte par place, sans illustration, à la couleur de la spécialité (bicolore s'il y en a deux), avec
|
||||
// l'icône et la Puissance ; la place en cours en doré, les places libres en pointillés.
|
||||
function MiniTeam({ companions, size, content, statLabels }) {
|
||||
return <ol className="nebula-team-mini" aria-label={content.yourTeam}>{Array.from({ length: size }, (_, index) => {
|
||||
const companion = companions[index];
|
||||
if (!companion) return <li key={index} data-current={index === companions.length || undefined}><span aria-hidden="true">{index === companions.length ? "?" : index + 1}</span><span className="sr-only">{index === companions.length ? content.seatCurrent : content.seat}</span></li>;
|
||||
const band = bandOf(companion);
|
||||
const names = band.map((id) => (id === BALANCED ? content.balanced : statLabels[id]));
|
||||
return <li key={index} data-filled="true" style={specialtyStyle(companion)} title={names.join(" · ")}>
|
||||
<span className="nebula-team-mini-icons" aria-hidden="true">{band.map((id) => <MaskIcon key={id} name={id} />)}</span>
|
||||
<strong>{companion.power}</strong>
|
||||
<span className="sr-only">{names.join(", ")}</span>
|
||||
</li>;
|
||||
})}</ol>;
|
||||
}
|
||||
|
||||
function Steps({ count, size, step, content }) {
|
||||
return <ol className="nebula-team-steps">
|
||||
<li data-current="true">{fillTemplate(content.stepCount, { count, max: size })}</li>
|
||||
<li data-current={step === 1 || undefined} aria-current={step === 1 ? "step" : undefined}>{content.stepRecruit}</li>
|
||||
<li data-current={step === 2 || undefined} aria-current={step === 2 ? "step" : undefined}>{content.stepImprove}</li>
|
||||
</ol>;
|
||||
function Steps({ step, content }) {
|
||||
return <ol className="nebula-team-steps">{[content.stepRecruit, content.stepImprove].map((label, index) => <li key={label} data-current={step === index + 1 || undefined} aria-current={step === index + 1 ? "step" : undefined}>
|
||||
<span aria-hidden="true">{index + 1}</span>{label}
|
||||
</li>)}</ol>;
|
||||
}
|
||||
|
||||
function Improve({ catalog, recruitment, last, content, statLabels, busy, titleRef, onReveal, onHeal, onKeep }) {
|
||||
|
|
@ -70,7 +61,7 @@ function Improve({ catalog, recruitment, last, content, statLabels, busy, titleR
|
|||
return <div className="nebula-team-improve">
|
||||
<h3 ref={titleRef} tabIndex={-1}>{content.improveTitle}</h3>
|
||||
<TeamCompanion catalog={catalog} companion={current} content={content} statLabels={statLabels} />
|
||||
<div className="nds-panel nebula-team-stars-panel">
|
||||
<div className="nebula-team-stars-panel">
|
||||
<ol className="nebula-team-ladder" data-fallen={(current.fallen && !current.healed) || undefined}>{powers.map((power, index) => <li key={power} data-state={index <= (current.healed ? 0 : current.step) ? "reached" : index === current.step + 1 && !over ? "next" : undefined}>
|
||||
<small>{index ? countText(content.ladderStep, index) : content.ladderStart}</small>
|
||||
<strong>{power}</strong>
|
||||
|
|
@ -103,23 +94,34 @@ export function TeamRecruitment({ catalog, team, content, statLabels, busy, onCh
|
|||
shownStep.current = step;
|
||||
titleRef.current?.focus();
|
||||
}, [step]);
|
||||
return <>
|
||||
<Steps count={count} size={recruitment.size} step={recruitment.current ? 2 : 1} content={content} />
|
||||
<div className="nebula-team-recruiting">
|
||||
<div className="nebula-team-main">
|
||||
{recruitment.current
|
||||
? <Improve key={recruitment.current.cardId} catalog={catalog} recruitment={recruitment} last={count === recruitment.size} content={content} statLabels={statLabels} busy={busy} titleRef={titleRef} onReveal={onReveal} onHeal={onHeal} onKeep={onKeep} />
|
||||
: <section aria-labelledby="nebula-team-offer-title" className="nebula-team-offer">
|
||||
<h3 id="nebula-team-offer-title" ref={titleRef} tabIndex={-1}>{content.offerTitle}</h3>
|
||||
<p>{fillTemplate(content.offerText, { power: recruitment.powers[0] })}{companions.length === 0 && recruitment.extraGold > 0 && <> <strong>{countText(content.reserveUsed, recruitment.extraGold)}</strong></>}</p>
|
||||
return <div className="nebula-team-recruiting">
|
||||
<section className="nds-panel nebula-team-stage" aria-label={fillTemplate(content.stepCount, { count, max: recruitment.size })}>
|
||||
<Steps step={recruitment.current ? 2 : 1} content={content} />
|
||||
<div className="nebula-team-stage-main">{recruitment.current
|
||||
? <Improve key={recruitment.current.cardId} catalog={catalog} recruitment={recruitment} last={count === recruitment.size} content={content} statLabels={statLabels} busy={busy} titleRef={titleRef} onReveal={onReveal} onHeal={onHeal} onKeep={onKeep} />
|
||||
: <section aria-labelledby="nebula-team-offer-title" className="nebula-team-offer">
|
||||
<h3 id="nebula-team-offer-title" ref={titleRef} tabIndex={-1}>{content.offerTitle}</h3>
|
||||
<p>{fillTemplate(content.offerText, { power: recruitment.powers[0] })}{companions.length === 0 && recruitment.extraGold > 0 && <> <strong>{countText(content.reserveUsed, recruitment.extraGold)}</strong></>}</p>
|
||||
{/* Le bouton qui renouvelle la proposition, au-dessus des cartes, aligné sur leur bord droit. */}
|
||||
<div className="nebula-team-offer-pick">
|
||||
<div className="nebula-team-reroll"><button className="nds-button" data-size="sm" data-variant="secondary" type="button" disabled={busy || !recruitment.rerolls} title={recruitment.rerolls ? countText(content.rerollsLeft, recruitment.rerolls) : content.rerollsNone} onClick={() => onReroll(recruitment.offer.map((companion) => companion.cardId))}>
|
||||
{content.reroll}<span className="nebula-team-reroll-count" aria-hidden="true">×{recruitment.rerolls}</span><span className="sr-only">{recruitment.rerolls ? countText(content.rerollsLeft, recruitment.rerolls) : content.rerollsNone}</span>
|
||||
</button></div>
|
||||
<div className="nebula-team-offer-cards">{recruitment.offer.map((companion) => <TeamCompanion key={companion.cardId} catalog={catalog} companion={companion} content={content} statLabels={statLabels} showPower={false} disabled={busy}
|
||||
badge={isMissing(companion, companions) ? content.missing : ""} actionLabel={content.recruitAction} onSelect={() => onChoose(companion.cardId)} />)}</div>
|
||||
<div className="nds-toolbar nebula-team-actions"><button className="nds-button" data-size="sm" data-variant="secondary" type="button" disabled={busy || !recruitment.rerolls} onClick={() => onReroll(recruitment.offer.map((companion) => companion.cardId))}>{content.reroll}</button><span>{recruitment.rerolls ? countText(content.rerollsLeft, recruitment.rerolls) : content.rerollsNone}</span></div>
|
||||
</section>}
|
||||
badge={isMissing(companion, companions) ? content.missing : ""} actionLabel={content.recruitAction} onSelect={() => onChoose(companion.cardId)} />)}</div>
|
||||
</div>
|
||||
</section>}</div>
|
||||
<div className="nebula-team-stage-side">
|
||||
<StarsLeft recruitment={recruitment} content={content} />
|
||||
{/* Rappel des points forts de l'équipe, pour comparer les cartes proposées sans descendre jusqu'à elle. */}
|
||||
<section className="nebula-team-stage-best" aria-labelledby="nebula-team-stage-best-title">
|
||||
<h3 id="nebula-team-stage-best-title">{content.stageBestTitle}</h3>
|
||||
<MiniTeam companions={companions} size={recruitment.size} content={content} statLabels={statLabels} />
|
||||
{companions.length ? <TeamBest companions={companions} content={content} statLabels={statLabels} /> : <p>{content.stageBestEmpty}</p>}
|
||||
</section>
|
||||
</div>
|
||||
<StarsLeft recruitment={recruitment} content={content} />
|
||||
<TeamSummary team={companions} content={content} statLabels={statLabels} />
|
||||
<TeamMembers catalog={catalog} team={companions} recruitment={recruitment} content={content} statLabels={statLabels} />
|
||||
</div>
|
||||
</>;
|
||||
</section>
|
||||
<TeamTable catalog={catalog} companions={companions} slots={recruitment.size} content={content} statLabels={statLabels} powers={recruitment.powers}
|
||||
title={content.yourTeam} titleId="nebula-team-summary-title" status={fillTemplate(content.stepCount, { count, max: recruitment.size })} seatLabel={content.seat} currentLabel={content.seatCurrent} />
|
||||
</div>;
|
||||
}
|
||||
|
|
|
|||
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>;
|
||||
}
|
||||
47
website/src/features/cards/TeamWelcome.jsx
Normal file
47
website/src/features/cards/TeamWelcome.jsx
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
// Rôle : 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>
|
||||
</>;
|
||||
}
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
// Rôle : règle les quêtes de la Guilde des Veilleurs, une par onglet (Carte du jour, Équipe du jour, Expéditions), chacun avec son adresse.
|
||||
// Rôle : règle les quêtes de la Guilde des Veilleurs, une par onglet (Carte du jour, Équipe du jour, Course des courants, Expéditions),
|
||||
// chacun avec son adresse.
|
||||
import { useState } from "react";
|
||||
import { Tabs } from "../../../components/Tabs.jsx";
|
||||
import { ApplyActions } from "./adminSettingForm.jsx";
|
||||
import { inRange, MAX_VALUE, parse, shopSettingSaver } from "./adminSettings.js";
|
||||
import { ExpeditionSettings } from "./ExpeditionSettings.jsx";
|
||||
import { RaceSettings } from "./RaceSettings.jsx";
|
||||
import { TeamSettings } from "./TeamSettings.jsx";
|
||||
|
||||
// Carte du jour : la partie du jour (joueurs et gagnants), puis la récompense d'une victoire.
|
||||
|
|
@ -30,7 +32,7 @@ function DailyQuestSettings({ setting, daily, busy, save }) {
|
|||
}
|
||||
|
||||
// Onglets de la Guilde : l'adresse #/cards/admin/guild/<onglet> garde l'onglet ouvert ; sans onglet, la Carte du jour.
|
||||
const GUILD_TABS = [{ id: "daily", label: "Carte du jour" }, { id: "team", label: "Équipe du jour" }, { id: "expeditions", label: "Expéditions" }];
|
||||
const GUILD_TABS = [{ id: "daily", label: "Carte du jour" }, { id: "team", label: "Équipe du jour" }, { id: "race", label: "Course des courants" }, { id: "expeditions", label: "Expéditions" }];
|
||||
|
||||
export function AdminGuild({ dashboard, busy, runMutation, refreshDashboard, tab = "" }) {
|
||||
const setting = dashboard?.shopSetting;
|
||||
|
|
@ -42,6 +44,7 @@ export function AdminGuild({ dashboard, busy, runMutation, refreshDashboard, tab
|
|||
? <>
|
||||
{activeTab === "daily" && <DailyQuestSettings key={setting.dailyReward} setting={setting} daily={dashboard.daily} busy={busy} save={save} />}
|
||||
{activeTab === "team" && dashboard.teamSettings && <TeamSettings dashboard={dashboard} busy={busy} runMutation={runMutation} refreshDashboard={refreshDashboard} />}
|
||||
{activeTab === "race" && dashboard.teamSettings && <RaceSettings dashboard={dashboard} busy={busy} runMutation={runMutation} refreshDashboard={refreshDashboard} />}
|
||||
{activeTab === "expeditions" && dashboard.expeditionSettings && <ExpeditionSettings dashboard={dashboard} busy={busy} runMutation={runMutation} refreshDashboard={refreshDashboard} />}
|
||||
</>
|
||||
: <div className="nds-empty-state" aria-busy="true"><p>Chargement des quêtes…</p></div>}
|
||||
|
|
|
|||
75
website/src/features/cards/admin/RaceSettings.jsx
Normal file
75
website/src/features/cards/admin/RaceSettings.jsx
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
// Rôle : règle la Course des courants depuis Administration › Guilde : ouverture, suivi du jour (parcours, courses, places,
|
||||
// poussière, adversaires), récompenses et habileté des Équipes des Veilleurs. Ses règles de jeu restent dans race-rules.js.
|
||||
import { useState } from "react";
|
||||
import { ConfirmModal } from "../../../components/ToolboxModals.jsx";
|
||||
import { updateTeamSettings } from "../cardsApi.js";
|
||||
import { ApplyBar, SettingsGroup } from "./SettingFields.jsx";
|
||||
import { useSettingsDraft, writePath } from "./settingsDraft.js";
|
||||
import { formatTeamSetting, RACE_SETTING_GROUPS, teamSettingLabel } from "./teamSettingFields.js";
|
||||
|
||||
const FIELDS = RACE_SETTING_GROUPS.flatMap((group) => group.fields);
|
||||
const STAT_LABELS = { bravoure: "Bravoure", endurance: "Endurance", fortune: "Fortune", orientation: "Orientation" };
|
||||
const plural = (count, word) => `${word}${count > 1 ? "s" : ""}`;
|
||||
const number = (value) => value.toLocaleString("fr-FR");
|
||||
|
||||
// Ouverture (appliquée tout de suite) et suivi du jour.
|
||||
function RaceStatus({ settings, race, busy, onToggle }) {
|
||||
const [confirming, setConfirming] = useState(false);
|
||||
const open = settings.raceEnabled;
|
||||
const running = race.started - race.finished;
|
||||
return <section className="nds-panel nebula-admin-shop nebula-admin-expedition-status" data-open={open && settings.enabled} aria-labelledby="nebula-admin-race-status-title">
|
||||
<div className="nebula-admin-expedition-status-head">
|
||||
<div>
|
||||
<h3 id="nebula-admin-race-status-title">Course des courants <span className="nds-badge" data-variant={open && settings.enabled ? "success" : "neutral"}>{!open ? "Fermée aux joueurs" : settings.enabled ? "Ouverte aux joueurs" : "En attente de l’Équipe du jour"}</span></h3>
|
||||
<p className="nebula-admin-guild-today">Aujourd’hui : <strong>{number(race.finished)}</strong> {plural(race.finished, "course")} {plural(race.finished, "finie")}{running > 0 && <>, <strong>{number(running)}</strong> en cours</>} · <strong>{number(race.stardust)}</strong> de poussière versée.</p>
|
||||
</div>
|
||||
<button className="nds-button" data-size="sm" data-variant={open ? "secondary" : "primary"} type="button" disabled={busy} onClick={() => setConfirming(true)}>{open ? "Fermer la Course" : "Ouvrir la Course"}</button>
|
||||
</div>
|
||||
{!settings.enabled && open && <p className="nds-inline-notice" role="status">La Course se court avec une équipe : elle n’apparaîtra aux joueurs qu’une fois l’Équipe du jour ouverte.</p>}
|
||||
{confirming && <ConfirmModal
|
||||
title={open ? "Fermer la Course ?" : "Ouvrir la Course ?"}
|
||||
message={open ? "Plus aucun départ de course. Une course déjà commencée se termine. L’Équipe du jour reste ouverte." : "La tuile de la Course apparaît au tableau de la Guilde dès que l’Équipe du jour est ouverte."}
|
||||
confirmLabel={open ? "Fermer" : "Ouvrir"}
|
||||
onClose={async (confirmed) => {
|
||||
setConfirming(false);
|
||||
if (confirmed) await onToggle(!open);
|
||||
}}
|
||||
/>}
|
||||
</section>;
|
||||
}
|
||||
|
||||
// Le parcours du jour et ce qu'ont donné les courses finies.
|
||||
function RaceToday({ race }) {
|
||||
const opponents = race.opponents.players + race.opponents.watchers;
|
||||
return <section className="nds-panel nebula-admin-shop nebula-admin-race-today" aria-labelledby="nebula-admin-race-today-title">
|
||||
<h3 id="nebula-admin-race-today-title">Le jour en cours</h3>
|
||||
{race.zones
|
||||
? <ol className="nebula-admin-race-zones" aria-label="Parcours du jour">{race.zones.map((stat, index) => <li key={index} style={{ "--specialty": `var(--color-stat-${stat})` }}><small>{index + 1}</small>{STAT_LABELS[stat] || stat}</li>)}</ol>
|
||||
: <p className="nebula-form-help">Le parcours se tire à la première visite d’un joueur.</p>}
|
||||
<dl className="nebula-admin-race-figures">
|
||||
<div><dt>Places des joueurs</dt><dd>{race.places.map((count, index) => `${index + 1}${index ? "e" : "re"} : ${number(count)}`).join(" · ")}</dd></div>
|
||||
<div><dt>Adversaires</dt><dd>{opponents ? `${number(race.opponents.players)} équipe${race.opponents.players > 1 ? "s" : ""} de joueurs · ${number(race.opponents.watchers)} des Veilleurs` : "Aucune course lancée."}</dd></div>
|
||||
</dl>
|
||||
</section>;
|
||||
}
|
||||
|
||||
export function RaceSettings({ dashboard, busy, runMutation, refreshDashboard }) {
|
||||
const { settings, defaults, race } = dashboard.teamSettings;
|
||||
const draft = useSettingsDraft(settings, FIELDS);
|
||||
const save = async (apply) => {
|
||||
const next = structuredClone(settings);
|
||||
apply(next);
|
||||
const saved = await runMutation(() => updateTeamSettings(next));
|
||||
if (saved) await refreshDashboard();
|
||||
return saved;
|
||||
};
|
||||
const apply = async () => {
|
||||
if (await save((next) => draft.changes.forEach((field) => writePath(next, field.path, draft.value(field.path))))) draft.reset();
|
||||
};
|
||||
return <div className="nebula-admin-expeditions">
|
||||
<RaceStatus settings={settings} race={race} busy={busy} onToggle={(raceEnabled) => save((next) => { next.raceEnabled = raceEnabled; })} />
|
||||
<RaceToday race={race} />
|
||||
{RACE_SETTING_GROUPS.map((group) => <SettingsGroup key={group.id} group={group} fields={group.fields} draft={draft} settings={settings} defaults={defaults} busy={busy} />)}
|
||||
<ApplyBar draft={draft} settings={settings} busy={busy} onApply={apply} message="Les nouveaux réglages valent pour les prochaines courses. Une course commencée garde ses récompenses et ses adversaires." labelOf={teamSettingLabel} formatValue={formatTeamSetting} />
|
||||
</div>;
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
// Rôle : règle l'Équipe du jour depuis Administration › Guilde : ouverture et suivi du jour, étoiles, Puissance et récompenses.
|
||||
// Rôle : règle l'Équipe du jour depuis Administration › Guilde : ouverture et suivi du jour, étoiles, Puissance et récompense de la
|
||||
// Carte du jour. La Course des courants a son onglet (RaceSettings.jsx).
|
||||
import { useState } from "react";
|
||||
import { ConfirmModal } from "../../../components/ToolboxModals.jsx";
|
||||
import { updateTeamSettings } from "../cardsApi.js";
|
||||
|
|
@ -16,15 +17,15 @@ function TeamStatus({ enabled, today, busy, onToggle }) {
|
|||
<div className="nebula-admin-expedition-status-head">
|
||||
<div>
|
||||
<h3 id="nebula-admin-team-status-title">Équipe du jour <span className="nds-badge" data-variant={enabled ? "success" : "neutral"}>{enabled ? "Ouverte aux joueurs" : "Fermée aux joueurs"}</span></h3>
|
||||
<p className="nebula-admin-guild-today">Aujourd’hui : <strong>{today.teams}</strong> {plural(today.teams, "équipe")} utilisable{today.teams > 1 ? "s" : ""} · <strong>{today.races}</strong> {plural(today.races, "course")} · <strong>{today.stars}</strong> {plural(today.stars, "étoile")} {plural(today.stars, "dorée")} {plural(today.stars, "choisie")}.</p>
|
||||
<p className="nebula-admin-guild-today">Aujourd’hui : <strong>{today.teams}</strong> {plural(today.teams, "équipe")} utilisable{today.teams > 1 ? "s" : ""} · <strong>{today.stars}</strong> {plural(today.stars, "étoile")} {plural(today.stars, "dorée")} {plural(today.stars, "choisie")}.</p>
|
||||
</div>
|
||||
<button className="nds-button" data-size="sm" data-variant={enabled ? "secondary" : "primary"} type="button" disabled={busy} onClick={() => setConfirming(true)}>{enabled ? "Fermer l’Équipe du jour" : "Ouvrir l’Équipe du jour"}</button>
|
||||
</div>
|
||||
{confirming && <ConfirmModal
|
||||
title={enabled ? "Fermer l’Équipe du jour ?" : "Ouvrir l’Équipe du jour ?"}
|
||||
message={enabled
|
||||
? "Plus aucun recrutement ni départ de course. Un recrutement ou une course déjà commencés se terminent, et la Carte du jour redonne sa poussière aussitôt."
|
||||
: "Les tuiles de l’Équipe du jour et de la Course apparaissent dans la Guilde, et la Carte du jour propose une étoile dorée."}
|
||||
? "Plus aucun recrutement ni départ de course (la Course demande une équipe). Un recrutement ou une course déjà commencés se terminent, et la Carte du jour redonne sa poussière aussitôt."
|
||||
: "L’équipe apparaît dans la Guilde (et la Course, si elle est ouverte), et la Carte du jour propose une étoile dorée."}
|
||||
confirmLabel={enabled ? "Fermer" : "Ouvrir"}
|
||||
onClose={async (confirmed) => {
|
||||
setConfirming(false);
|
||||
|
|
@ -54,7 +55,7 @@ export function TeamSettings({ dashboard, busy, runMutation, refreshDashboard })
|
|||
<TeamStatus enabled={settings.enabled} today={today} busy={busy} onToggle={(enabled) => save((next) => { next.enabled = enabled; })} />
|
||||
{starStardust >= dailyReward && <p className="nds-inline-notice" data-variant="warning" role="status">L’étoile dorée vient avec {starStardust.toLocaleString("fr-FR")} de poussière, autant ou plus que la Carte du jour sans étoile ({dailyReward.toLocaleString("fr-FR")}) : les joueurs n’auraient aucune raison de choisir la poussière seule.</p>}
|
||||
{TEAM_SETTING_GROUPS.map((group) => <SettingsGroup key={group.id} group={group} fields={group.fields} draft={draft} settings={settings} defaults={defaults} busy={busy} />)}
|
||||
<ApplyBar draft={draft} settings={settings} busy={busy} onApply={apply} message="Les nouveaux réglages valent pour les prochains recrutements, courses et victoires à la Carte du jour." labelOf={teamSettingLabel} formatValue={formatTeamSetting}
|
||||
<ApplyBar draft={draft} settings={settings} busy={busy} onApply={apply} message="Les nouveaux réglages valent pour les prochains recrutements et victoires à la Carte du jour." labelOf={teamSettingLabel} formatValue={formatTeamSetting}
|
||||
blocked={teamSettingsConflict({ powers: value("recruitment.powers"), fallPower: value("recruitment.fallPower") })} />
|
||||
</div>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Rôle : décrit les réglages de l'Équipe du jour dans l'administration : libellés, bornes et règles entre plusieurs valeurs.
|
||||
// Rôle : décrit les réglages de l'Équipe du jour et de la Course des courants dans l'administration : libellés, bornes et règles
|
||||
// entre plusieurs valeurs. Les deux sont enregistrés ensemble, mais réglés dans deux onglets.
|
||||
|
||||
export const TEAM_SETTING_GROUPS = [
|
||||
{
|
||||
|
|
@ -19,20 +20,39 @@ export const TEAM_SETTING_GROUPS = [
|
|||
]
|
||||
},
|
||||
{
|
||||
id: "team-rewards", title: "Récompenses", help: "En poussière d’étoiles. Les récompenses d’une course sont celles de son départ.",
|
||||
id: "team-rewards", title: "Carte du jour", help: "En poussière d’étoiles, quand le joueur choisit l’étoile dorée plutôt que la poussière seule.",
|
||||
fields: [
|
||||
{ path: "raceRewards", label: "Course, selon la place", min: 0, max: 100_000, items: ["1re", "2e", "3e", "4e"] },
|
||||
{ path: "starStardust", label: "Avec une étoile dorée (Carte du jour)", min: 0, max: 100_000 }
|
||||
{ path: "starStardust", label: "Avec une étoile dorée", min: 0, max: 100_000 }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const FIELDS = TEAM_SETTING_GROUPS.flatMap((group) => group.fields);
|
||||
const LABELS = new Map([...FIELDS.map((field) => [field.path, field.label]), ["enabled", "Ouverte aux joueurs"]]);
|
||||
export const RACE_SETTING_GROUPS = [
|
||||
{
|
||||
id: "race-rewards", title: "Récompenses", help: "En poussière d’étoiles, selon la place. Les récompenses d’une course sont celles de son départ.",
|
||||
fields: [
|
||||
{ path: "raceRewards", label: "Selon la place", min: 0, max: 100_000, items: ["1re", "2e", "3e", "4e"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "race-watchers", title: "Équipes des Veilleurs", help: "Elles complètent une course quand il manque des équipes de joueurs. Habileté : chance de bien choisir chaque compagnon et de bien l’améliorer. L’équipe forte donne aussi ses élans au bon moment.",
|
||||
fields: [
|
||||
{ path: "watcherSkill.strong", label: "Forte", min: 0, max: 100, unit: "%" },
|
||||
{ path: "watcherSkill.medium", label: "Moyenne", min: 0, max: 100, unit: "%" },
|
||||
{ path: "watcherSkill.weak", label: "Faible", min: 0, max: 100, unit: "%" }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const FIELDS = [...TEAM_SETTING_GROUPS, ...RACE_SETTING_GROUPS].flatMap((group) => group.fields);
|
||||
const LABELS = new Map([
|
||||
...FIELDS.map((field) => [field.path, field.path.startsWith("watcherSkill.") ? `Veilleurs, équipe ${field.label.toLowerCase()}` : field.path === "raceRewards" ? "Course, récompenses selon la place" : field.label]),
|
||||
["enabled", "Équipe du jour ouverte aux joueurs"], ["raceEnabled", "Course ouverte aux joueurs"]
|
||||
]);
|
||||
|
||||
export const teamSettingLabel = (path) => LABELS.get(path) || path;
|
||||
export const formatTeamSetting = (value) => (typeof value === "boolean" ? (value ? "oui" : "non") : Array.isArray(value) ? value.join(" / ") : String(value));
|
||||
export const TEAM_SETTING_PATHS = ["enabled", ...FIELDS.map((field) => field.path)];
|
||||
export const TEAM_SETTING_PATHS = ["enabled", "raceEnabled", ...FIELDS.map((field) => field.path)];
|
||||
|
||||
// Règles entre valeurs, que le serveur vérifie aussi.
|
||||
export function teamSettingsConflict({ powers, fallPower }) {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ export function guildQuests(state, now = Date.now()) {
|
|||
// L'Équipe du jour n'apparaît que si elle est ouverte, ou tant qu'un recrutement n'est pas terminé.
|
||||
const team = state.team;
|
||||
if (team && (team.enabled || team.status === "recruiting")) quests.push({ id: "team", pending: team.status !== "ready", summary: team });
|
||||
// La Course attend une équipe ; une course commencée se termine même si l'Équipe du jour ferme.
|
||||
if (team && ((team.enabled && team.status === "ready") || team.race === "running")) quests.push({ id: "race", pending: team.race !== "finished", summary: team });
|
||||
// La Course attend une équipe et sa propre ouverture ; une course commencée se termine même si elle ferme.
|
||||
if (team && ((team.raceEnabled && team.status === "ready") || team.race === "running")) quests.push({ id: "race", pending: team.race !== "finished", summary: team });
|
||||
const expeditions = state.expeditions;
|
||||
if (expeditions && (expeditions.enabled || expeditions.running || expeditions.returned || expeditions.forming)) quests.push({ id: "expeditions", pending: expeditionsPending(expeditions, now), summary: expeditions });
|
||||
return quests;
|
||||
|
|
@ -42,7 +42,7 @@ export function guildGreeting(state, now = Date.now()) {
|
|||
if (daily?.status === "playing") return teamOpen && team.status !== "ready" ? "dailyFirst" : "daily";
|
||||
if (teamOpen && team.status === "recruiting") return "recruiting";
|
||||
if (teamOpen && team.status !== "ready") return "recruit";
|
||||
if (teamOpen && team.race !== "finished") return "race";
|
||||
if (teamOpen && team.raceEnabled && team.race !== "finished") return "race";
|
||||
if (expeditions && (expeditions.returned > 0 || (expeditions.nextReturnAt != null && expeditions.nextReturnAt <= now))) return "loot";
|
||||
return "done";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,33 +150,10 @@
|
|||
.nebula-guild-progress strong { font-size: var(--font-size-xl); font-variant-numeric: tabular-nums; }
|
||||
.nebula-guild-progress[data-done] { border-color: color-mix(in srgb, var(--color-success) 55%, transparent); }
|
||||
.nebula-guild-progress[data-done] strong { color: var(--color-success); }
|
||||
.nebula-guild-pips, .nebula-guild-days { display: inline-flex; gap: 4px; }
|
||||
.nebula-guild-pips i, .nebula-guild-days i { width: 18px; height: 7px; border-radius: var(--radius-pill); background: rgba(245, 247, 255, 0.28); }
|
||||
.nebula-guild-pips { display: inline-flex; gap: 4px; }
|
||||
.nebula-guild-pips i { width: 18px; height: 7px; border-radius: var(--radius-pill); background: rgba(245, 247, 255, 0.28); }
|
||||
.nebula-guild-pips i[data-done] { background: var(--color-success); }
|
||||
.nebula-guild-days i[data-on] { background: var(--color-accent-gold); }
|
||||
.nebula-guild-stars { color: var(--color-accent-gold); letter-spacing: 2px; }
|
||||
.nebula-guild-stars i { color: rgba(245, 247, 255, 0.28); font-style: normal; }
|
||||
|
||||
/* Votre équipe : les cinq compagnons en fiches, et à droite les étoiles dorées, les Baumes et le bouton, devant la table de l'équipe. */
|
||||
.nds-panel.nebula-guild-team { position: relative; display: grid; grid-template-columns: auto minmax(190px, 230px); grid-template-areas: "head head" "list side"; justify-content: start; gap: var(--space-3) var(--space-5); overflow: hidden; padding: var(--space-4) var(--space-5) var(--space-5); }
|
||||
.nebula-guild-team > :not(.nebula-guild-team-bg) { position: relative; z-index: 1; }
|
||||
.nds-panel.nebula-guild-team > .nebula-guild-team-bg { position: absolute; inset: 0 0 0 auto; width: 45%; height: 100%; object-fit: cover; object-position: 60% 80%; opacity: 0.55; mask-image: linear-gradient(90deg, transparent, #000 55%); }
|
||||
.nebula-guild-team-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-4); }
|
||||
.nebula-guild-team-head h3 { font-size: var(--font-size-lg); }
|
||||
.nebula-guild-team-head p { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-guild-team-list { grid-area: list; display: grid; grid-template-columns: repeat(5, minmax(0, 138px)); gap: var(--space-3); }
|
||||
.nebula-guild-team-list > li { display: grid; min-width: 0; }
|
||||
.nebula-guild-team .nebula-team-companion[data-size="sm"] .nebula-team-art { aspect-ratio: 16 / 10; }
|
||||
.nebula-guild-team-slot { display: grid; min-height: 120px; padding: var(--space-3); border: 2px dashed rgba(245, 247, 255, 0.3); border-radius: var(--radius-lg); background: rgba(7, 9, 19, 0.45); color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 600; text-align: center; place-items: center; }
|
||||
.nebula-guild-team-side { grid-area: side; display: grid; gap: var(--space-3); align-content: center; padding: var(--space-4); border: 1px solid var(--color-border-hover); border-radius: var(--radius-lg); background: rgba(7, 9, 19, 0.78); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-guild-team-side dl { display: grid; gap: var(--space-3); }
|
||||
.nebula-guild-team-side dl > div { display: grid; gap: 2px; justify-items: start; }
|
||||
.nebula-guild-team-side dd { margin: 0; }
|
||||
.nebula-guild-team-side dt { display: flex; align-items: center; gap: var(--space-2); }
|
||||
.nebula-guild-team-side dt img { width: 26px; height: 22px; object-fit: contain; }
|
||||
.nebula-guild-team-side dd { color: var(--color-text-primary); font-size: var(--font-size-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
|
||||
.nebula-guild-team-side dd.nebula-guild-stars { color: var(--color-accent-gold); }
|
||||
.nebula-guild-team-side .nds-button { justify-self: start; }
|
||||
|
||||
/* Tableau des quêtes : un panneau aux tons de liège, les quêtes du jour punaisées dessus. */
|
||||
.nebula-guild-board { padding: var(--space-4) var(--space-5) var(--space-5); border: 1px solid rgba(246, 196, 83, 0.3); border-radius: var(--radius-lg); background: radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.16) 1px, transparent 2px) 0 0 / 14px 14px, linear-gradient(160deg, rgba(122, 85, 50, 0.32), rgba(60, 38, 22, 0.42)), var(--color-bg-surface); }
|
||||
|
|
@ -187,7 +164,13 @@
|
|||
.nebula-guild-notices .nds-card.nebula-quest[data-locked] .nebula-quest-cover img { filter: grayscale(0.7) brightness(0.6); }
|
||||
.nebula-guild-notices .nebula-quest-media { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
|
||||
.nebula-guild-notices .nds-card-cover.nebula-quest-cover { width: 100%; aspect-ratio: 16 / 8; border-radius: 0; }
|
||||
.nebula-guild-notices .nebula-quest-media .nds-badge { position: absolute; right: var(--space-2); bottom: var(--space-2); }
|
||||
/* Badge posé sur l'illustration (la série de la Carte du jour) : fond sombre opaque, sans quoi il se perd dans une image dorée. */
|
||||
.nebula-guild-notices .nebula-quest-media .nds-badge { position: absolute; right: var(--space-2); bottom: var(--space-2); border: 1px solid var(--color-accent-gold); background: rgba(7, 9, 19, 0.88); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); color: var(--color-accent-gold); font-weight: 700; }
|
||||
/* Pancarte « En groupe » : une planchette de bois clouée, penchée, sur l'illustration d'une quête qui demande l'équipe. */
|
||||
.nebula-quest-sign { position: absolute; z-index: 1; top: 34%; left: 50%; padding: 6px var(--space-6); border: 2px solid #4a2c17; border-radius: 4px; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 6px), linear-gradient(180deg, #c58a4f, #9a6233); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 228, 180, 0.45); color: #fff3dc; font-size: var(--font-size-lg); font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; text-shadow: 0 1px 1px rgba(60, 30, 10, 0.9); transform: translate(-50%, -50%) rotate(-7deg); pointer-events: none; }
|
||||
.nebula-quest-sign::before, .nebula-quest-sign::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8e2d6, #6b6257); }
|
||||
.nebula-quest-sign::before { left: 8px; }
|
||||
.nebula-quest-sign::after { right: 8px; }
|
||||
.nebula-guild-notices .nds-card-body.nebula-quest-body { flex: 1; align-content: start; padding: var(--space-4); }
|
||||
.nebula-guild-notices .nebula-quest-body .nds-card-actions { margin-top: auto; padding-top: var(--space-2); }
|
||||
.nebula-quest[data-done] .nebula-quest-status::before { content: "✓ "; color: var(--color-success); }
|
||||
|
|
@ -211,19 +194,13 @@ a.nebula-quest-cover:hover img { transform: scale(1.035); filter: brightness(1.0
|
|||
.nebula-quest-body p:not(.eyebrow) { color: var(--color-text-secondary); font-size: var(--font-size-sm); text-wrap: pretty; }
|
||||
.nebula-quest-body .nebula-quest-status { color: var(--color-text-primary); font-weight: 700; }
|
||||
.nebula-quest-body .nds-card-actions { display: flex; padding: 0; }
|
||||
/* Plus étroit, le résumé de l'équipe passe sous les compagnons, en ligne. */
|
||||
/* Plus étroit, la table de l'équipe passe en bas du bloc. */
|
||||
@container nebula-dashboard (max-width: 999px) {
|
||||
.nds-panel.nebula-guild-team { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "list" "side"; justify-content: stretch; }
|
||||
.nds-panel.nebula-guild-team > .nebula-guild-team-bg { width: 70%; height: 45%; inset: auto 0 0 auto; }
|
||||
.nebula-guild-team-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); }
|
||||
.nebula-guild-team-side dl { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
|
||||
.nebula-guild-team-list { gap: var(--space-2); }
|
||||
}
|
||||
}
|
||||
@container nebula-dashboard (max-width: 620px) {
|
||||
.nds-panel.nebula-guild-hall { grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "clerk welcome" "progress progress"; padding: var(--space-4); }
|
||||
.nebula-guild-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
|
||||
.nebula-guild-team-list { grid-template-columns: repeat(3, minmax(0, 138px)); }
|
||||
.nebula-guild-clerk { width: 96px; }
|
||||
.nebula-guild-clerk { width: 96px; }
|
||||
.nebula-guild-missions .nds-card.nebula-quest { grid-template-columns: minmax(0, 1fr); }
|
||||
.nebula-guild-missions .nds-card-cover.nebula-quest-cover { min-height: 180px; aspect-ratio: 16 / 8; mask-image: linear-gradient(180deg, #000 70%, transparent); }
|
||||
.nebula-guild-missions .nds-card-body.nebula-quest-body { padding: var(--space-2) var(--space-4) var(--space-4); }
|
||||
|
|
@ -1266,6 +1243,17 @@ main:has(.nebula-dashboard) { overflow-x: clip; }
|
|||
.nebula-admin-shop-item-fields .nds-input { width: 100%; }
|
||||
/* Guilde : la partie du jour, puis la récompense d'une victoire. */
|
||||
.nebula-admin-guild-today { margin: 0; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
/* Course des courants, le jour en cours : le parcours en huit cases à la couleur de leur stat, puis les chiffres des courses. */
|
||||
.nds-panel.nebula-admin-race-today { display: grid; gap: var(--space-3); }
|
||||
.nebula-admin-race-today h3 { margin: 0; font-size: var(--font-size-base); }
|
||||
.nebula-admin-race-zones { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; margin: 0; padding: 0; list-style: none; }
|
||||
.nebula-admin-race-zones li { display: grid; gap: 2px; min-width: 0; padding: var(--space-2) 4px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--specialty) 26%, var(--color-bg-deep)); color: var(--specialty); font-size: var(--font-size-xs); font-weight: 700; text-align: center; overflow-wrap: anywhere; }
|
||||
.nebula-admin-race-zones small { color: var(--color-text-muted); font-weight: 600; }
|
||||
@container (max-width: 760px) { .nebula-admin-race-zones { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
|
||||
.nebula-admin-race-figures { display: grid; gap: var(--space-2); margin: 0; }
|
||||
.nebula-admin-race-figures > div { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--font-size-sm); }
|
||||
.nebula-admin-race-figures dt { color: var(--color-text-secondary); }
|
||||
.nebula-admin-race-figures dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.nebula-admin-guild-today strong { color: var(--color-text-primary); }
|
||||
.nebula-admin-guild-reward-field { display: grid; gap: 6px; max-width: 240px; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-admin-guild-reward-field .nds-input { width: 100%; }
|
||||
|
|
|
|||
|
|
@ -140,6 +140,9 @@
|
|||
.nebula-admin-expedition-group > .nebula-form-help { margin: 0; }
|
||||
.nebula-admin-expedition-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--space-3) var(--space-4); }
|
||||
.nebula-admin-expedition-field { display: grid; gap: var(--space-1); align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
|
||||
/* Une suite de valeurs (paliers, récompenses par place) prend deux colonnes, pour tenir sur une ligne. */
|
||||
fieldset.nebula-admin-expedition-field:has(.nebula-admin-expedition-items) { grid-column: span 2; }
|
||||
@container (max-width: 600px) { fieldset.nebula-admin-expedition-field:has(.nebula-admin-expedition-items) { grid-column: auto; } }
|
||||
.nebula-admin-expedition-field > span, .nebula-admin-expedition-field > legend { color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-admin-expedition-field > legend { margin-bottom: var(--space-1); padding: 0; }
|
||||
.nebula-admin-expedition-field > .nds-button { justify-self: start; }
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
.nebula-team-reserve > span { margin-right: var(--space-1); }
|
||||
.nebula-team-reserve i { display: grid; width: 24px; height: 24px; border: 2px dashed var(--color-border-hover); border-radius: 50%; color: transparent; font-size: var(--font-size-xs); font-style: normal; place-items: center; }
|
||||
.nebula-team-reserve i[data-full] { border: 2px solid var(--color-accent-gold); background: rgba(246, 196, 83, 0.14); color: var(--color-accent-gold); }
|
||||
.nebula-team-balms { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-team-balms img { width: 30px; height: 26px; object-fit: contain; }
|
||||
.nebula-team-balms strong { color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
|
||||
|
||||
// Compagnon : bordure et bandeau à la couleur de sa spécialité, ou des deux.
|
||||
.nebula-team-companion {
|
||||
|
|
@ -54,6 +57,13 @@ button.nebula-team-companion:hover:not(:disabled) .nebula-team-action { backgrou
|
|||
.nebula-team-list > li { display: grid; min-width: 0; }
|
||||
.nebula-team-so-far, .nebula-team-ready, .nebula-team-offer { display: grid; gap: var(--space-3); min-width: 0; }
|
||||
.nebula-team :is(.nebula-team-offer, .nebula-team-ready) > p { max-width: 70ch; color: var(--color-text-secondary); }
|
||||
.nebula-team-offer { grid-template-columns: minmax(0, 1fr); }
|
||||
.nebula-team-offer-pick { display: grid; gap: var(--space-3); justify-items: end; width: max-content; max-width: 100%; }
|
||||
.nebula-team-offer-pick > .nebula-team-offer-cards { justify-self: stretch; }
|
||||
.nebula-team-reroll { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) var(--space-3); color: var(--color-text-muted); font-size: var(--font-size-sm); }
|
||||
// Nouvelles propositions restantes : un petit badge doré dans le bouton, « ×2 ».
|
||||
.nebula-team-reroll .nds-button { display: inline-flex; align-items: center; gap: var(--space-2); }
|
||||
.nebula-team-reroll-count { padding: 0 6px; border: 1px solid var(--color-accent-gold); border-radius: var(--radius-pill); background: rgba(246, 196, 83, 0.14); color: var(--color-accent-gold); font-size: var(--font-size-xs); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.5; }
|
||||
.nebula-team-offer-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 230px)); gap: var(--space-4); }
|
||||
|
||||
.nebula-team-best { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
|
|
@ -61,15 +71,25 @@ button.nebula-team-companion:hover:not(:disabled) .nebula-team-action { backgrou
|
|||
.nebula-team-best .nebula-mask-icon { color: var(--specialty); }
|
||||
.nebula-team-best dt { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--specialty); font-weight: 600; }
|
||||
.nebula-team-best dd { font-variant-numeric: tabular-nums; font-weight: 800; }
|
||||
.nebula-team-guide { display: grid; gap: var(--space-3); max-width: 620px; }
|
||||
.nebula-team-guide :is(h2, h3, ol, ul) { margin: 0; }
|
||||
.nebula-team-guide h3 { font-size: var(--font-size-base); }
|
||||
.nebula-team-guide :is(ol, ul) { display: grid; gap: var(--space-2); padding-left: var(--space-5); color: var(--color-text-secondary); }
|
||||
|
||||
// Recrutement : le choix en cours, puis les étoiles restantes et l'équipe, à droite dès qu'il y a la place.
|
||||
.nebula-team-recruiting { display: grid; grid-template-areas: "stars" "main" "team" "members"; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
|
||||
.nebula-team-main { grid-area: main; min-width: 0; }
|
||||
.nebula-team-stars-left { grid-area: stars; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
|
||||
// Recrutement : le choix en cours dans un encadré bordé d'or (comme l'accueil), avec les étoiles restantes dedans (en colonne à
|
||||
// droite dès qu'il y a la place, en ligne au-dessus sinon), puis le bloc « Votre équipe » de la Guilde.
|
||||
.nebula-team-recruiting { display: grid; gap: var(--space-5); align-items: start; }
|
||||
.nds-panel.nebula-team-stage { display: grid; grid-template-areas: "steps" "stars" "main"; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); min-width: 0; padding: var(--space-5) var(--space-6) var(--space-6); border-color: rgba(246, 196, 83, 0.4); }
|
||||
.nebula-team-stage > .nebula-team-steps { grid-area: steps; }
|
||||
.nebula-team-stage-main { grid-area: main; min-width: 0; }
|
||||
.nebula-team-stage-side { grid-area: stars; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-3); align-items: stretch; min-width: 0; }
|
||||
.nebula-team-stage-best { display: grid; align-content: start; gap: var(--space-3); padding: var(--space-3) var(--space-4) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: rgba(7, 9, 19, 0.45); }
|
||||
// Mini-cartes de l'équipe en bref : la forme d'une carte, la couleur de la spécialité (bicolore en diagonale), l'icône et la Puissance.
|
||||
.nebula-team-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 56px)); gap: 6px; }
|
||||
.nebula-team-mini li { display: grid; align-content: center; gap: 2px; min-width: 0; border: 2px dashed rgba(245, 247, 255, 0.28); border-radius: var(--radius-sm); color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 800; aspect-ratio: 5 / 7; place-items: center; }
|
||||
.nebula-team-mini li[data-current] { border-color: var(--color-accent-gold); background: rgba(36, 29, 8, 0.75); color: var(--color-accent-gold); }
|
||||
.nebula-team-mini li[data-filled] { border: 0; background: linear-gradient(135deg, var(--specialty-start) 50%, var(--specialty-end) 50%); box-shadow: inset 0 0 0 2px rgba(7, 9, 19, 0.25), var(--shadow-sm); color: var(--color-text-inverse); }
|
||||
.nebula-team-mini-icons { display: flex; gap: 1px; }
|
||||
.nebula-team-mini li[data-filled] .nebula-mask-icon { width: 16px; height: 16px; color: var(--color-text-inverse); }
|
||||
.nebula-team-mini strong { font-size: var(--font-size-base); font-variant-numeric: tabular-nums; }
|
||||
.nebula-team-stage-best > p { color: var(--color-text-muted); font-size: var(--font-size-sm); }
|
||||
.nebula-team-stars-left { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: rgba(7, 9, 19, 0.45); }
|
||||
.nebula-team-stars-left ul { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.nebula-team-stars-left li { display: flex; align-items: center; gap: var(--space-2); padding: 3px var(--space-3) 3px 4px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-team-stars-left li[data-empty] { opacity: 0.45; }
|
||||
|
|
@ -78,10 +98,6 @@ button.nebula-team-companion:hover:not(:disabled) .nebula-team-action { backgrou
|
|||
.nebula-team-stars-left li[data-kind="black"] i { border-color: var(--color-text-secondary); background: #000; color: var(--color-text-primary); }
|
||||
.nebula-team-stars-left li[data-kind="dust"] i { border-color: #c4b5fd; background: #2c1d63; }
|
||||
.nebula-team-stars-left strong { color: var(--color-text-primary); font-size: var(--font-size-lg); font-variant-numeric: tabular-nums; }
|
||||
.nebula-team-summary { grid-area: team; display: grid; gap: var(--space-2); }
|
||||
.nebula-team-members { grid-area: members; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
|
||||
.nebula-team-members > li { display: grid; min-width: 0; }
|
||||
.nebula-team-slot { display: grid; min-height: 150px; border: 2px dashed var(--color-border-hover); border-radius: var(--radius-md); color: var(--color-text-muted); font-size: var(--font-size-xs); place-items: center; }
|
||||
// Petit compagnon : l'illustration moins haute, sans les stats secondaires.
|
||||
.nebula-team-companion[data-size="sm"] .nebula-team-art { aspect-ratio: 4 / 3; }
|
||||
.nebula-team-companion[data-size="sm"] .nebula-team-band > span { padding-block: 1px; font-size: var(--font-size-xs); }
|
||||
|
|
@ -90,14 +106,18 @@ button.nebula-team-companion:hover:not(:disabled) .nebula-team-action { backgrou
|
|||
.nebula-team-companion[data-size="sm"] .nebula-team-strong { font-size: var(--font-size-base); }
|
||||
.nebula-team-companion[data-size="sm"] .nebula-team-fate { padding-top: 2px; }
|
||||
|
||||
.nebula-team-steps { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.nebula-team-steps li { padding: 2px var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-pill); color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 600; }
|
||||
.nebula-team-steps li[data-current] { border-color: var(--color-accent-gold); color: var(--color-accent-gold); }
|
||||
// Étapes d'un compagnon : les numéros dorés de l'accueil, l'étape en cours allumée.
|
||||
.nebula-team-steps { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
|
||||
.nebula-team-steps li { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); font-weight: 700; }
|
||||
.nebula-team-steps li > span { display: grid; width: 28px; height: 28px; border: 2px solid var(--color-border-hover); border-radius: 50%; font-size: var(--font-size-sm); place-items: center; }
|
||||
.nebula-team-steps li[data-current] { color: var(--color-text-primary); }
|
||||
.nebula-team-steps li[data-current] > span { border-color: var(--color-accent-gold); background: rgba(7, 9, 19, 0.85); color: var(--color-accent-gold); }
|
||||
|
||||
// Amélioration : le compagnon à gauche, les étoiles à droite.
|
||||
.nebula-team-improve { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
|
||||
.nebula-team-improve > h3 { grid-column: 1 / -1; }
|
||||
.nds-panel.nebula-team-stars-panel { display: grid; gap: var(--space-3); min-width: 0; padding: var(--space-4) var(--space-5); }
|
||||
.nebula-team-stars-panel { display: grid; gap: var(--space-3); min-width: 0; }
|
||||
.nds-panel.nebula-team-stars-panel { padding: var(--space-4) var(--space-5); }
|
||||
.nebula-team-ladder { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: var(--space-2); }
|
||||
.nebula-team-ladder li { display: grid; padding: var(--space-2) var(--space-1); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text-muted); text-align: center; }
|
||||
.nebula-team-ladder strong { font-size: var(--font-size-xl); font-variant-numeric: tabular-nums; line-height: 1.2; }
|
||||
|
|
@ -132,25 +152,101 @@ button.nebula-team-companion:hover:not(:disabled) .nebula-team-action { backgrou
|
|||
.nebula-team-confirm { display: grid; gap: var(--space-3); margin: 0; }
|
||||
.nebula-team > .nds-inline-notice { margin: 0; }
|
||||
|
||||
// « Votre équipe », le même bloc sur la Guilde et ici : la table de l'équipe en fond à droite, les fiches de taille fixe pour aérer,
|
||||
// les places à pourvoir en pointillés numérotés comme sur l'accueil, puis les points forts.
|
||||
.nds-panel.nebula-team-table { position: relative; display: grid; gap: var(--space-3); justify-items: start; overflow: hidden; padding: var(--space-4) var(--space-5) var(--space-5); }
|
||||
.nebula-team-table > :not(.nebula-team-table-bg) { position: relative; z-index: 1; }
|
||||
.nds-panel.nebula-team-table > .nebula-team-table-bg { position: absolute; inset: 0 0 0 auto; width: 45%; height: 100%; object-fit: cover; object-position: 60% 80%; opacity: 0.55; mask-image: linear-gradient(90deg, transparent, #000 55%); }
|
||||
.nebula-team-table :is(h3, p, ol, dl, dd) { margin: 0; }
|
||||
.nebula-team-table ol { padding: 0; list-style: none; }
|
||||
.nebula-team-table-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); justify-self: stretch; }
|
||||
.nebula-team-table-head > .nds-button { margin-left: auto; }
|
||||
.nebula-team-table-head h3 { font-size: var(--font-size-lg); }
|
||||
.nebula-team-table-head h3:focus { outline: none; }
|
||||
.nebula-team-table-head p { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-team-days { display: inline-flex; gap: 4px; }
|
||||
.nebula-team-days i { width: 18px; height: 7px; border-radius: var(--radius-pill); background: rgba(245, 247, 255, 0.28); }
|
||||
.nebula-team-days i[data-on] { background: var(--color-accent-gold); }
|
||||
.nebula-team-table-list { display: grid; grid-template-columns: repeat(5, minmax(0, 168px)); gap: var(--space-3); }
|
||||
.nebula-team-table[data-size="md"] .nebula-team-table-list { grid-template-columns: repeat(5, minmax(0, 210px)); }
|
||||
.nebula-team-table-list > li { display: grid; min-width: 0; }
|
||||
.nebula-team-table .nebula-team-companion[data-size="sm"] .nebula-team-art { aspect-ratio: 16 / 10; }
|
||||
.nebula-team-table-slot { display: grid; align-content: center; gap: var(--space-1); min-height: 140px; padding: var(--space-3); border: 2px dashed rgba(245, 247, 255, 0.3); border-radius: var(--radius-md); background: rgba(7, 9, 19, 0.5); color: var(--color-text-muted); font-size: var(--font-size-sm); font-weight: 600; text-align: center; place-items: center; }
|
||||
.nebula-team-table-slot strong { color: var(--color-text-secondary); font-size: var(--font-size-xl); }
|
||||
.nebula-team-table-slot[data-current] { border-color: var(--color-accent-gold); background: rgba(36, 29, 8, 0.75); color: var(--color-accent-gold); }
|
||||
.nebula-team-table-slot[data-current] strong { color: var(--color-accent-gold); }
|
||||
.nebula-team-table-best { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
|
||||
.nebula-team-table-best > span { color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-team-table-best .nebula-team-best > div { background: rgba(7, 9, 19, 0.75); }
|
||||
.nebula-team-best dd { margin: 0; }
|
||||
|
||||
// Accueil sans équipe : un bandeau d'appel devant la table de l'équipe, cinq places à pourvoir, puis trois étapes illustrées.
|
||||
.nds-panel.nebula-team-welcome { position: relative; overflow: hidden; padding: var(--space-6); border-color: rgba(246, 196, 83, 0.4); }
|
||||
.nds-panel.nebula-team-welcome > .nebula-team-welcome-bg { position: absolute; inset: 0 0 0 auto; width: 55%; height: 100%; object-fit: cover; object-position: 55% 75%; opacity: 0.75; mask-image: linear-gradient(90deg, transparent, #000 45%); }
|
||||
.nebula-team-welcome-copy { position: relative; z-index: 1; display: grid; gap: var(--space-4); justify-items: start; max-width: 560px; }
|
||||
.nebula-team-welcome-copy h3 { font-size: var(--font-size-xl); }
|
||||
.nebula-team-welcome-copy > p { color: var(--color-text-secondary); }
|
||||
.nebula-team-welcome-copy .nds-inline-notice { margin: 0; }
|
||||
.nebula-team-welcome-slots { display: flex; gap: var(--space-2); }
|
||||
.nebula-team-welcome-slots li { display: grid; width: 56px; aspect-ratio: 3 / 4; border: 2px dashed rgba(245, 247, 255, 0.35); border-radius: var(--radius-md); background: rgba(7, 9, 19, 0.6); color: var(--color-text-muted); font-weight: 800; place-items: center; }
|
||||
.nebula-team-welcome-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
|
||||
.nebula-team-welcome-steps > .nds-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; padding: 0; }
|
||||
.nebula-team-welcome-visual { position: relative; display: grid; height: 130px; background: radial-gradient(circle at 50% 120%, rgba(124, 58, 237, 0.35), transparent 70%), var(--color-bg-deep); place-items: center; }
|
||||
.nebula-team-welcome-number { position: absolute; top: var(--space-3); left: var(--space-3); display: grid; width: 30px; height: 30px; border: 2px solid var(--color-accent-gold); border-radius: 50%; background: rgba(7, 9, 19, 0.85); color: var(--color-accent-gold); font-weight: 800; place-items: center; }
|
||||
.nebula-team-welcome-steps .nds-card-body { display: grid; align-content: start; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-5); }
|
||||
.nebula-team-welcome-steps h4 { margin: 0; font-size: var(--font-size-lg); }
|
||||
.nebula-team-welcome-steps .nds-card-body p { color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-team .nebula-team-welcome-steps .nebula-team-welcome-tip { padding-top: var(--space-2); border-top: 1px solid var(--color-border); color: var(--color-accent-gold); }
|
||||
.nebula-team-welcome-fan { display: flex; }
|
||||
.nebula-team-welcome-fan img { width: 76px; aspect-ratio: 3 / 4; border: 2px solid var(--color-border-hover); border-radius: var(--radius-md); object-fit: cover; box-shadow: var(--shadow-md); }
|
||||
.nebula-team-welcome-fan img:nth-child(1) { transform: rotate(-10deg) translateX(10px); }
|
||||
.nebula-team-welcome-fan img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-6px); }
|
||||
.nebula-team-welcome-fan img:nth-child(3) { transform: rotate(10deg) translateX(-10px); }
|
||||
.nebula-team-welcome-stars { display: flex; gap: var(--space-2); }
|
||||
.nebula-team-welcome-stars i { display: grid; width: 38px; height: 38px; border: 2px solid var(--color-border-hover); border-radius: 50%; background: rgba(245, 247, 255, 0.06); color: var(--color-text-muted); font-size: var(--font-size-lg); font-style: normal; font-weight: 800; place-items: center; }
|
||||
.nebula-team-welcome-stars i[data-kind="gold"] { border-color: var(--color-accent-gold); background: #241d08; color: var(--color-accent-gold); }
|
||||
.nebula-team-welcome-stars i[data-kind="black"] { border-color: var(--color-text-secondary); background: #000; color: var(--color-text-primary); }
|
||||
.nebula-team-welcome-stars i[data-kind="dust"] { border-color: #c4b5fd; background: #2c1d63; }
|
||||
.nebula-team-welcome-days { display: flex; gap: var(--space-2); }
|
||||
.nebula-team-welcome-days i { display: grid; width: 48px; height: 48px; border: 2px solid var(--color-accent-gold); border-radius: var(--radius-md); background: rgba(246, 196, 83, 0.12); color: var(--color-accent-gold); font-size: var(--font-size-lg); font-style: normal; font-weight: 800; place-items: center; }
|
||||
|
||||
@container nebula-team (min-width: 1040px) {
|
||||
.nebula-team-recruiting { grid-template-areas: "main stars" "team ." "members ."; grid-template-columns: minmax(0, 1fr) 300px; }
|
||||
.nebula-team-stars-left { display: grid; gap: var(--space-2); }
|
||||
.nds-panel.nebula-team-stage { grid-template-areas: "steps stars" "main stars"; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; column-gap: var(--space-6); }
|
||||
.nebula-team-stage-side { grid-template-columns: minmax(0, 1fr); align-content: start; }
|
||||
.nebula-team-stars-left { display: grid; align-content: start; gap: var(--space-3); padding: var(--space-4); }
|
||||
.nebula-team-stage-best .nebula-team-best { display: grid; }
|
||||
.nebula-team-stage-best .nebula-team-best > div { justify-content: space-between; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); }
|
||||
.nebula-team-stars-left ul { display: grid; }
|
||||
.nebula-team-stars-left li { border-radius: var(--radius-md); padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2); }
|
||||
.nebula-team-offer-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 840px; }
|
||||
.nebula-team-offer-cards { grid-template-columns: repeat(3, minmax(0, 280px)); }
|
||||
}
|
||||
|
||||
// Trois étapes en colonnes étroites : visuels un peu plus petits, sous le numéro.
|
||||
@container nebula-team (min-width: 761px) and (max-width: 1100px) {
|
||||
.nebula-team-welcome-visual { height: 140px; padding-top: var(--space-6); }
|
||||
.nebula-team-welcome-fan img { width: 60px; }
|
||||
.nebula-team-welcome-stars { gap: 6px; }
|
||||
.nebula-team-welcome-stars i { width: 32px; height: 32px; font-size: var(--font-size-base); }
|
||||
.nebula-team-welcome-days i { width: 40px; height: 40px; }
|
||||
}
|
||||
|
||||
@container nebula-team (max-width: 760px) {
|
||||
.nebula-team-welcome-steps { grid-template-columns: minmax(0, 1fr); }
|
||||
.nebula-team-welcome-steps > .nds-card { grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: none; }
|
||||
.nebula-team-welcome-visual { height: auto; min-height: 120px; padding-left: var(--space-6); }
|
||||
.nebula-team-welcome-fan img { width: 58px; }
|
||||
.nebula-team-welcome-stars { gap: 6px; }
|
||||
.nebula-team-welcome-stars i { width: 32px; height: 32px; font-size: var(--font-size-base); }
|
||||
.nebula-team-welcome-days i { width: 40px; height: 40px; }
|
||||
.nds-panel.nebula-team-welcome > .nebula-team-welcome-bg { width: 80%; opacity: 0.4; }
|
||||
.nebula-team-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
||||
.nebula-team-improve { grid-template-columns: 170px minmax(0, 1fr); }
|
||||
.nebula-team-offer-cards { gap: var(--space-3); }
|
||||
}
|
||||
|
||||
@container nebula-team (max-width: 620px) {
|
||||
.nebula-team-members { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
||||
}
|
||||
|
||||
@container nebula-team (max-width: 520px) {
|
||||
.nebula-team-welcome-steps > .nds-card { grid-template-columns: minmax(0, 1fr); }
|
||||
.nebula-team-welcome-visual { padding-left: 0; }
|
||||
.nebula-team-improve { grid-template-columns: minmax(0, 1fr); }
|
||||
.nebula-team-improve > .nebula-team-companion { max-width: 200px; }
|
||||
.nebula-team-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
|
|
@ -159,3 +255,12 @@ button.nebula-team-companion:hover:not(:disabled) .nebula-team-action { backgrou
|
|||
@media (prefers-reduced-motion: reduce) {
|
||||
:is(button.nebula-team-companion, .nebula-team-star) { transition: none; }
|
||||
}
|
||||
|
||||
// « Votre équipe » dans un conteneur étroit (page Équipe ou Guilde) : la table passe derrière, les fiches sur trois colonnes.
|
||||
@container (max-width: 760px) {
|
||||
.nds-panel.nebula-team-table > .nebula-team-table-bg { width: 80%; opacity: 0.35; }
|
||||
.nebula-team-table-list, .nebula-team-table[data-size="md"] .nebula-team-table-list { gap: var(--space-2); }
|
||||
}
|
||||
@container (max-width: 620px) {
|
||||
.nebula-team-table-list, .nebula-team-table[data-size="md"] .nebula-team-table-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue