sokko-g/website/src/features/cards/Currency.jsx
Shinuwa 4d05d812c5 Split the Guild administration into tabs and sell Éclats and openings by quantity in the shop
The Guild administration now has a tab per quest. The expedition settings sit behind a status band (open or close, today's activity) and four themed tabs, with units inside the fields, the default value shown, and one sticky apply bar that lists every change before confirming.

The Pont des Veilleurs leaves the expedition page and becomes the « Éclats d’étoile » shop item, priced from Administration › Boutique. Openings and Éclats are bought by quantity: a number field capped by the stardust the player actually has, and a full-width button that shows the total cost. Stardust and Éclats get their own SVG icons, aligned with the text around them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:39:45 +01:00

23 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Rôle : affiche les deux monnaies de Sokko TCG, la poussière d'étoiles et les Éclats d'étoile, avec leur icône.
// Les icônes sont des images (static/icons) : leurs dégradés SVG ne peuvent pas entrer en conflit avec la page.
import { formatEclats } from "./expeditionFormat.js";
import { formatStardust } from "./stardustFormat.js";
const ICONS = { stardust: "/static/icons/stardust.svg", eclats: "/static/icons/eclat.svg" };
export function CurrencyIcon({ kind }) {
return <img className="nebula-currency-icon" data-currency={kind} src={ICONS[kind]} alt="" aria-hidden="true" />;
}
// Icône suivie d'un texte libre (« 70 Éclats ») dans un bouton ou un badge : un seul bloc en ligne, aligné sur le texte.
export function CurrencyAmount({ kind, children }) {
return <span className="nebula-currency-amount"><CurrencyIcon kind={kind} />{children}</span>;
}
export function StardustBalance({ value }) {
return <span className="nebula-stardust" aria-label={`${formatStardust(value)} d’étoiles`}><CurrencyIcon kind="stardust" />{value.toLocaleString("fr-FR")}</span>;
}
export function EclatsBalance({ value }) {
return <span className="nebula-eclats" aria-label={`${formatEclats(value)} Éclats d’étoile`}><CurrencyIcon kind="eclats" />{formatEclats(value)}</span>;
}