+ The server is busy right now, so new games can't be created. You can still join an existing
+ lobby — please try again in a moment.
+
+ )}
or join a lobby
diff --git a/wizard_website/src/screens/LobbyScreen/LobbyScreen.module.css b/wizard_website/src/screens/LobbyScreen/LobbyScreen.module.css
index fdee31e..d93e05c 100644
--- a/wizard_website/src/screens/LobbyScreen/LobbyScreen.module.css
+++ b/wizard_website/src/screens/LobbyScreen/LobbyScreen.module.css
@@ -211,3 +211,13 @@
color: var(--text-muted);
font-size: 14px;
}
+
+.busy {
+ margin: 0;
+ padding: 12px 16px;
+ border: 1px solid rgb(255 209 102 / 40%);
+ border-radius: 12px;
+ background: rgb(255 209 102 / 8%);
+ color: var(--gold);
+ font-size: 14px;
+}
diff --git a/wizard_website/src/screens/LobbyScreen/LobbyScreen.tsx b/wizard_website/src/screens/LobbyScreen/LobbyScreen.tsx
index 0748f41..3e08525 100644
--- a/wizard_website/src/screens/LobbyScreen/LobbyScreen.tsx
+++ b/wizard_website/src/screens/LobbyScreen/LobbyScreen.tsx
@@ -7,6 +7,8 @@ import styles from './LobbyScreen.module.css'
interface LobbyScreenProps {
lobby: Lobby
playerId: string
+ // False while the server refuses new games (overloaded or full).
+ acceptingGames: boolean
actions: WizardActions
}
@@ -17,7 +19,7 @@ function inviteLink(code: string): string {
return url.toString()
}
-export function LobbyScreen({ lobby, playerId, actions }: LobbyScreenProps) {
+export function LobbyScreen({ lobby, playerId, acceptingGames, actions }: LobbyScreenProps) {
const [copied, setCopied] = useState<'code' | 'link' | null>(null)
const isHost = lobby.host_id === playerId
const isFull = lobby.players.length >= lobby.max_players
@@ -116,13 +118,24 @@ export function LobbyScreen({ lobby, playerId, actions }: LobbyScreenProps) {
+ {!acceptingGames && (
+
+ The server is busy right now, so games can't be started. Your lobby stays open — try again in a
+ moment.
+
+ )}
+