Hide unrevealed Cards pulls and show the odds players really get
Keep a pending opening's cards out of the home highlight and collection until they are revealed, and refuse transfers meanwhile. Odds now ignore rarities a pack cannot give. Stable files gain an ETag so card images revalidate instead of downloading again, and logging out clears the local collection copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b2e46b1d2a
commit
155187d01f
11 changed files with 167 additions and 26 deletions
|
|
@ -30,6 +30,11 @@ export function writeCardsCache(state, catalog) {
|
|||
return transact("readwrite", (store) => store.put({ playerId: state.player.id, format: SNAPSHOT_FORMAT, savedAt: Date.now(), state, catalog }));
|
||||
}
|
||||
|
||||
// La copie locale n'appartient qu'au joueur connecté : un autre utilisateur du navigateur ne doit pas la retrouver.
|
||||
export function clearCardsCache() {
|
||||
return transact("readwrite", (store) => store.clear());
|
||||
}
|
||||
|
||||
export async function readLatestCardsCache() {
|
||||
const entries = await transact("readonly", (store) => store.getAll());
|
||||
return entries.filter((entry) => entry.format === SNAPSHOT_FORMAT).sort((left, right) => right.savedAt - left.savedAt)[0] || null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue