Add solo Expeditions, the second Guilde des Veilleurs quest of Sokko TCG
- Every catalog card carries expedition tags and every collection a stat profile, validated at load; twelve destinations live server-side so hidden ones stay secret. - Pure rules compute card power, per-slot requirements, roles, dangers, the long-trip malus, the score (one more star never raises it) and loot proportional to the chosen duration. - A simulator script and a balance test guard the design thresholds; agent docs and a new-card skill explain how to tag new cards. - Migration 8 adds Éclats d'étoile, expedition settings stored as one validated JSON, daily destinations, expeditions, members and slots, and rebuilds gift_packs so a pack can come from an expedition. - Players launch a solo expedition from the Guild, see an exact preview, and claim their loot when it returns; the card sheet shows cards away on an expedition. - Administration › Guilde tunes every value with server-side bounds, toggles destinations and cancels running expeditions; expeditions stay closed until an administrator opens them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0ef213cf4f
commit
8bb1d53d70
46 changed files with 4752 additions and 213 deletions
|
|
@ -11,6 +11,7 @@ export function CardDetailModal({ catalog, state, entry, runMutation, busy, onCl
|
|||
const spare = owned?.spare || 0;
|
||||
const value = state.shop.stardustValues[entry.edition.rarity] ?? 0;
|
||||
const favorites = new Set(state.favorites);
|
||||
const expedition = state.expeditions?.busyEditions?.find((item) => item.editionId === entry.edition.id);
|
||||
|
||||
return <Modal dialogClassName="confirm-modal nds-modal nebula-card-detail" labelledBy="nebula-card-detail-title" onRequestClose={onClose}>
|
||||
<div className="nebula-card-detail-layout"><NebulaCard catalog={catalog} entry={entry} size="lg" />
|
||||
|
|
@ -23,6 +24,7 @@ export function CardDetailModal({ catalog, state, entry, runMutation, busy, onCl
|
|||
<button className="nds-button" data-variant="secondary" type="button" onClick={() => onStartTransfer("trade", entry.edition.id)}>Échanger</button>
|
||||
</>}
|
||||
<button className="nds-button" data-variant="secondary" type="button" onClick={onClose}>Fermer</button>
|
||||
{expedition && <p className="nebula-form-help">En expédition jusqu’à {new Date(expedition.returnsAt).toLocaleString("fr-FR", { weekday: "long", hour: "2-digit", minute: "2-digit" })}.</p>}
|
||||
{quantity > 1 && !spare && <p className="nebula-form-help">Les doublons de cette carte sont réservés par une proposition d’échange en cours.</p>}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { CardsAccount, CardsDashboardLayout } from "./CardsDashboard.jsx";
|
|||
import { CardsHomePanel } from "./CardsHomePanel.jsx";
|
||||
import { CollectionPanel } from "./CollectionPanel.jsx";
|
||||
import { DailyPanel } from "./DailyPanel.jsx";
|
||||
import { ExpeditionsPanel } from "./ExpeditionsPanel.jsx";
|
||||
import { HistoryPanel } from "./HistoryPanel.jsx";
|
||||
import { PackPanel } from "./PackPanel.jsx";
|
||||
import { publishCardsReserve } from "./cardsReserve.js";
|
||||
|
|
@ -21,7 +22,7 @@ import { TransfersPanel } from "./TransfersPanel.jsx";
|
|||
// Le jeu, puis l'économie et les échanges, puis le journal : mêmes groupes séparés par un filet que l'administration.
|
||||
const PLAYER_NAVIGATION = [["home", "guild", "packs", "collection"], ["shop", "transfers"], ["history", "account"]];
|
||||
// Sections sans entrée de menu, ouvertes depuis une autre : le menu y désigne cette section parente.
|
||||
const SUBSECTION_PARENTS = { daily: "guild" };
|
||||
const SUBSECTION_PARENTS = { daily: "guild", expeditions: "guild" };
|
||||
const PLAYER_SECTIONS = new Set([...PLAYER_NAVIGATION.flat(), ...Object.keys(SUBSECTION_PARENTS)]);
|
||||
// Ancienne adresse conservée pour les favoris : le recyclage vit désormais dans la Collection.
|
||||
const PLAYER_SECTION_ALIASES = { recycling: "collection" };
|
||||
|
|
@ -274,6 +275,7 @@ export function CardsPage({ siteContent, cardsConfig, playerSection = "", adminM
|
|||
{section === "home" && <CardsHomePanel {...panelProps} content={content.home} guildContent={content.guild} onOpenPacks={openPacks} />}
|
||||
{section === "guild" && <GuildPanel catalog={catalog} state={state} content={content.guild} />}
|
||||
{section === "daily" && <DailyPanel {...panelProps} content={content.daily} />}
|
||||
{section === "expeditions" && <ExpeditionsPanel {...panelProps} content={content.expeditions} />}
|
||||
{section === "packs" && <PackPanel {...panelProps} content={content.packs} reserveContent={content.home} />}
|
||||
{section === "collection" && <CollectionPanel {...panelProps} headingContent={content.collection} recyclingContent={content.recycling} onStartTransfer={startTransfer} />}
|
||||
{section === "shop" && <ShopPanel {...panelProps} content={content.shop} onOpenPacks={openPacks} />}
|
||||
|
|
|
|||
143
website/src/features/cards/ExpeditionPlanner.jsx
Normal file
143
website/src/features/cards/ExpeditionPlanner.jsx
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
// Rôle : prépare une expédition solo : destination du jour, difficulté, durée, équipe par rôle et aperçu exact avant le départ.
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { previewExpedition } from "./cardsApi.js";
|
||||
import { fillTemplate } from "./dailyShare.js";
|
||||
import { conditionText, coverEntry, dangerText, editionEntry, formatDecimal, formatEclats, STAT_IDS } from "./expeditionFormat.js";
|
||||
import { NebulaCard } from "./NebulaCard.jsx";
|
||||
|
||||
const PREVIEW_DELAY_MS = 250;
|
||||
const TIER_VARIANTS = { struggle: "neutral", success: "success", triumph: "gold" };
|
||||
|
||||
function StatLine({ stats, content }) {
|
||||
return <span className="nebula-expedition-stats">{STAT_IDS.map((stat) => <span key={stat} title={content.stats[stat]}>{content.statShort[stat]} {formatDecimal(stats[stat])}</span>)}</span>;
|
||||
}
|
||||
|
||||
function Requirements({ catalog, option, content }) {
|
||||
return <div className="nebula-expedition-requirements">
|
||||
<h4>{content.requirementsTitle}</h4>
|
||||
<ul>{option.requirements.map((requirement) => <li key={requirement.stat}>
|
||||
<span>{content.stats[requirement.stat]}{requirement.main && <span className="nds-badge" data-variant="neutral">{content.main}</span>}</span>
|
||||
<strong>{requirement.value}</strong>
|
||||
</li>)}</ul>
|
||||
{option.condition && <p>{conditionText(option.condition, catalog, content)}</p>}
|
||||
{option.dangers.map((danger) => <p key={danger.id}>{dangerText(danger, catalog, content)}</p>)}
|
||||
</div>;
|
||||
}
|
||||
|
||||
function Preview({ preview, content }) {
|
||||
return <div className="nebula-expedition-preview" aria-live="polite">
|
||||
<div className="nebula-expedition-rewards">
|
||||
<span className="nds-badge" data-variant={TIER_VARIANTS[preview.tier]}>{content.tiers[preview.tier]}</span>
|
||||
<span className="nds-badge" data-variant="neutral">{fillTemplate(content.score, { score: formatEclats(preview.scorePct) })}</span>
|
||||
{preview.limitedByStars && <span className="nds-badge" data-variant="warning">{fillTemplate(content.limitedByStars, { stars: preview.limitedByStars })}</span>}
|
||||
</div>
|
||||
<ul className="nebula-expedition-checks">{preview.requirements.map((requirement) => <li key={requirement.stat} data-met={requirement.ratioPct >= 100 || undefined}>
|
||||
<span>{content.stats[requirement.stat]}</span><strong>{fillTemplate(content.teamVersus, { team: formatDecimal(requirement.team), value: requirement.value })}</strong>
|
||||
</li>)}</ul>
|
||||
{preview.conditionMet != null && <p className="nds-inline-notice" data-variant={preview.conditionMet ? "success" : "warning"}>{preview.conditionMet ? content.conditionMet : content.conditionUnmet}</p>}
|
||||
{preview.dangers.map((danger) => <p key={danger.id} className="nds-inline-notice" data-variant={danger.countered ? "success" : "warning"}>{fillTemplate(danger.countered ? content.dangerCountered : content.dangerActive, { label: danger.label })}</p>)}
|
||||
{preview.durationFactor < 1 && <p className="nds-inline-notice" data-variant="warning">{content.durationMalus}</p>}
|
||||
<p className="nebula-expedition-expected">{fillTemplate(content.expected, { eclats: formatEclats(preview.expected.eclats), stardust: formatEclats(preview.expected.stardust), pack: formatEclats(preview.expected.packChancePct) })}</p>
|
||||
</div>;
|
||||
}
|
||||
|
||||
export function ExpeditionPlanner({ catalog, view, content, busy, onStart }) {
|
||||
const [destinationId, setDestinationId] = useState(view.destinations[0]?.id || "");
|
||||
const [stars, setStars] = useState(view.stars.min);
|
||||
const [hours, setHours] = useState(view.durations[0]);
|
||||
const [slots, setSlots] = useState(() => Array.from({ length: view.soloCards }, () => null));
|
||||
const [activeSlot, setActiveSlot] = useState(0);
|
||||
const [preview, setPreview] = useState({ key: "", value: null, error: "" });
|
||||
const destination = view.destinations.find((item) => item.id === destinationId) || view.destinations[0];
|
||||
const option = destination?.stars[stars];
|
||||
const complete = Boolean(destination && slots.every(Boolean));
|
||||
const body = useMemo(() => ({ day: view.day, destinationId: destination?.id, difficulty: stars, durationHours: hours, slots }), [view.day, destination?.id, stars, hours, slots]);
|
||||
const bodyKey = JSON.stringify(body);
|
||||
|
||||
// Aperçu demandé au serveur dès que l'équipe est complète, après une courte pause pour ne pas l'interroger à chaque clic.
|
||||
useEffect(() => {
|
||||
if (!complete) return undefined;
|
||||
let active = true;
|
||||
const timer = setTimeout(() => {
|
||||
previewExpedition(JSON.parse(bodyKey))
|
||||
.then((result) => { if (active) setPreview({ key: bodyKey, value: result.preview, error: "" }); })
|
||||
.catch((error) => { if (active) setPreview({ key: bodyKey, value: null, error: error.message }); });
|
||||
}, PREVIEW_DELAY_MS);
|
||||
return () => { active = false; clearTimeout(timer); };
|
||||
}, [bodyKey, complete]);
|
||||
|
||||
const roleStat = destination?.roles[activeSlot];
|
||||
const cards = useMemo(() => [...view.cards].sort((a, b) => Number(a.busy) - Number(b.busy) || (b.stats[roleStat] ?? 0) - (a.stats[roleStat] ?? 0) || b.power - a.power), [view.cards, roleStat]);
|
||||
if (!destination) return <div className="nds-empty-state"><p>{content.noDestination}</p></div>;
|
||||
|
||||
function choose(card) {
|
||||
const next = slots.map((editionId, index) => (index !== activeSlot && editionId && editionEntry(catalog, editionId)?.card.id === card.cardId ? null : editionId));
|
||||
next[activeSlot] = card.editionId;
|
||||
setSlots(next);
|
||||
const empty = next.findIndex((editionId) => !editionId);
|
||||
if (empty >= 0) setActiveSlot(empty);
|
||||
}
|
||||
|
||||
const shownPreview = complete && preview.key === bodyKey ? preview : null;
|
||||
return <div className="nebula-expedition-planner">
|
||||
<section className="nds-panel nebula-expedition-step" aria-labelledby="nebula-expedition-destinations-title">
|
||||
<h3 id="nebula-expedition-destinations-title">{content.destinationsTitle}</h3>
|
||||
<div className="nebula-expedition-destinations">{view.destinations.map((item) => {
|
||||
const cover = item.coverCardId && coverEntry(catalog, item.coverCardId);
|
||||
return <button key={item.id} type="button" className="nebula-expedition-destination" aria-pressed={item.id === destination.id} onClick={() => setDestinationId(item.id)}>
|
||||
{cover && <img src={cover.card.image} alt="" />}
|
||||
<span className="nebula-expedition-destination-copy">
|
||||
<strong>{item.name}</strong>
|
||||
<span>{item.description}</span>
|
||||
<span className="nebula-expedition-destination-roles">{item.roles.map((stat) => <span key={stat} className="nds-badge" data-variant="neutral">{fillTemplate(content.roleBadge, { role: content.roles[stat], stat: content.stats[stat] })}</span>)}</span>
|
||||
</span>
|
||||
</button>;
|
||||
})}</div>
|
||||
</section>
|
||||
|
||||
<section className="nds-panel nebula-expedition-step" aria-labelledby="nebula-expedition-settings-title">
|
||||
<h3 id="nebula-expedition-settings-title">{content.difficultyTitle}</h3>
|
||||
<div className="nebula-expedition-choices">
|
||||
<div role="group" aria-label={content.difficultyLabel} className="nds-toolbar">{Object.keys(destination.stars).map(Number).map((value) => <button key={value} type="button" className="nds-button" data-size="sm" data-variant={value === stars ? "primary" : "secondary"} aria-pressed={value === stars} onClick={() => setStars(value)}>{"★".repeat(value)}</button>)}</div>
|
||||
<div role="group" aria-label={content.durationLabel} className="nds-toolbar">{view.durations.map((value) => <button key={value} type="button" className="nds-button" data-size="sm" data-variant={value === hours ? "primary" : "secondary"} aria-pressed={value === hours} onClick={() => setHours(value)}>{fillTemplate(content.hours, { hours: value })}</button>)}</div>
|
||||
</div>
|
||||
{option && <Requirements catalog={catalog} option={option} content={content} />}
|
||||
</section>
|
||||
|
||||
<section className="nds-panel nebula-expedition-step" aria-labelledby="nebula-expedition-team-title">
|
||||
<h3 id="nebula-expedition-team-title">{content.teamTitle}</h3>
|
||||
<p className="nebula-form-help">{fillTemplate(content.teamHelp, { count: view.soloCards })}</p>
|
||||
<div className="nebula-expedition-slots">{slots.map((editionId, index) => {
|
||||
const entry = editionId && editionEntry(catalog, editionId);
|
||||
const stat = destination.roles[index];
|
||||
return <div key={index} className="nebula-expedition-slot" data-active={index === activeSlot || undefined}>
|
||||
<button type="button" className="nds-button" data-size="sm" data-variant={index === activeSlot ? "primary" : "secondary"} aria-pressed={index === activeSlot} onClick={() => setActiveSlot(index)}>
|
||||
{fillTemplate(content.roleBadge, { role: content.roles[stat], stat: content.stats[stat] })}
|
||||
</button>
|
||||
<span>{entry ? entry.card.name : content.slotEmpty}</span>
|
||||
{entry && <button type="button" className="nds-button" data-size="sm" data-variant="secondary" onClick={() => { setSlots(slots.map((value, position) => (position === index ? null : value))); setActiveSlot(index); }}>{content.remove}</button>}
|
||||
</div>;
|
||||
})}</div>
|
||||
{cards.length ? <ul className="nebula-expedition-cards" aria-label={content.cardsLabel}>{cards.map((card) => {
|
||||
const entry = editionEntry(catalog, card.editionId);
|
||||
if (!entry) return null;
|
||||
const selected = slots.includes(card.editionId);
|
||||
return <li key={card.editionId} data-busy={card.busy || undefined}>
|
||||
<NebulaCard catalog={catalog} entry={entry} size="sm" selected={selected} disabled={card.busy} onSelect={card.busy ? undefined : () => choose(card)} selectLabel={fillTemplate(content.chooseCard, { card: entry.card.name, role: content.roles[roleStat] })} />
|
||||
<span className="nebula-expedition-card-power">{card.busy ? content.busy : fillTemplate(content.power, { power: card.power })}</span>
|
||||
<StatLine stats={card.stats} content={content} />
|
||||
</li>;
|
||||
})}</ul> : <p className="nds-inline-notice" data-variant="info">{fillTemplate(content.noCards, { count: view.soloCards })}</p>}
|
||||
</section>
|
||||
|
||||
<section className="nds-panel nebula-expedition-step" aria-labelledby="nebula-expedition-preview-title">
|
||||
<h3 id="nebula-expedition-preview-title">{content.previewTitle}</h3>
|
||||
{!complete && <p className="nebula-form-help">{fillTemplate(content.previewEmpty, { count: view.soloCards })}</p>}
|
||||
{shownPreview?.error && <p className="nds-inline-notice" data-variant="warning" role="status">{shownPreview.error}</p>}
|
||||
{shownPreview?.value && <Preview preview={shownPreview.value} content={content} />}
|
||||
<div className="nds-toolbar">
|
||||
<button className="nds-button" data-variant="primary" type="button" disabled={busy || !complete} onClick={async () => { if (await onStart(body)) setSlots(slots.map(() => null)); }}>{content.start}</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>;
|
||||
}
|
||||
45
website/src/features/cards/ExpeditionReport.jsx
Normal file
45
website/src/features/cards/ExpeditionReport.jsx
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
// Rôle : présente une expédition du joueur : en route (compte à rebours), revenue (butin à récupérer), terminée ou annulée.
|
||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
||||
import { coverEntry, editionEntry, formatEclats } from "./expeditionFormat.js";
|
||||
import { NebulaCard } from "./NebulaCard.jsx";
|
||||
import { formatStardust } from "./stardustFormat.js";
|
||||
|
||||
const TIER_VARIANTS = { struggle: "neutral", success: "success", triumph: "gold" };
|
||||
|
||||
function RewardBadges({ reward, content }) {
|
||||
return <div className="nebula-expedition-rewards">
|
||||
<span className="nds-badge" data-variant="gold">{fillTemplate(content.rewardEclats, { value: formatEclats(reward.eclats) })}</span>
|
||||
{reward.stardust > 0 && <span className="nds-badge" data-variant="neutral">{fillTemplate(content.rewardStardust, { value: formatStardust(reward.stardust) })}</span>}
|
||||
{reward.packs.length > 0 && <span className="nds-badge" data-variant="success">{fillTemplate(content.rewardPacks, { count: reward.packs.length, s: reward.packs.length > 1 ? "s" : "" })}</span>}
|
||||
</div>;
|
||||
}
|
||||
|
||||
export function ExpeditionReport({ catalog, expedition, content, now, busy, onClaim }) {
|
||||
// Le serveur dit « en route » au chargement ; passé l'heure du retour, la page propose déjà de récupérer le butin.
|
||||
const status = expedition.status === "running" && expedition.returnsAt <= now ? "returned" : expedition.status;
|
||||
const cover = expedition.destination.coverCardId && coverEntry(catalog, expedition.destination.coverCardId);
|
||||
const stars = "★".repeat(expedition.stars);
|
||||
return <article className="nds-card nebula-expedition-report" data-status={status} aria-labelledby={`nebula-expedition-${expedition.id}`}>
|
||||
{cover && <div className="nds-card-cover nebula-expedition-report-cover" aria-hidden="true"><img src={cover.card.image} alt="" /></div>}
|
||||
<div className="nds-card-body nebula-expedition-report-body">
|
||||
<p className="eyebrow">{fillTemplate(content.reportMeta, { stars, hours: expedition.hours })}</p>
|
||||
<h3 id={`nebula-expedition-${expedition.id}`}>{expedition.destination.name}</h3>
|
||||
{status === "running" && <p className="nebula-expedition-report-status">{fillTemplate(content.running, { time: formatCountdown(expedition.returnsAt - now) })}</p>}
|
||||
{status === "returned" && <p className="nebula-expedition-report-status">{content.returned}</p>}
|
||||
{status === "completed" && <p className="nebula-expedition-report-status">{content.completed}</p>}
|
||||
{status === "cancelled" && <p className="nebula-expedition-report-status">{content.cancelled}</p>}
|
||||
{expedition.result && <div className="nebula-expedition-rewards">
|
||||
<span className="nds-badge" data-variant={TIER_VARIANTS[expedition.result.tier]}>{content.tiers[expedition.result.tier]}</span>
|
||||
<span className="nds-badge" data-variant="neutral">{fillTemplate(content.score, { score: formatEclats(expedition.result.scorePct) })}</span>
|
||||
</div>}
|
||||
{expedition.reward && <RewardBadges reward={expedition.reward} content={content} />}
|
||||
<ul className="nebula-expedition-report-team" aria-label={content.teamTitle}>{expedition.slots.filter((slot) => slot.editionId).map((slot) => {
|
||||
const entry = editionEntry(catalog, slot.editionId);
|
||||
return entry && <li key={slot.position}><NebulaCard catalog={catalog} entry={entry} size="sm" /><span>{slot.role ? content.roles[slot.role] : content.noRole}</span></li>;
|
||||
})}</ul>
|
||||
{status === "returned" && !expedition.claimedAt && <div className="nds-card-actions">
|
||||
<button className="nds-button" data-size="sm" data-variant="primary" type="button" disabled={busy} onClick={() => onClaim(expedition.id)}>{content.claim}</button>
|
||||
</div>}
|
||||
</div>
|
||||
</article>;
|
||||
}
|
||||
90
website/src/features/cards/ExpeditionsPanel.jsx
Normal file
90
website/src/features/cards/ExpeditionsPanel.jsx
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
// Rôle : présente les Expéditions, quête de la Guilde : expéditions du joueur (retour, butin) et préparation d'une expédition solo.
|
||||
import { useEffect, useState } from "react";
|
||||
import { claimExpedition, loadExpeditions, startExpedition } from "./cardsApi.js";
|
||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
||||
import { ExpeditionPlanner } from "./ExpeditionPlanner.jsx";
|
||||
import { ExpeditionReport } from "./ExpeditionReport.jsx";
|
||||
import { formatEclats } from "./expeditionFormat.js";
|
||||
|
||||
const COUNTDOWN_TICK_MS = 30_000;
|
||||
|
||||
// Les refus propres aux Expéditions restent dans ce panneau ; runMutation garde le reste (réseau, session).
|
||||
const expeditionCall = (call) => async () => {
|
||||
try {
|
||||
return await call();
|
||||
} catch (error) {
|
||||
if (String(error.code || "").startsWith("EXPEDITION")) return { expeditionError: error };
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export function ExpeditionsPanel({ catalog, state, runMutation, busy, content }) {
|
||||
const [view, setView] = useState(null);
|
||||
const [loadError, setLoadError] = useState("");
|
||||
const [reloadKey, setReloadKey] = useState(0);
|
||||
const [notice, setNotice] = useState(null);
|
||||
const [now, setNow] = useState(() => Date.now());
|
||||
|
||||
useEffect(() => {
|
||||
let active = true;
|
||||
loadExpeditions()
|
||||
.then((result) => { if (active) { setView(result); setLoadError(""); setNow(Date.now()); } })
|
||||
.catch((error) => { if (active) setLoadError(error.message); });
|
||||
return () => { active = false; };
|
||||
}, [reloadKey]);
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setInterval(() => setNow(Date.now()), COUNTDOWN_TICK_MS);
|
||||
return () => clearInterval(timer);
|
||||
}, []);
|
||||
|
||||
if (loadError) return <section className="nds-empty-state" role="alert"><h2>{content.title}</h2><p>{loadError}</p></section>;
|
||||
if (!view) return <section className="nds-empty-state" aria-busy="true"><h2>{content.title}</h2></section>;
|
||||
|
||||
const reload = () => { setNotice(null); setReloadKey((key) => key + 1); };
|
||||
const handle = (result, success) => {
|
||||
if (result?.expeditions) {
|
||||
setView(result.expeditions);
|
||||
setNow(Date.now());
|
||||
setNotice(success ? { variant: "success", text: success } : null);
|
||||
return true;
|
||||
}
|
||||
if (result?.expeditionError?.code === "EXPEDITION_DAY_EXPIRED") setNow(view.nextDayAt);
|
||||
else if (result?.expeditionError) setNotice({ variant: "warning", text: result.expeditionError.message });
|
||||
return false;
|
||||
};
|
||||
const start = async (body) => handle(await runMutation(expeditionCall(() => startExpedition(body))), content.started);
|
||||
const claim = async (id) => handle(await runMutation(expeditionCall(() => claimExpedition(id))), content.claimed);
|
||||
|
||||
const expired = view.enabled && now >= view.nextDayAt;
|
||||
const active = view.expeditions.filter((expedition) => expedition.status === "running" && !expedition.claimedAt);
|
||||
const limitReached = active.length >= view.soloLimit;
|
||||
|
||||
return <section className="nebula-expeditions" aria-labelledby="nebula-expeditions-title">
|
||||
<div className="nds-section-heading nebula-section-heading">
|
||||
<div><p className="eyebrow">{content.eyebrow}</p><h2 id="nebula-expeditions-title">{content.title}</h2><p className="nebula-guild-intro">{content.intro}</p></div>
|
||||
<div className="nebula-daily-heading-actions">
|
||||
<span className="nds-badge" data-variant="gold" title={content.eclatsHelp}>{fillTemplate(content.eclatsBalance, { value: formatEclats(state.wallet.eclats ?? 0) })}</span>
|
||||
<a className="nds-button" data-size="sm" data-variant="secondary" href="#/cards/guild">{content.back}</a>
|
||||
</div>
|
||||
</div>
|
||||
<p className="nebula-form-help">{content.eclatsHelp}</p>
|
||||
{notice && <p className="nds-inline-notice" data-variant={notice.variant} role="status">{notice.text}</p>}
|
||||
{expired && <div className="nds-inline-notice nebula-daily-expired" data-variant="warning" role="status"><span>{content.expired}</span><button className="nds-button" data-size="sm" data-variant="primary" type="button" onClick={reload}>{content.reload}</button></div>}
|
||||
|
||||
{view.expeditions.length > 0 && <section className="nebula-expedition-active" aria-labelledby="nebula-expedition-active-title">
|
||||
<h3 id="nebula-expedition-active-title">{content.activeTitle}</h3>
|
||||
<div className="nebula-expedition-reports">{view.expeditions.map((expedition) => <ExpeditionReport key={expedition.id} catalog={catalog} expedition={expedition} content={content} now={now} busy={busy} onClaim={claim} />)}</div>
|
||||
</section>}
|
||||
|
||||
{!view.enabled ? <div className="nds-empty-state"><h3>{content.closedTitle}</h3><p>{content.closedText}</p></div>
|
||||
: limitReached ? <p className="nds-inline-notice" data-variant="info">{content.limitReached}</p>
|
||||
: !expired && <>
|
||||
<div className="nebula-expedition-plan-heading">
|
||||
<h3>{content.planTitle}</h3>
|
||||
<span className="nebula-form-help">{fillTemplate(content.nextDay, { time: formatCountdown(view.nextDayAt - now) })}</span>
|
||||
</div>
|
||||
<ExpeditionPlanner key={view.day} catalog={catalog} view={view} content={content} busy={busy} onStart={start} />
|
||||
</>}
|
||||
</section>;
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
// Rôle : présente la Guilde des Veilleurs et la tuile de chacune de ses quêtes, avec leur état.
|
||||
import { useState } from "react";
|
||||
import { dailyQuestStatus, fillTemplate, formatStreak } from "./dailyShare.js";
|
||||
import { expeditionQuestStatus } from "./expeditionFormat.js";
|
||||
import { guildQuests } from "./guildQuests.js";
|
||||
|
||||
// Carte du jour : un dos vierge, propre à aucune collection et marqué d'un « ? », figure la carte cachée à retrouver.
|
||||
|
|
@ -28,18 +30,41 @@ function DailyQuest({ summary: daily, content }) {
|
|||
</article>;
|
||||
}
|
||||
|
||||
// Expéditions : la couverture montre le Grand Vide, et le bouton mène au butin dès qu'une expédition est revenue.
|
||||
const EXPEDITIONS_COVER = "/static/img/cards/primordial-nebula/epic/deep_sky_ray.webp";
|
||||
|
||||
function ExpeditionsQuest({ summary, pending, content, now }) {
|
||||
const returned = summary.returned > 0 || (summary.nextReturnAt != null && summary.nextReturnAt <= now);
|
||||
return <article className="nds-card nebula-quest" data-status={returned ? "returned" : summary.running ? "running" : "idle"} aria-labelledby="nebula-quest-expeditions-title">
|
||||
<div className="nebula-quest-media">
|
||||
<div className="nds-card-cover nebula-quest-cover" aria-hidden="true"><img src={EXPEDITIONS_COVER} alt="" /></div>
|
||||
</div>
|
||||
<div className="nds-card-body nebula-quest-body">
|
||||
<p className="eyebrow">{content.expeditionsKind}</p>
|
||||
<h3 id="nebula-quest-expeditions-title">{content.expeditionsTitle}</h3>
|
||||
<p>{content.expeditionsDescription}</p>
|
||||
<p className="nebula-quest-status">{expeditionQuestStatus(summary, content, now)}</p>
|
||||
<div className="nds-card-actions">
|
||||
<a className="nds-button" data-size="sm" data-variant={pending ? "primary" : "secondary"} href="#/cards/expeditions">{returned ? content.expeditionsClaim : summary.enabled ? content.expeditionsAction : content.expeditionsOpen}</a>
|
||||
</div>
|
||||
</div>
|
||||
</article>;
|
||||
}
|
||||
|
||||
// Tuile de chaque type de quête, choisie par l'identifiant donné dans guildQuests.
|
||||
const QUEST_TILES = { daily: DailyQuest };
|
||||
const QUEST_TILES = { daily: DailyQuest, expeditions: ExpeditionsQuest };
|
||||
|
||||
export function GuildPanel({ catalog, state, content }) {
|
||||
const quests = guildQuests(state).filter((quest) => QUEST_TILES[quest.id]);
|
||||
// Heure d'affichage de la page : elle suffit pour savoir si une expédition est déjà rentrée.
|
||||
const [now] = useState(() => Date.now());
|
||||
const quests = guildQuests(state, now).filter((quest) => QUEST_TILES[quest.id]);
|
||||
return <section className="nebula-quests" aria-labelledby="nebula-guild-title">
|
||||
<div className="nds-section-heading nebula-section-heading">
|
||||
<div><p className="eyebrow">{content.eyebrow}</p><h2 id="nebula-guild-title">{content.title}</h2><p className="nebula-guild-intro">{content.intro}</p></div>
|
||||
</div>
|
||||
{quests.length ? <div className="nebula-quests-grid">{quests.map(({ id, summary }) => {
|
||||
{quests.length ? <div className="nebula-quests-grid">{quests.map(({ id, summary, pending }) => {
|
||||
const Tile = QUEST_TILES[id];
|
||||
return <Tile key={id} catalog={catalog} summary={summary} content={content} />;
|
||||
return <Tile key={id} catalog={catalog} summary={summary} pending={pending} content={content} now={now} />;
|
||||
})}</div>
|
||||
: <div className="nds-empty-state"><p>{content.empty}</p></div>}
|
||||
</section>;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ const EVENT_LABELS = {
|
|||
gift_pack_opened: "Paquet offert ouvert",
|
||||
cards_recycled: "Doublons recyclés",
|
||||
opening_purchased: "Ouverture achetée",
|
||||
daily_won: "Carte du jour trouvée"
|
||||
daily_won: "Carte du jour trouvée",
|
||||
expedition_completed: "Expédition terminée",
|
||||
expedition_cancelled_by_guild: "Expédition annulée par la Guilde"
|
||||
};
|
||||
|
||||
// Le journal garde la quantité réellement offerte : les comptes plus anciens n'ont reçu qu'une ouverture.
|
||||
|
|
@ -52,6 +54,12 @@ function HistoryDetail({ entry, catalog }) {
|
|||
if (details.sent || details.received) return <span>{[details.sent && `Donnée : ${cardReference(details.sent, catalog)}`, details.received && `Reçue : ${cardReference(details.received, catalog)}`].filter(Boolean).join(" · ")}</span>;
|
||||
if (entry.type === "cards_recycled") return <span>{details.count} exemplaire{details.count > 1 ? "s" : ""} · +{formatStardust(details.stardust)} d’étoiles</span>;
|
||||
if (entry.type === "daily_won") return <span>{`Défi n° ${details.number} · ${details.guesses}/6`}{details.stardust > 0 && ` · +${formatStardust(details.stardust)} d’étoiles`}</span>;
|
||||
if (entry.type === "expedition_completed") {
|
||||
const tier = { struggle: "Retour difficile", success: "Réussite", triumph: "Triomphe" }[details.tier];
|
||||
const gains = [`+${details.eclats} Éclats`, details.stardust > 0 && `+${formatStardust(details.stardust)} d’étoiles`, details.packs > 0 && `${details.packs} paquet${details.packs > 1 ? "s" : ""} offert${details.packs > 1 ? "s" : ""}`].filter(Boolean);
|
||||
return <span>{[`${details.destinationName} · ${"★".repeat(details.difficulty)} · ${details.hours} h`, tier, ...gains].filter(Boolean).join(" · ")}</span>;
|
||||
}
|
||||
if (entry.type === "expedition_cancelled_by_guild") return <span>{details.destinationName} · cartes libérées, sans butin</span>;
|
||||
if (entry.type === "opening_purchased") return <span>−{formatStardust(details.price)} d’étoiles</span>;
|
||||
if (!details.collectionId) return null;
|
||||
const name = catalog.collections.find((item) => item.id === details.collectionId)?.name;
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ export function PackPanel({ catalog, state, runMutation, busy, content, reserveC
|
|||
<div className="nebula-pack-grid">{giftPacks.map((gift) => {
|
||||
const collection = catalog.collections.find((item) => item.id === gift.collectionId);
|
||||
const details = packDetails(gift.options, catalog);
|
||||
return <button key={gift.id} type="button" className="nebula-pack nebula-gift-pack" disabled={busy} aria-label={`${content.giftOpen} : ${collection?.name} (${gift.campaignName})`} onClick={() => runMutation(() => openGiftPack(gift.id))}>
|
||||
return <button key={gift.id} type="button" className="nebula-pack nebula-gift-pack" disabled={busy} aria-label={`${content.giftOpen} : ${collection?.name} (${gift.sourceName ?? gift.campaignName})`} onClick={() => runMutation(() => openGiftPack(gift.id))}>
|
||||
<span className="nebula-pack-back" data-card-size="md"><CollectionCardBack collection={collection} /></span>
|
||||
<span className="nebula-pack-note">
|
||||
<span className="nebula-pack-copy">{gift.campaignName}</span>
|
||||
<span className="nebula-pack-copy">{gift.source === "expedition" ? `${content.giftFromExpedition} · ${gift.sourceName}` : gift.campaignName}</span>
|
||||
{details.length > 0 && <span className="nebula-gift-pack-details">{details.join(" · ")}</span>}
|
||||
</span>
|
||||
</button>;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { useState } from "react";
|
||||
import { ApplyActions } from "./adminSettingForm.jsx";
|
||||
import { inRange, MAX_VALUE, parse, shopSettingSaver } from "./adminSettings.js";
|
||||
import { ExpeditionSettings } from "./ExpeditionSettings.jsx";
|
||||
|
||||
// Carte du jour : la partie du jour (joueurs et gagnants), puis la récompense d'une victoire.
|
||||
function DailyQuestSettings({ setting, daily, busy, save }) {
|
||||
|
|
@ -31,7 +32,10 @@ export function AdminGuild({ dashboard, busy, runMutation, refreshDashboard }) {
|
|||
const save = shopSettingSaver(setting, runMutation, refreshDashboard);
|
||||
return <div className="nebula-admin-shop-page">
|
||||
{setting
|
||||
? <DailyQuestSettings key={setting.dailyReward} setting={setting} daily={dashboard.daily} busy={busy} save={save} />
|
||||
? <>
|
||||
<DailyQuestSettings key={setting.dailyReward} setting={setting} daily={dashboard.daily} busy={busy} save={save} />
|
||||
{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>}
|
||||
</div>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { useEffect, useState } from "react";
|
|||
import { loadAdminHistory } from "../cardsApi.js";
|
||||
import { summarizeReward } from "../rewardText.js";
|
||||
import { DATE_FORMATTER, formatDuration } from "./adminFormat.js";
|
||||
import { expeditionSettingLabel, formatSettingValue } from "./expeditionSettingFields.js";
|
||||
|
||||
const EVENT_LABELS = {
|
||||
recharge_updated: "Recharge modifiée",
|
||||
|
|
@ -15,7 +16,9 @@ const EVENT_LABELS = {
|
|||
campaign_created: "Campagne créée",
|
||||
campaign_revoked: "Campagne révoquée",
|
||||
campaign_extended: "Campagne prolongée",
|
||||
account_deleted: "Compte joueur supprimé"
|
||||
account_deleted: "Compte joueur supprimé",
|
||||
expedition_settings_updated: "Expéditions modifiées",
|
||||
expedition_cancelled: "Expédition annulée"
|
||||
};
|
||||
|
||||
const collectionName = (entry, catalog) => catalog.collections.find((item) => item.id === entry.entityId)?.name || entry.entityId;
|
||||
|
|
@ -51,6 +54,8 @@ function eventDetail(entry, catalog) {
|
|||
case "campaign_created": return `${campaignName || entry.entityId} · ${summarizeReward(details.reward, catalog)}`;
|
||||
case "campaign_extended": return `${campaignName || entry.entityId} · ${details.expiresAt == null ? "sans expiration" : `jusqu’au ${DATE_FORMATTER.format(details.expiresAt)}`}`;
|
||||
case "campaign_revoked": return campaignName || entry.entityId;
|
||||
case "expedition_settings_updated": return (details.changes || []).map((item) => change(expeditionSettingLabel(item.path), formatSettingValue(item.previous), formatSettingValue(item.next))).filter(Boolean).join(" · ");
|
||||
case "expedition_cancelled": return details.destinationId;
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
128
website/src/features/cards/admin/ExpeditionSettings.jsx
Normal file
128
website/src/features/cards/admin/ExpeditionSettings.jsx
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
// Rôle : règle les Expéditions depuis Administration › Guilde : un panneau par groupe de réglages, les destinations, et le suivi du jour.
|
||||
import { useState } from "react";
|
||||
import { ConfirmModal } from "../../../components/ToolboxModals.jsx";
|
||||
import { cancelExpedition, updateExpeditionSettings } from "../cardsApi.js";
|
||||
import { DATE_FORMATTER } from "./adminFormat.js";
|
||||
import { ApplyActions } from "./adminSettingForm.jsx";
|
||||
import { inRange, parse } from "./adminSettings.js";
|
||||
import { EXPEDITION_SETTING_GROUPS } from "./expeditionSettingFields.js";
|
||||
|
||||
const readPath = (source, path) => path.split(".").reduce((value, key) => value?.[key], source);
|
||||
|
||||
function writePath(target, path, value) {
|
||||
const keys = path.split(".");
|
||||
keys.slice(0, -1).reduce((node, key) => node[key], target)[keys.at(-1)] = value;
|
||||
}
|
||||
|
||||
const toDraft = (value) => (typeof value === "boolean" ? value : Array.isArray(value) ? value.map(String) : String(value));
|
||||
const fromDraft = (value) => (typeof value === "boolean" ? value : Array.isArray(value) ? value.map(parse) : parse(value));
|
||||
const validValue = (field, value) => (field.kind === "bool" ? typeof value === "boolean" : (Array.isArray(value) ? value : [value]).every((item) => inRange(item, field.min, field.max)));
|
||||
|
||||
// Un panneau : brouillon de ses réglages, vérifiés avec les bornes du serveur ; les contraintes entre réglages sont vérifiées par le serveur.
|
||||
function SettingsGroup({ group, settings, schema, busy, save }) {
|
||||
const fields = group.fields.map((field) => ({ ...field, ...schema.find((item) => item.path === field.path) }));
|
||||
const initial = () => Object.fromEntries(fields.map((field) => [field.path, toDraft(readPath(settings, field.path))]));
|
||||
const [draft, setDraft] = useState(initial);
|
||||
const values = Object.fromEntries(fields.map((field) => [field.path, fromDraft(draft[field.path])]));
|
||||
const invalid = fields.filter((field) => !validValue(field, values[field.path]));
|
||||
const changed = !invalid.length && fields.some((field) => JSON.stringify(values[field.path]) !== JSON.stringify(readPath(settings, field.path)));
|
||||
const set = (path, value) => setDraft((current) => ({ ...current, [path]: value }));
|
||||
return <section className="nds-panel nebula-admin-shop nebula-admin-expedition-group" aria-labelledby={`nebula-admin-expedition-${group.id}`}>
|
||||
<div className="nds-section-heading nebula-admin-panel-heading"><h3 id={`nebula-admin-expedition-${group.id}`}>{group.title}</h3></div>
|
||||
<p className="nebula-form-help">{group.help}</p>
|
||||
<div className="nebula-admin-expedition-fields">{fields.map((field) => {
|
||||
const value = draft[field.path];
|
||||
if (field.kind === "bool") return <div key={field.path} className="nebula-admin-expedition-field">
|
||||
<span>{field.label}</span>
|
||||
<button className="nds-button" data-size="sm" data-variant={value ? "primary" : "secondary"} type="button" aria-pressed={value} aria-label={field.label} disabled={busy} onClick={() => set(field.path, !value)}>{value ? "Oui" : "Non"}</button>
|
||||
</div>;
|
||||
if (Array.isArray(value)) return <fieldset key={field.path} className="nebula-admin-expedition-field">
|
||||
<legend>{field.label}</legend>
|
||||
<div className="nebula-admin-expedition-items">{value.map((item, index) => <label key={index}><span>{field.items?.[index] ?? index + 1}</span>
|
||||
<input className="nds-input" type="number" inputMode="numeric" min={field.min} max={field.max} step="1" value={item} disabled={busy} onChange={(event) => set(field.path, value.map((current, position) => (position === index ? event.target.value : current)))} />
|
||||
</label>)}</div>
|
||||
</fieldset>;
|
||||
return <label key={field.path} className="nebula-admin-expedition-field"><span>{field.label}</span>
|
||||
<input className="nds-input" type="number" inputMode="numeric" min={field.min} max={field.max} step="1" value={value} disabled={busy} onChange={(event) => set(field.path, event.target.value)} />
|
||||
</label>;
|
||||
})}</div>
|
||||
{invalid.length > 0 && <p className="nebula-form-help" role="alert">{invalid.map((field) => `${field.label} : entier de ${field.min.toLocaleString("fr-FR")} à ${field.max.toLocaleString("fr-FR")}`).join(" · ")}</p>}
|
||||
<ApplyActions
|
||||
busy={busy}
|
||||
changed={changed}
|
||||
onCancel={() => setDraft(initial())}
|
||||
onApply={() => save((next) => fields.forEach((field) => writePath(next, field.path, values[field.path])))}
|
||||
confirmTitle={`Appliquer les réglages « ${group.title} » ?`}
|
||||
confirmMessage="Les nouveaux réglages s’appliquent aux prochains départs. Les expéditions en route gardent ceux de leur départ."
|
||||
/>
|
||||
</section>;
|
||||
}
|
||||
|
||||
// Destinations : proposées ou non, et poids dans le tirage du jour. Leurs textes vivent dans le fichier du serveur.
|
||||
function DestinationSettings({ settings, destinations, busy, save }) {
|
||||
const initial = () => Object.fromEntries(destinations.map((destination) => [destination.id, { active: settings.destinations[destination.id].active, weight: String(settings.destinations[destination.id].weight) }]));
|
||||
const [draft, setDraft] = useState(initial);
|
||||
const invalid = destinations.filter((destination) => !inRange(parse(draft[destination.id].weight), 0, 100));
|
||||
const changed = !invalid.length && destinations.some((destination) => draft[destination.id].active !== settings.destinations[destination.id].active || parse(draft[destination.id].weight) !== settings.destinations[destination.id].weight);
|
||||
const set = (id, changes) => setDraft((current) => ({ ...current, [id]: { ...current[id], ...changes } }));
|
||||
return <section className="nds-panel nebula-admin-shop nebula-admin-expedition-group" aria-labelledby="nebula-admin-expedition-destinations">
|
||||
<div className="nds-section-heading nebula-admin-panel-heading"><h3 id="nebula-admin-expedition-destinations">Destinations</h3></div>
|
||||
<p className="nebula-form-help">Une destination retirée n’est plus tirée ; le poids règle sa fréquence parmi les destinations proposées. Les destinations cachées ne sont jamais tirées.</p>
|
||||
<ul className="nebula-admin-expedition-destinations">{destinations.map((destination) => <li key={destination.id} className="nds-list-row">
|
||||
<strong>{destination.name}{destination.hidden && <span className="nds-badge" data-variant="neutral">Cachée</span>}</strong>
|
||||
<button className="nds-button" data-size="sm" data-variant={draft[destination.id].active ? "primary" : "secondary"} type="button" aria-pressed={draft[destination.id].active} aria-label={`${destination.name} proposée`} disabled={busy} onClick={() => set(destination.id, { active: !draft[destination.id].active })}>{draft[destination.id].active ? "Proposée" : "Retirée"}</button>
|
||||
<label><span>Poids</span><input className="nds-input" type="number" inputMode="numeric" min="0" max="100" step="1" value={draft[destination.id].weight} disabled={busy} aria-label={`Poids de ${destination.name}`} onChange={(event) => set(destination.id, { weight: event.target.value })} /></label>
|
||||
</li>)}</ul>
|
||||
{invalid.length > 0 && <p className="nebula-form-help" role="alert">Poids : entier de 0 à 100.</p>}
|
||||
<ApplyActions
|
||||
busy={busy}
|
||||
changed={changed}
|
||||
onCancel={() => setDraft(initial())}
|
||||
onApply={() => save((next) => destinations.forEach((destination) => { next.destinations[destination.id] = { active: draft[destination.id].active, weight: parse(draft[destination.id].weight) }; }))}
|
||||
confirmTitle="Appliquer les destinations ?"
|
||||
confirmMessage="Le changement vaut pour les prochains tirages : les destinations déjà proposées aujourd’hui restent jusqu’à minuit."
|
||||
/>
|
||||
</section>;
|
||||
}
|
||||
|
||||
function ExpeditionsToday({ today, destinations, busy, onCancel }) {
|
||||
const [cancelling, setCancelling] = useState(null);
|
||||
const name = (id) => destinations.find((destination) => destination.id === id)?.name || id;
|
||||
return <section className="nds-panel nebula-admin-shop nebula-admin-expedition-group" aria-labelledby="nebula-admin-expedition-today">
|
||||
<div className="nds-section-heading nebula-admin-panel-heading"><h3 id="nebula-admin-expedition-today">Aujourd’hui</h3></div>
|
||||
<p className="nebula-admin-guild-today"><strong>{today.launches}</strong> départ{today.launches > 1 ? "s" : ""} · <strong>{today.running}</strong> en route · <strong>{today.returnedUnclaimed}</strong> butin{today.returnedUnclaimed > 1 ? "s" : ""} à récupérer.</p>
|
||||
{today.runningList.length > 0 && <ul className="nebula-admin-expedition-destinations">{today.runningList.map((expedition) => <li key={expedition.id} className="nds-list-row">
|
||||
<strong>{name(expedition.destinationId)} · {"★".repeat(expedition.stars)}</strong>
|
||||
<span>{expedition.creatorName} · retour le {DATE_FORMATTER.format(expedition.returnsAt)}</span>
|
||||
<button className="nds-button" data-size="sm" data-variant="secondary" type="button" disabled={busy} onClick={() => setCancelling(expedition)}>Annuler</button>
|
||||
</li>)}</ul>}
|
||||
{cancelling && <ConfirmModal
|
||||
title="Annuler cette expédition ?"
|
||||
message={`L’expédition vers ${name(cancelling.destinationId)} de ${cancelling.creatorName} s’arrête : les cartes sont libérées, sans butin.`}
|
||||
confirmLabel="Annuler l’expédition"
|
||||
onClose={async (confirmed) => {
|
||||
const target = cancelling;
|
||||
setCancelling(null);
|
||||
if (confirmed) await onCancel(target.id);
|
||||
}}
|
||||
/>}
|
||||
</section>;
|
||||
}
|
||||
|
||||
export function ExpeditionSettings({ dashboard, busy, runMutation, refreshDashboard }) {
|
||||
const { settings, schema, destinations, updatedAt } = dashboard.expeditionSettings;
|
||||
const save = async (apply) => {
|
||||
const next = structuredClone(settings);
|
||||
apply(next);
|
||||
if (await runMutation(() => updateExpeditionSettings(next))) await refreshDashboard();
|
||||
};
|
||||
const cancel = async (id) => {
|
||||
if (await runMutation(() => cancelExpedition(id))) await refreshDashboard();
|
||||
};
|
||||
return <div className="nebula-admin-expeditions" aria-labelledby="nebula-admin-expeditions-title">
|
||||
<h2 id="nebula-admin-expeditions-title">Expéditions</h2>
|
||||
<ExpeditionsToday today={dashboard.expeditionsToday} destinations={destinations} busy={busy} onCancel={cancel} />
|
||||
{EXPEDITION_SETTING_GROUPS.map((group) => <SettingsGroup key={`${group.id}-${updatedAt}`} group={group} settings={settings} schema={schema} busy={busy} save={save} />)}
|
||||
<DestinationSettings key={`destinations-${updatedAt}`} settings={settings} destinations={destinations} busy={busy} save={save} />
|
||||
</div>;
|
||||
}
|
||||
99
website/src/features/cards/admin/expeditionSettingFields.js
Normal file
99
website/src/features/cards/admin/expeditionSettingFields.js
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
// Rôle : libellés et regroupement des réglages des Expéditions pour l'administration et son historique.
|
||||
// Les bornes viennent du schéma du serveur (tableau de bord) ; un test vérifie que chaque réglage du schéma a ici son libellé.
|
||||
|
||||
const STARS = ["1 ★", "2 ★", "3 ★", "4 ★", "5 ★"];
|
||||
const STATS_IN_ORDER = ["principale", "2e stat", "3e stat", "4e stat"];
|
||||
|
||||
export const EXPEDITION_SETTING_GROUPS = [
|
||||
{
|
||||
id: "general",
|
||||
title: "Général",
|
||||
help: "Ouverture, destinations proposées chaque jour, durées et règles du solo.",
|
||||
fields: [
|
||||
{ path: "enabled", label: "Expéditions ouvertes aux joueurs" },
|
||||
{ path: "day.destinationsPerDay", label: "Destinations proposées par jour" },
|
||||
{ path: "day.avoidRepeatDays", label: "Jours avant qu’une destination revienne" },
|
||||
{ path: "durations.hours", label: "Durées proposées (heures)", items: ["Courte", "Moyenne", "Longue"] },
|
||||
{ path: "solo.cards", label: "Cartes en solo" },
|
||||
{ path: "solo.maxConcurrent", label: "Expéditions solo en même temps" },
|
||||
{ path: "solo.minStars", label: "Étoile minimale en solo" },
|
||||
{ path: "solo.maxStars", label: "Étoile maximale en solo" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "power",
|
||||
title: "Puissance et rôles",
|
||||
help: "Puissance de base de chaque rareté, gain par niveau et plafond commun ; multiplicateur du rôle d’une place.",
|
||||
fields: [
|
||||
{ path: "power.rare", label: "Puissance de base d’une rare" },
|
||||
{ path: "power.epic", label: "Puissance de base d’une épique" },
|
||||
{ path: "power.legendary", label: "Puissance de base d’une légendaire" },
|
||||
{ path: "power.mythic", label: "Puissance de base d’une mythique" },
|
||||
{ path: "power.perLevel", label: "Gain de Puissance par niveau" },
|
||||
{ path: "power.cap", label: "Plafond de Puissance" },
|
||||
{ path: "roles.multiplierPct", label: "Multiplicateur du rôle (%)" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "requirements",
|
||||
title: "Exigences",
|
||||
help: "Exigence d’une stat par place : elle est multipliée par le nombre de places, plus les places dont le rôle double cette stat.",
|
||||
fields: [
|
||||
...STARS.map((stars, index) => ({ path: `requirements.star${index + 1}`, label: `Exigences par place en ${stars}`, items: STATS_IN_ORDER })),
|
||||
{ path: "requirements.conditionMissPct", label: "Baisse du score si la condition de 3 ★ manque (%)" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "score",
|
||||
title: "Score, durée et dangers",
|
||||
help: "Paliers, rendement au-delà de 100 %, malus des longues expéditions et des dangers, et ce que l’Endurance en efface.",
|
||||
fields: [
|
||||
{ path: "score.successPct", label: "Seuil de Réussite (%)" },
|
||||
{ path: "score.triumphPct", label: "Seuil de Triomphe (%)" },
|
||||
{ path: "score.capPct", label: "Plafond du score (%)" },
|
||||
{ path: "score.mainWeight", label: "Poids de la stat principale" },
|
||||
{ path: "score.otherWeight", label: "Poids des autres stats" },
|
||||
{ path: "score.overflowPct", label: "Valeur d’un point au-delà de 100 % (%)" },
|
||||
{ path: "score.overflowSpanPct", label: "Dépassement pris en compte (%)" },
|
||||
{ path: "durations.malusPct", label: "Malus de durée (%)", items: ["Courte", "Moyenne", "Longue"] },
|
||||
{ path: "durations.endurancePerSlot", label: "Endurance par place qui efface le malus de durée" },
|
||||
{ path: "danger.malusPct", label: "Malus d’un danger (%)" },
|
||||
{ path: "danger.shieldMaxPct", label: "Part du malus que l’Endurance peut effacer (%)" },
|
||||
{ path: "danger.endurancePerSlot", label: "Endurance par place pour le bouclier complet" }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: "loot",
|
||||
title: "Butin",
|
||||
help: "Butin par heure (proportionnel à la durée choisie), multiplié par la difficulté et le palier ; la Fortune n’améliore que la chance de paquet.",
|
||||
fields: [
|
||||
{ path: "loot.eclatsPerHourCents", label: "Éclats par heure (en centièmes : 200 = 2)" },
|
||||
{ path: "loot.stardustPerHourCents", label: "Poussière par heure (en centièmes : 25 = 0,25)" },
|
||||
{ path: "loot.packPerHourPermille", label: "Chance de paquet par heure (‰)" },
|
||||
{ path: "loot.maxPacks", label: "Paquets au plus par expédition" },
|
||||
{ path: "loot.difficultyPct", label: "Multiplicateur de difficulté (%)", items: STARS },
|
||||
{ path: "loot.tierPct", label: "Multiplicateur du palier (%)", items: ["Retour difficile", "Réussite", "Triomphe"] },
|
||||
{ path: "loot.fortunePerPointPct", label: "Bonus de paquet par point de Fortune par place (%)" },
|
||||
{ path: "loot.fortuneCapPct", label: "Bonus de Fortune maximal (%)" },
|
||||
{ path: "loot.bonusSlotPct", label: "Multiplicateur des destinations bonus (%)", items: ["5e destination", "6e destination"] }
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const LABELS = new Map(EXPEDITION_SETTING_GROUPS.flatMap((group) => group.fields.map((field) => [field.path, field.label])));
|
||||
|
||||
// Libellé d'un réglage dans l'historique ; une destination se nomme par son nom.
|
||||
export function expeditionSettingLabel(path, destinations = []) {
|
||||
const destination = path.match(/^destinations\.([^.]+)\.(active|weight)$/);
|
||||
if (destination) {
|
||||
const name = destinations.find((item) => item.id === destination[1])?.name || destination[1];
|
||||
return `${name} · ${destination[2] === "active" ? "proposée" : "poids"}`;
|
||||
}
|
||||
return LABELS.get(path) || path;
|
||||
}
|
||||
|
||||
export function formatSettingValue(value) {
|
||||
if (typeof value === "boolean") return value ? "oui" : "non";
|
||||
if (Array.isArray(value)) return value.join(" / ");
|
||||
return value ?? "—";
|
||||
}
|
||||
|
|
@ -166,3 +166,28 @@ export function loadCampaignDetail(campaignId) {
|
|||
export function extendCampaign(campaignId, expiresAt) {
|
||||
return request(`/admin/campaigns/${encodeURIComponent(campaignId)}/expiry`, { method: "PUT", body: JSON.stringify({ expiresAt }) });
|
||||
}
|
||||
|
||||
export function loadExpeditions() {
|
||||
return request("/expeditions");
|
||||
}
|
||||
|
||||
// Aperçu exact d'une équipe : le palier ne dépend d'aucun tirage, seul le butin est arrondi au hasard au départ.
|
||||
export function previewExpedition(body) {
|
||||
return request("/expeditions/preview", { method: "POST", body: JSON.stringify(body) });
|
||||
}
|
||||
|
||||
export function startExpedition(body) {
|
||||
return request("/expeditions", { method: "POST", headers: { "Idempotency-Key": crypto.randomUUID() }, body: JSON.stringify(body) });
|
||||
}
|
||||
|
||||
export function claimExpedition(expeditionId) {
|
||||
return request(`/expeditions/${encodeURIComponent(expeditionId)}/claim`, { method: "POST" });
|
||||
}
|
||||
|
||||
export function updateExpeditionSettings(settings) {
|
||||
return request("/admin/expeditions/settings", { method: "PUT", body: JSON.stringify({ settings }) });
|
||||
}
|
||||
|
||||
export function cancelExpedition(expeditionId) {
|
||||
return request(`/admin/expeditions/${encodeURIComponent(expeditionId)}/cancel`, { method: "POST" });
|
||||
}
|
||||
|
|
|
|||
44
website/src/features/cards/expeditionFormat.js
Normal file
44
website/src/features/cards/expeditionFormat.js
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
// Rôle : règles d'affichage des Expéditions Sokko TCG (libellés des stats, rôles et paliers, conditions, statut de la tuile de Guilde).
|
||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
||||
|
||||
export const STAT_IDS = ["bravoure", "endurance", "fortune", "orientation"];
|
||||
|
||||
export const formatEclats = (value) => Number(value).toLocaleString("fr-FR", { maximumFractionDigits: 1 });
|
||||
export const formatDecimal = (value) => Number(value).toLocaleString("fr-FR", { maximumFractionDigits: 1 });
|
||||
|
||||
export function tagLabel(catalog, tagId) {
|
||||
return catalog.expeditionTags?.find((tag) => tag.id === tagId)?.label || tagId;
|
||||
}
|
||||
|
||||
// Condition de 3 ★ : une carte qui porte une étiquette, ou une carte d'une collection.
|
||||
export function conditionText(condition, catalog, content) {
|
||||
if (!condition) return "";
|
||||
if (condition.type === "collection") return fillTemplate(content.conditionCollection, { collection: catalog.collections.find((item) => item.id === condition.collectionId)?.name || condition.collectionId });
|
||||
return fillTemplate(content.conditionTag, { tag: tagLabel(catalog, condition.tag) });
|
||||
}
|
||||
|
||||
export function dangerText(danger, catalog, content) {
|
||||
return fillTemplate(content.dangerText, { label: danger.label, stat: content.stats[danger.stat], tags: danger.unlessTags.map((tag) => tagLabel(catalog, tag)).join(content.or) });
|
||||
}
|
||||
|
||||
// Statut de la tuile Expéditions dans la Guilde (textes cards.guild).
|
||||
export function expeditionQuestStatus(summary, content, now = Date.now()) {
|
||||
if (!summary.enabled && !summary.running && !summary.returned) return content.expeditionsClosed;
|
||||
if (summary.returned > 0 || (summary.nextReturnAt != null && summary.nextReturnAt <= now)) return content.expeditionsReturned;
|
||||
if (summary.running) return fillTemplate(content.expeditionsRunning, { time: formatCountdown(summary.nextReturnAt - now) });
|
||||
if (summary.eligible < summary.soloCards) return fillTemplate(content.expeditionsNoCards, { count: summary.soloCards });
|
||||
return summary.launchedToday ? content.expeditionsIdle : content.expeditionsToLaunch;
|
||||
}
|
||||
|
||||
// Édition de référence d'une carte (la standard), pour illustrer une destination.
|
||||
export function coverEntry(catalog, cardId) {
|
||||
const card = catalog.cards.find((item) => item.id === cardId);
|
||||
const edition = catalog.editions.find((item) => item.cardId === cardId && item.rarity !== "mythic" && !item.promotional);
|
||||
return card && edition ? { editionId: edition.id, edition, card } : null;
|
||||
}
|
||||
|
||||
export function editionEntry(catalog, editionId) {
|
||||
const edition = catalog.editions.find((item) => item.id === editionId);
|
||||
const card = edition && catalog.cards.find((item) => item.id === edition.cardId);
|
||||
return card ? { editionId, edition, card } : null;
|
||||
}
|
||||
|
|
@ -1,10 +1,21 @@
|
|||
// Rôle : recense les quêtes que la Guilde des Veilleurs propose au joueur et celles qui l'attendent.
|
||||
// La Carte du jour est la première ; chaque nouvelle quête (Expéditions…) s'ajoute à cette liste avec sa tuile dans GuildPanel.
|
||||
// Chaque quête (Carte du jour, Expéditions…) s'ajoute à cette liste avec sa tuile dans GuildPanel.
|
||||
|
||||
// Une quête : identifiant (qui choisit sa tuile), état du jour fourni par le serveur et `pending` tant qu'elle attend le joueur.
|
||||
export function guildQuests(state) {
|
||||
// Expéditions en attente : un butin à récupérer, ou aucune expédition lancée aujourd'hui alors que le joueur a de quoi partir.
|
||||
// Au plus un rappel par jour, plus les retours ; un joueur sans cartes jouables n'est jamais sollicité.
|
||||
export function expeditionsPending(summary, now = Date.now()) {
|
||||
if (!summary) return false;
|
||||
if (summary.returned > 0 || (summary.nextReturnAt != null && summary.nextReturnAt <= now)) return true;
|
||||
return summary.enabled && !summary.running && !summary.launchedToday && summary.eligible >= summary.soloCards;
|
||||
}
|
||||
|
||||
// Une quête : identifiant (qui choisit sa tuile), état fourni par le serveur et `pending` tant qu'elle attend le joueur.
|
||||
// Les Expéditions n'apparaissent que si elles sont ouvertes, ou tant qu'une expédition du joueur n'est pas terminée.
|
||||
export function guildQuests(state, now = Date.now()) {
|
||||
const quests = [];
|
||||
if (state.daily) quests.push({ id: "daily", pending: state.daily.status === "playing", summary: state.daily });
|
||||
const expeditions = state.expeditions;
|
||||
if (expeditions && (expeditions.enabled || expeditions.running || expeditions.returned)) quests.push({ id: "expeditions", pending: expeditionsPending(expeditions, now), summary: expeditions });
|
||||
return quests;
|
||||
}
|
||||
|
||||
|
|
|
|||
79
website/src/styles/_nebula-expeditions.scss
Normal file
79
website/src/styles/_nebula-expeditions.scss
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Rôle : met en page les Expéditions de Sokko TCG (expéditions du joueur, destinations du jour, équipe par rôle, aperçu).
|
||||
// Les composants restent ceux du design system (nds-panel, nds-card, nds-button, nds-badge, nds-inline-notice) ; ce fichier ne règle que la disposition.
|
||||
|
||||
.nebula-expeditions { display: grid; gap: var(--space-4); min-width: 0; }
|
||||
.nebula-expeditions .nds-section-heading.nebula-section-heading { margin-bottom: 0; }
|
||||
.nebula-expeditions > .nebula-form-help { margin: 0; }
|
||||
.nebula-expeditions > .nds-inline-notice { margin: 0; }
|
||||
.nebula-expeditions h3, .nebula-expeditions h4 { margin: 0; }
|
||||
|
||||
// Expéditions du joueur : une carte par expédition, couverture de la destination, équipe et butin.
|
||||
.nebula-expedition-active { display: grid; gap: var(--space-3); }
|
||||
.nebula-expedition-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--space-4); }
|
||||
.nds-card.nebula-expedition-report { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); align-items: start; padding: var(--space-4); }
|
||||
.nds-card-cover.nebula-expedition-report-cover { width: 88px; overflow: hidden; aspect-ratio: 1; border-radius: var(--radius-md); }
|
||||
.nebula-expedition-report-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
||||
.nds-card-body.nebula-expedition-report-body { display: grid; gap: var(--space-2); justify-items: start; min-width: 0; padding: 0; }
|
||||
.nebula-expedition-report-body p { margin: 0; }
|
||||
.nebula-expedition-report-status { color: var(--color-text-primary); font-weight: 700; }
|
||||
.nebula-expedition-report-body .nds-card-actions { padding: 0; }
|
||||
.nebula-expedition-report-team { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
|
||||
.nebula-expedition-report-team li { display: grid; gap: var(--space-1); justify-items: center; color: var(--color-text-secondary); font-size: var(--font-size-xs); }
|
||||
.nebula-expedition-rewards { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
|
||||
// Préparation : quatre étapes empilées.
|
||||
.nebula-expedition-plan-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4); }
|
||||
.nebula-expedition-planner { display: grid; gap: var(--space-4); }
|
||||
.nds-panel.nebula-expedition-step { display: grid; gap: var(--space-3); padding: var(--space-5); }
|
||||
.nebula-expedition-step > .nebula-form-help, .nebula-expedition-step > .nds-inline-notice { margin: 0; }
|
||||
|
||||
.nebula-expedition-destinations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-3); }
|
||||
.nebula-expedition-destination { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-surface-alt); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard); }
|
||||
.nebula-expedition-destination:hover { background: var(--color-bg-hover); }
|
||||
.nebula-expedition-destination[aria-pressed="true"] { border-color: rgba(246, 196, 83, 0.54); background: rgba(246, 196, 83, 0.12); }
|
||||
.nebula-expedition-destination img { width: 72px; aspect-ratio: 1; border-radius: var(--radius-sm); object-fit: cover; }
|
||||
.nebula-expedition-destination-copy { display: grid; gap: var(--space-1); min-width: 0; }
|
||||
.nebula-expedition-destination-copy > span:not(.nebula-expedition-destination-roles) { color: var(--color-text-secondary); font-size: var(--font-size-sm); text-wrap: pretty; }
|
||||
.nebula-expedition-destination-roles { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
|
||||
|
||||
.nebula-expedition-choices { display: flex; flex-wrap: wrap; gap: var(--space-3); }
|
||||
.nebula-expedition-requirements { display: grid; gap: var(--space-2); }
|
||||
.nebula-expedition-requirements ul, .nebula-expedition-checks { display: grid; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
|
||||
.nebula-expedition-requirements li, .nebula-expedition-checks li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--color-bg-surface-alt); }
|
||||
.nebula-expedition-requirements li > span { display: inline-flex; align-items: center; gap: var(--space-2); }
|
||||
.nebula-expedition-requirements p { margin: 0; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-expedition-checks li[data-met] strong { color: var(--color-success); }
|
||||
|
||||
// Équipe : une place par rôle, puis les cartes jouables, triées pour la place choisie.
|
||||
.nebula-expedition-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-3); }
|
||||
.nebula-expedition-slot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
|
||||
.nebula-expedition-slot[data-active] { border-color: rgba(246, 196, 83, 0.54); }
|
||||
.nebula-expedition-slot > span { flex: 1 1 120px; min-width: 0; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-expedition-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--space-4) var(--space-3); max-height: 640px; margin: 0; padding: var(--space-1); overflow-y: auto; list-style: none; }
|
||||
.nebula-expedition-cards li { display: grid; gap: var(--space-1); justify-items: center; text-align: center; }
|
||||
.nebula-expedition-cards li[data-busy] { opacity: 0.55; }
|
||||
.nebula-expedition-card-power { color: var(--color-text-primary); font-size: var(--font-size-xs); font-weight: 700; }
|
||||
.nebula-expedition-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-1) var(--space-2); color: var(--color-text-muted); font-size: var(--font-size-xs); }
|
||||
|
||||
.nebula-expedition-preview { display: grid; gap: var(--space-3); }
|
||||
.nebula-expedition-preview .nds-inline-notice { margin: 0; }
|
||||
.nebula-expedition-expected { margin: 0; color: var(--color-text-primary); }
|
||||
|
||||
// Administration › Guilde : un panneau par groupe de réglages, des champs alignés en grille.
|
||||
.nebula-admin-expeditions { display: grid; gap: var(--space-4); }
|
||||
.nebula-admin-expeditions > h2 { margin: var(--space-4) 0 0; }
|
||||
.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; }
|
||||
.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; }
|
||||
.nebula-admin-expedition-items { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.nebula-admin-expedition-items label { display: grid; flex: 1 1 72px; gap: 2px; min-width: 64px; color: var(--color-text-muted); font-size: var(--font-size-xs); }
|
||||
.nebula-admin-expedition-destinations { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
|
||||
.nebula-admin-expedition-destinations .nds-list-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-3); }
|
||||
.nebula-admin-expedition-destinations .nds-list-row > strong { display: inline-flex; flex: 1 1 200px; align-items: center; gap: var(--space-2); }
|
||||
.nebula-admin-expedition-destinations .nds-list-row > span { flex: 1 1 200px; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-admin-expedition-destinations label { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
|
||||
.nebula-admin-expedition-destinations input { width: 80px; }
|
||||
.nebula-admin-expedition-destinations .nds-list-row > .nds-button { flex: 0 0 auto; width: auto; }
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
@use "diablo4";
|
||||
@use "aniimo";
|
||||
@use "nebula-cards";
|
||||
@use "nebula-expeditions";
|
||||
@use "games/checklist";
|
||||
@use "design-system/attributes";
|
||||
@use "responsive";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue