Release 2.0.0

Updated display and host
This commit is contained in:
2026-01-03 00:38:52 +01:00
parent 48074f7603
commit b24e43e142
13 changed files with 357 additions and 388 deletions

View File

@@ -6,27 +6,11 @@
import ws from "$lib/websocket.svelte";
import { MessageType } from "$lib/MessageType";
import type { VisitedQuestions } from "$lib/Types";
import { onMount } from "svelte";
import { fetchWall } from "../../../../../editor/fetchers";
console.log("wall:", page.params.wall);
let paramWall = page.params.wall;
if (paramWall === undefined) {
error(404);
}
const wallIndex = parseInt(paramWall);
if (isNaN(wallIndex)) {
error(404);
}
if (DisplayStateSvelte.wallIndex !== wallIndex) {
const wall = DisplayStateSvelte.game?.walls[wallIndex];
if (wall) {
DisplayStateSvelte.wall = wall;
DisplayStateSvelte.gameIndex = wallIndex;
} else {
error(404);
}
}
let visited: VisitedQuestions = $state([]);
$effect(() => {
@@ -40,6 +24,12 @@
}
} catch (e) {}
});
onMount(() => {
fetchWall(`${page.params.wall}`).then((wall) => {
DisplayStateSvelte.wall = wall;
});
});
</script>
<Wall wall={DisplayStateSvelte.wall} {visited} />