style(lobby): format game mode labels and search toggle

This commit is contained in:
jessy-david-dev
2026-04-11 22:03:00 +02:00
parent ede083f881
commit d4bb21da5d
2 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -290,7 +290,7 @@ export async function PATCH(
player.lastSeen = Date.now(); player.lastSeen = Date.now();
if (room.gameMode === "race") { if (room.gameMode === "race") {
// En mode course, forfait ne termine pas la manche on attend qu'un vrai gagnant arrive // En mode course, forfait ne termine pas la manche - on attend qu'un vrai gagnant arrive
// Sauf si tous ont abandonné // Sauf si tous ont abandonné
const anyoneStillPlaying = room.players.some( const anyoneStillPlaying = room.players.some(
(p) => !p.hasWon && !p.hasSurrendered, (p) => !p.hasWon && !p.hasSurrendered,
+13 -5
View File
@@ -152,8 +152,10 @@ export function LobbyScreen({
onChange={(e) => setGameMode(e.target.value as Room["gameMode"])} onChange={(e) => setGameMode(e.target.value as Room["gameMode"])}
className="w-full min-h-11 px-2 bg-[#0f0f0f] border border-[#2e2e2e] rounded-xl text-sm text-[#f0f0f0] outline-none focus:border-[#7c3aed] cursor-pointer transition-colors" className="w-full min-h-11 px-2 bg-[#0f0f0f] border border-[#2e2e2e] rounded-xl text-sm text-[#f0f0f0] outline-none focus:border-[#7c3aed] cursor-pointer transition-colors"
> >
<option value="race">🏁 Course le premier arrivé gagne</option> <option value="race">Course - le premier arrivé gagne</option>
<option value="all_finish"> Normal tout le monde joue jusqu&apos;au bout</option> <option value="all_finish">
Normal - tout le monde joue jusqu&apos;au bout
</option>
</select> </select>
</div> </div>
<div className="flex gap-3"> <div className="flex gap-3">
@@ -191,7 +193,9 @@ export function LobbyScreen({
className={`w-full min-h-11 rounded-xl text-sm font-semibold border transition-colors cursor-pointer flex items-center justify-between px-4 ${room.searchAllowed ? "bg-[#7c3aed]/10 border-[#7c3aed] text-[#a78bfa]" : "bg-[#1a1a1a] border-[#2e2e2e] text-[#888]"}`} className={`w-full min-h-11 rounded-xl text-sm font-semibold border transition-colors cursor-pointer flex items-center justify-between px-4 ${room.searchAllowed ? "bg-[#7c3aed]/10 border-[#7c3aed] text-[#a78bfa]" : "bg-[#1a1a1a] border-[#2e2e2e] text-[#888]"}`}
> >
<span>🔍 Recherche Ctrl+F</span> <span>🔍 Recherche Ctrl+F</span>
<span className={`text-xs font-bold px-2 py-0.5 rounded-full ${room.searchAllowed ? "bg-[#7c3aed]/30 text-[#a78bfa]" : "bg-[#242424] text-[#555]"}`}> <span
className={`text-xs font-bold px-2 py-0.5 rounded-full ${room.searchAllowed ? "bg-[#7c3aed]/30 text-[#a78bfa]" : "bg-[#242424] text-[#555]"}`}
>
{room.searchAllowed ? "Autorisée" : "Bloquée"} {room.searchAllowed ? "Autorisée" : "Bloquée"}
</span> </span>
</button> </button>
@@ -199,9 +203,13 @@ export function LobbyScreen({
)} )}
{!isHost && ( {!isHost && (
<div className={`w-full min-h-11 rounded-xl text-sm font-semibold border flex items-center justify-between px-4 ${room.searchAllowed ? "bg-[#7c3aed]/10 border-[#7c3aed] text-[#a78bfa]" : "bg-[#1a1a1a] border-[#2e2e2e] text-[#888]"}`}> <div
className={`w-full min-h-11 rounded-xl text-sm font-semibold border flex items-center justify-between px-4 ${room.searchAllowed ? "bg-[#7c3aed]/10 border-[#7c3aed] text-[#a78bfa]" : "bg-[#1a1a1a] border-[#2e2e2e] text-[#888]"}`}
>
<span>🔍 Recherche Ctrl+F</span> <span>🔍 Recherche Ctrl+F</span>
<span className={`text-xs font-bold px-2 py-0.5 rounded-full ${room.searchAllowed ? "bg-[#7c3aed]/30 text-[#a78bfa]" : "bg-[#242424] text-[#555]"}`}> <span
className={`text-xs font-bold px-2 py-0.5 rounded-full ${room.searchAllowed ? "bg-[#7c3aed]/30 text-[#a78bfa]" : "bg-[#242424] text-[#555]"}`}
>
{room.searchAllowed ? "Autorisée" : "Bloquée"} {room.searchAllowed ? "Autorisée" : "Bloquée"}
</span> </span>
</div> </div>