Shorten the upgrade tip and move the recycling reminder into the confirmation
The upgrade tip now reads "Palier d'Éveil à Puissance 85. Améliorez de préférence avec les Éclats : vos doublons y serviront.", which no longer contradicts the duplicate button next to it. The recycling reminder leaves the narrow box for the confirmation, as a warning notice naming the rarities that also awaken cards; it shows only when the selection goes past commons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d863964a5d
commit
5197867dd4
3 changed files with 7 additions and 5 deletions
|
|
@ -71,6 +71,7 @@ export function CollectionPanel({ catalog, state, runMutation, busy, headingCont
|
|||
const massRarities = catalog.rarities.filter((rarity) => Object.hasOwn(recycling.byRarity ?? {}, rarity.id));
|
||||
const chosenRarities = massRarities.slice(0, massRarities.findIndex((rarity) => rarity.id === maxRarity) + 1);
|
||||
const chosen = chosenRarities.map((rarity) => recycling.byRarity[rarity.id]);
|
||||
const awakeningRarities = chosenRarities.filter((rarity) => rarity.id !== "common");
|
||||
const preview = { count: chosen.reduce((total, item) => total + item.count, 0), stardust: chosen.reduce((total, item) => total + item.stardust, 0) };
|
||||
const showingDuplicates = ownership.includes("duplicates");
|
||||
const collectionOptions = collections.map((item) => ({ value: item.id, label: item.name }));
|
||||
|
|
@ -89,7 +90,6 @@ export function CollectionPanel({ catalog, state, runMutation, busy, headingCont
|
|||
<StardustBalance value={wallet.stardust} />
|
||||
<SelectDropdown className="nebula-recycle-box-rarity" label={content.maxRarityLabel} size="sm" value={maxRarity} options={massRarities.map((rarity) => ({ value: rarity.id, label: rarity.label }))} onChange={setMaxRarity} />
|
||||
{preview.count ? <p><strong>{countDuplicates(preview.count)}</strong> à recycler pour <strong>+{formatStardust(preview.stardust)}</strong></p> : <p>{content.none}</p>}
|
||||
{maxRarity !== "common" && <p className="nebula-form-help">{content.keepForAwakening}</p>}
|
||||
<div className="nebula-recycle-box-actions">
|
||||
<button className="nds-button" data-size="sm" data-variant="primary" type="button" disabled={busy || Boolean(state.pendingOpening) || !preview.count} onClick={() => setConfirmingRecycle(true)}>{content.allButton}</button>
|
||||
<button className="nds-button" data-size="sm" data-variant="secondary" type="button" onClick={() => setOwnership(showingDuplicates ? [] : ["duplicates"])}>{showingDuplicates ? content.viewAll : content.viewDuplicates}</button>
|
||||
|
|
@ -136,6 +136,8 @@ export function CollectionPanel({ catalog, state, runMutation, busy, headingCont
|
|||
confirmLabel={content.allButton}
|
||||
onClose={(confirmed) => { setConfirmingRecycle(false); if (confirmed) void recycleAll(); }}
|
||||
>
|
||||
{/* Au-delà des communes, les doublons recyclés auraient pu éveiller des cartes. */}
|
||||
{awakeningRarities.length > 0 && <p className="nds-inline-notice" data-variant="warning">{fillTemplate(content.keepForAwakening, { rarities: frenchList(awakeningRarities.map((rarity) => rarityAdjective(catalog, rarity.id, 2))) })}</p>}
|
||||
<p className="nebula-form-help">{content.confirmKept}</p>
|
||||
{/* Seules les raretés recyclées cette fois, avec ce que rapporte chacun de leurs doublons. */}
|
||||
<ul className="nebula-shop-rates" aria-label={content.ratesLabel}>{chosenRarities.map((rarity) => <li key={rarity.id} data-rarity={rarity.id}><span>{rarity.label}</span><StardustBalance value={shop.stardustValues[rarity.id] ?? 0} /></li>)}</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue