mirror of
https://github.com/tiennm99/noitu.git
synced 2026-10-14 12:16:58 +00:00
A refused resume now leaves the room instead of showing a banner over a dead board, and /play offers a fresh game there. Entering /play forgets any stored token so it no longer races StartBotGame. An eliminated player who reconnects stays a spectator. Held lobby actions wait for the resume's RoomState; leaving while offline is not held. Chat clears its draft only when the line was sent and cannot send while offline. Also: away banners no longer announce every second; game over does not steal focus from the chat field; the clock offset uses the lowest-RTT pong; the history export numbers a resumed chain from its real length; chat replay keeps existing ordinals; one .primary button class replaces five copies; the footer links the data change list; the online heading joins the type ramp. New component, connection and storage-guard tests.
13 lines
328 B
JavaScript
13 lines
328 B
JavaScript
// Not a test file: a place for the `$state` rune, which only compiles in a
|
|
// `.svelte.js` module, so a test can change a mounted component's props.
|
|
|
|
/**
|
|
* @template {Record<string, unknown>} T
|
|
* @param {T} initial
|
|
* @returns {T}
|
|
*/
|
|
export function reactiveProps(initial) {
|
|
const props = $state(initial);
|
|
return props;
|
|
}
|