mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-20 00:09:53 +00:00
Lobby urls! Server will server index.html and act as a SPA.
This commit is contained in:
+9
-7
@@ -14,7 +14,7 @@ import { generateCryptoRandomUUID } from "./Utils";
|
||||
import { consolex } from "../core/Consolex";
|
||||
import "./components/FlagInput";
|
||||
import { FlagInput } from "./components/FlagInput";
|
||||
import page from 'page';
|
||||
import page from "page";
|
||||
|
||||
class Client {
|
||||
private gameStop: () => void;
|
||||
@@ -86,13 +86,15 @@ class Client {
|
||||
}
|
||||
});
|
||||
|
||||
page('/join/:id', (ctx) => {
|
||||
// TODO: Implement logic for joining a lobby
|
||||
const id = ctx.params.id;
|
||||
consolex.log('join', id);
|
||||
});
|
||||
page("/join/:lobbyId", (ctx) => {
|
||||
const lobbyId = ctx.params.lobbyId;
|
||||
|
||||
page();
|
||||
this.joinModal.open(lobbyId);
|
||||
|
||||
consolex.log(`joining lobby ${lobbyId}`);
|
||||
});
|
||||
|
||||
page();
|
||||
}
|
||||
|
||||
private async handleJoinLobby(event: CustomEvent) {
|
||||
|
||||
Reference in New Issue
Block a user