Sort destinations by difficulty and show roles and loot effects as icons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
994776392f
commit
18bcf435b5
6 changed files with 85 additions and 18 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import { useState } from "react";
|
||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
||||
import { conditionText, coverEntry, dangerText, editionEntry, formatEclats, synergyLabels } from "./expeditionFormat.js";
|
||||
import { RoleLabel } from "./ExpeditionLabels.jsx";
|
||||
import { NebulaCard } from "./NebulaCard.jsx";
|
||||
|
||||
const TIER_VARIANTS = { struggle: "neutral", success: "success", triumph: "gold" };
|
||||
|
|
@ -13,7 +14,7 @@ function JoinForm({ catalog, group, cards, content, busy, onJoin, onCancel }) {
|
|||
const available = [...cards].filter((card) => !card.busy).sort((a, b) => (b.stats[role] ?? 0) - (a.stats[role] ?? 0) || b.power - a.power);
|
||||
return <div className="nebula-expedition-join">
|
||||
<div role="group" aria-label={content.joinRole} className="nds-toolbar">{group.freeRoles.map((value) => <button key={value} type="button" className="nds-button" data-size="sm" data-variant={value === role ? "primary" : "secondary"} aria-pressed={value === role} onClick={() => setRole(value)}>
|
||||
{fillTemplate(content.roleBadge, { role: content.roles[value], stat: content.stats[value] })}
|
||||
<RoleLabel stat={value} content={content} detail />
|
||||
</button>)}</div>
|
||||
{available.length ? <ul className="nebula-expedition-cards" aria-label={content.cardsLabel}>{available.map((card) => {
|
||||
const entry = editionEntry(catalog, card.editionId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue