Provide authenticated owner/operator room controls with live account binding, durable audit and exact saved retries. Pause gates human, bot and automatic writes while preserving recovery, discussion and taking back control. Resume keeps decisions and restores AI pacing. Add directory availability filters and player notices. Verified types, lint, 5223 offline tests, 52 HTTP tests and build. Independent persistence/privacy review and authenticated HTTP acceptance passed. Desktop/mobile browser QA confirmed lost-response refresh/retry makes one audit row and resume restores controls. Existing games preserved. Authenticated deployed admin acceptance remains pending explicit QA access confirmation.
15 lines
949 B
TypeScript
15 lines
949 B
TypeScript
import type { RoomControl } from '@/lib/room-control';
|
|
|
|
/** Public operational status only; administrator reasons and identity stay private. */
|
|
export function RoomControlNotice({ control }: { control?: RoomControl }) {
|
|
if (!control?.paused && !control?.joinLocked) return null;
|
|
return <section className="notice" aria-label="Room availability" aria-live="polite">
|
|
{control.paused ? <>
|
|
<h2 className="text-lg font-semibold">Room paused by an administrator</h2>
|
|
<p>Player decisions and automatic play are paused. Your game and pending choices are saved. An administrator can resume this room.</p>
|
|
<p>You can still read the table, use discussion, protect or recover your seat, and take back control from AI.</p>
|
|
</> : <h2 className="text-lg font-semibold">New joins are locked</h2>}
|
|
{control.joinLocked && <p>New players cannot join. Existing players can reconnect and recover their saved seats.</p>}
|
|
</section>;
|
|
}
|