Add the Sokko TCG collectible card mini-game

Add the server-backed card game: Discord login, recharging pack openings,
album, trades, gifts, stardust shop, campaign codes and its administration,
stored in SQLite and disabled in production until configured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-05 17:47:35 +01:00
parent 243465720f
commit 5ce35cd7ba
193 changed files with 12159 additions and 28 deletions

View file

@ -6,13 +6,14 @@ import { ImportButton } from "./ImportButton.jsx";
import { Modal } from "./Modal.jsx";
import { ToastPositionSwitch } from "./ToastPositionSwitch.jsx";
export function ConfirmModal({ title, message, confirmLabel = "Confirmer", cancelLabel = "Annuler", danger = false, onClose }) {
export function ConfirmModal({ title, message, children = null, confirmLabel = "Confirmer", cancelLabel = "Annuler", danger = false, onClose }) {
const titleId = useId();
const messageId = useId();
return (
<Modal labelledBy={titleId} describedBy={messageId} onRequestClose={() => onClose(false)}>
<header><h2 id={titleId}>{title}</h2></header>
<p id={messageId}>{message}</p>
{children}
<footer className="nds-modal-footer">
<button className="nds-button" data-size="sm" data-modal-initial-focus={danger ? "" : undefined} onClick={() => onClose(false)}>{cancelLabel}</button>
<button className="confirm-danger nds-button" data-size="sm" data-variant={danger ? "danger" : "primary"} onClick={() => onClose(true)}>{confirmLabel}</button>