···11# TODO
2233-## Ben
33+- [ ] Start on start game and game settings buttons
44+- [ ] If host leaves, kick all from lobby
4555-- [x] Transport : Packet splitting
66-- [x] Transport : Handle Errors
77-- [x] Transport : Mark game started on client
88-- [x] API : Command to check if a game exists and is open for fast error checking
99-- [x] Transport : Switch to burst message processing for less time in the
1010- critical path
1111-- [x] State : Event history tracking
1212-- [x] State : Post game sync
1313-- [x] API : Handling Profile Syncing
1414-- [x] API : State Update Events
1515-- [x] API : Game Replay Screen
1616-- [x] Frontend : Scaffolding
1717-- [x] Meta : CI Setup
1818-- [x] Meta : README Instructions
1919-- [x] Meta : Recipes for type binding generation
2020-- [x] Signaling: All of it
2121-- [x] Backend : Better transport error handling
2222-- [x] Backend : Abstract lobby? Separate crate?
2323-- [x] Transport : Handle transport cancellation better
2424-- [x] Backend : Add checks for when the `powerup_locations` field is an empty array in settings
2525-- [ ] Backend : More tests
2626- - [x] Lobby tests
2727- - [x] Game end test for actual return from loop
2828- - [x] More transport crate tests
2929- - [x] Signaling is wrong, only kick everyone else on host leave if the lobby is open
3030- - [x] Organize signalling and seperate out more logic
3131- - [x] Signaling tests
3232- - [ ] Testing crate for integration testing?
3333- - [ ] NixOS VM tests wrapping the testing crate?
3434-- [ ] Nix : Cheat the dependency nightmare and use crane
3535-- [x] Nix : Fix manhunt.nix to actually build
+16-5
frontend/src/components/LobbyScreen.tsx
···33import { useTauriEvent } from "@/lib/hooks";
44import ProfilePicture, { iconForDecor, ProfileDecor } from "./ProfilePicture";
55import { tempSettings } from "./MenuScreen";
66+import { ask } from "@tauri-apps/plugin-dialog";
67import {
78 IconArrowBigLeftLinesFilled,
89 IconCircleCheckFilled,
910 IconCircleDashedPlus
1011} from "@tabler/icons-react";
1212+import LoadingCover from "./LoadingCover";
11131214function ProfileList({
1315 profiles,
···63656466export default function LobbyScreen() {
6567 const [lobbyState, setLobbyState] = useState(initLobbyState);
6868+ const [loadingCover, setLoadingCover] = useState(false);
66696770 useEffect(() => {
6871 let cancel = false;
6972 commands.getLobbyState().then((state) => {
7073 if (!cancel) {
7174 setLobbyState(state);
7575+ setLoadingCover(false);
7276 }
7377 });
7478 return () => {
···9397 const isSeeker = lobbyState.teams[lobbyState.self_id] ?? false;
94989599 const onLeaveLobby = () => {
9696- // TODO: Tauri plugin dialog instead
9797- const choice = window.confirm("Are you sure you want to leave this lobby?");
100100+ const hostMsg = lobbyState.is_host ? " You are the host so this will cancel the lobby" : "";
101101+102102+ const msg = `Are you sure you want to leave this lobby?${hostMsg}`;
981039999- if (choice) {
100100- commands.quitToMenu();
101101- }
104104+ ask(msg, {
105105+ title: "Leave Lobby",
106106+ kind: lobbyState.is_host ? "warning" : "info"
107107+ }).then((choice) => {
108108+ if (choice) {
109109+ commands.quitToMenu();
110110+ }
111111+ });
102112 };
103113104114 return (
105115 <>
116116+ <LoadingCover text="Fetching Info" show={loadingCover} />
106117 <header>
107118 <span className="grow">Lobby</span>
108119 <span>Join: {lobbyState.join_code}</span>