diff --git a/.gitignore b/.gitignore index 722748d..a91d6c6 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ web/out/ # production web/build +deploy/ # debug npm-debug.log* diff --git a/web/app/multiplayer/NumberPad.js b/web/app/multiplayer/NumberPad.js index 99321b0..507a2f5 100644 --- a/web/app/multiplayer/NumberPad.js +++ b/web/app/multiplayer/NumberPad.js @@ -57,21 +57,20 @@ export default function NumberPad({ digitNumber, onSubmit, disabled = false, bus }); return ( -
-
-
- {digits.map((d, i) => ( -
- {d} -
- ))} -
+
+ {/* Boxes shrink to fit the screen width, so up to 10 digits fit on a phone without scrolling */} +
+ {digits.map((d, i) => ( +
+ {d} +
+ ))}
-
+
{KEYPAD.map((n) => { const off = used.has(String(n)) || locked; return ( diff --git a/web/app/multiplayer/page.js b/web/app/multiplayer/page.js index cc4c62e..2f4e9c6 100755 --- a/web/app/multiplayer/page.js +++ b/web/app/multiplayer/page.js @@ -49,22 +49,24 @@ export default function MultiplayerLobby() { }; return ( -
-
- +
+ {/* 3-column grid keeps the title centred without the Home link overlapping it on narrow screens */} +
+ ← Home - Multiplayer +

Multiplayer

+
-
-
-

Games

+
+
+

Games

@@ -80,24 +82,24 @@ export default function MultiplayerLobby() { {games?.map((g) => (
  • {g.name}

    -

    +

    {GAME_TYPES[g.type]?.label} · {g.digits} digits · {g.players}/2 players

    - + {g.status.toLowerCase()} {g.status === 'WAITING' && ( @@ -141,7 +143,7 @@ function CreateGameModal({ onClose, onCreated }) {
    e.stopPropagation()} - className="bg-neutral-800 rounded-xl p-4 sm:p-6 w-full max-w-md flex flex-col gap-4" + className="bg-neutral-800 rounded-xl p-4 sm:p-6 w-full max-w-md max-h-[90dvh] overflow-y-auto flex flex-col gap-4" >

    Create New Game

    diff --git a/web/app/multiplayer/play/page.js b/web/app/multiplayer/play/page.js index e6f3fc3..0b236e8 100644 --- a/web/app/multiplayer/play/page.js +++ b/web/app/multiplayer/play/page.js @@ -140,31 +140,39 @@ export default function MultiplayerPlayPage() { const elapsed = state.stage === 'PLAYING' ? state.elapsedMs + (Date.now() - receivedAt) : state.elapsedMs; return ( -
    -
    -
    -

    {state.name}

    -

    +

    {state.name}

    +

    {type?.label} · {state.digits} digits

    -
    +
    {(state.stage === 'PLAYING' || finished) && state.elapsedMs > 0 && ( - + ⏱ {formatTime(elapsed)} )} {roundBased && state.stage === 'PLAYING' && ( - Round {state.round} + + Round {state.round} + )}
    -
    -
    + {/* Mobile: one scrolling column (game, then history). Desktop: side by side, each scrolls on its own. */} +
    +
    + {/* my-auto centres the content when there is room without clipping its top when there isn't */} +
    {state.stage === 'WAITING' && } {state.stage === 'SETUP' && ( @@ -174,16 +182,17 @@ export default function MultiplayerPlayPage() { )} {finished && } {actionError &&

    {actionError}

    } +
    {(state.stage === 'PLAYING' || finished) && ( -