You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crate: configurable animation model + desktop picker (#65)
* Crate: configurable animation model + desktop picker
Closes#16, closes#17.
shared/crate.ts defines five variants (reel, spin, flip, burst, instant) with
their durations. reel is first and is the default - it is what every existing
store already plays, so an operator who never opens this setting sees no change.
normalizeCrateAnimation coerces anything - an old config, a hand-edited json, a
renderer sending nonsense - to a real variant and never throws. A bad animation
value must not stop a player receiving what they paid for.
The setting is per-server store config, not a global app preference: the people
who see it are the players buying from that server's panel, not the operator at
the desktop. It is carried on StorePublic too, because the panel plays it from
the buyer-facing payload.
Desktop picker sits in the Store tab with a plain-language description of each
variant (including how long it takes). Panel rendering of the new variants is
the next slice.
* Review fix: handle a failed animation save, and show what was actually stored
The picker updated state optimistically and awaited with no catch: a failed IPC
left the UI claiming a setting the server never took, and rejected the promise
into nothing. It now reverts on failure and adopts the value the main side
returns, which is the coerced one.
0 commit comments