diff --git a/client/src/lib/list.svelte b/client/src/lib/list.svelte new file mode 100644 index 0000000..d950064 --- /dev/null +++ b/client/src/lib/list.svelte @@ -0,0 +1,75 @@ + + +
+
+

Rooms

+
+ + +
+
+
+ {#if $list} + + {:else} + Loading... + {/if} +
+
+ +{#if createRoomOpen} +
createRoomOpen = false} on:click={() => createRoomOpen = false}>
+{/if} + +
+

Create room

+ +
+ +
+ + +
+
+ + \ No newline at end of file diff --git a/client/src/lib/nameChoose.svelte b/client/src/lib/nameChoose.svelte new file mode 100644 index 0000000..7a464f0 --- /dev/null +++ b/client/src/lib/nameChoose.svelte @@ -0,0 +1,60 @@ + + +{#if shown} +
+
+

What is your nickname

+

This name is publicly visible and needs to be unique among the connected players.

+
+ +
+ + +
+
+{/if} + + \ No newline at end of file diff --git a/client/src/lib/websocket.ts b/client/src/lib/websocket.ts index 24b5859..87a9e48 100644 --- a/client/src/lib/websocket.ts +++ b/client/src/lib/websocket.ts @@ -160,7 +160,7 @@ interface SystemMessage { } export const connection: Writable = writable(null); -export const list: Writable<{ name: string, count: number }[] | null> = writable(null); +export const list: Writable<{ name: string }[] | null> = writable(null); export const listLoading = writable(true); export const room: Writable<{ name: string, host: string } | null> = writable(null); export const messages: Writable<(UserMessage | ErrorMessage | SystemMessage)[]> = writable([]); diff --git a/client/src/routes/+page.svelte b/client/src/routes/+page.svelte index 1eef5d9..19fe789 100644 --- a/client/src/routes/+page.svelte +++ b/client/src/routes/+page.svelte @@ -50,12 +50,6 @@ .chooser > a { @apply text-black no-underline cursor-pointer w-full p-8 border rounded-lg border-gray-400 border-solid; } - .chooser > .multi { - @apply cursor-not-allowed text-gray-500; - } - .chooser > .multi img { - @apply opacity-50; - } .rules { @apply cursor-not-allowed text-gray-500 flex justify-center items-center w-full my-8 p-4 border rounded-lg border-gray-400 border-solid; } diff --git a/client/src/routes/multiplayer/+page.svelte b/client/src/routes/multiplayer/+page.svelte index a4db1bd..6390e8f 100644 --- a/client/src/routes/multiplayer/+page.svelte +++ b/client/src/routes/multiplayer/+page.svelte @@ -1,8 +1,8 @@ {#if !$connection} diff --git a/client/tsconfig.json b/client/tsconfig.json index 6345eab..b2e8d30 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -11,8 +11,8 @@ "strict": true, "paths": { - "$lib": ["src/lib"], - "$lib/*": ["src/lib/*"] + "$lib": ["./src/lib"], + "$lib/*": ["./src/lib/*"] } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b8fd0d..2a82971 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,9 +41,9 @@ importers: server: specifiers: - uWebSockets.js: github:uNetworking/uWebSockets.js#v20.10.0 + uWebSockets.js: github:uNetworking/uWebSockets.js#v20.19.0 dependencies: - uWebSockets.js: github.com/uNetworking/uWebSockets.js/806df48c9da86af7b3341f3e443388c7cd15c3de + uWebSockets.js: github.com/uNetworking/uWebSockets.js/42c9c0d5d31f46ca4115dc75672b0037ec970f28 packages: @@ -1519,8 +1519,8 @@ packages: engines: {node: '>=10'} dev: false - github.com/uNetworking/uWebSockets.js/806df48c9da86af7b3341f3e443388c7cd15c3de: - resolution: {tarball: https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/806df48c9da86af7b3341f3e443388c7cd15c3de} + github.com/uNetworking/uWebSockets.js/42c9c0d5d31f46ca4115dc75672b0037ec970f28: + resolution: {tarball: https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/42c9c0d5d31f46ca4115dc75672b0037ec970f28} name: uWebSockets.js - version: 20.10.0 + version: 20.19.0 dev: false diff --git a/server/package.json b/server/package.json index eee8bc9..8a0ce1f 100644 --- a/server/package.json +++ b/server/package.json @@ -4,12 +4,13 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node src" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.10.0" + "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.19.0" } }