feat(web): richer desktop layout for end screen and back-office

- end screen: wider container (max-w-4xl), podium/awards stay centered, and the
  two long sections (musiques + récap des manches) sit side-by-side on desktop
- back-office: 2-column layout (form | questions list) on desktop, wider

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
AyoubBenziza 2026-06-11 15:24:34 +02:00
parent 879bc5b388
commit fa7c97c402
3 changed files with 23 additions and 12 deletions

View file

@ -180,7 +180,8 @@ export function GameEndView({ snapshot }: { snapshot: RoomSnapshot }) {
const rest = ranked.slice(3) const rest = ranked.slice(3)
return ( return (
<div className="flex w-full max-w-lg flex-col gap-6 text-center"> <div className="flex w-full flex-col items-center gap-6">
<div className="flex w-full max-w-xl flex-col gap-6 text-center">
<header> <header>
<p className="text-muted-foreground text-xs uppercase"> <p className="text-muted-foreground text-xs uppercase">
Partie terminée Partie terminée
@ -253,16 +254,22 @@ export function GameEndView({ snapshot }: { snapshot: RoomSnapshot }) {
{gameRecap && gameRecap.length > 0 && ( {gameRecap && gameRecap.length > 0 && (
<FunStats recap={gameRecap} snapshot={snapshot} /> <FunStats recap={gameRecap} snapshot={snapshot} />
)} )}
</div>
{/* Détails (musiques + récap) côte à côte sur desktop. */}
{((gameTracks && gameTracks.length > 0) ||
(gameRecap && gameRecap.length > 0)) && (
<div className="grid w-full gap-6 md:grid-cols-2 md:items-start">
{gameTracks && gameTracks.length > 0 && ( {gameTracks && gameTracks.length > 0 && (
<TracksRecap tracks={gameTracks} /> <TracksRecap tracks={gameTracks} />
)} )}
{gameRecap && gameRecap.length > 0 && ( {gameRecap && gameRecap.length > 0 && (
<RoundsRecap recap={gameRecap} nameOf={nameOf} playerId={playerId} /> <RoundsRecap recap={gameRecap} nameOf={nameOf} playerId={playerId} />
)} )}
</div>
)}
<div className="flex flex-col gap-2"> <div className="flex w-full max-w-sm flex-col gap-2">
<Button variant="secondary" className="w-full" onClick={copyResults}> <Button variant="secondary" className="w-full" onClick={copyResults}>
{copied ? <Check className="text-green-500" /> : <ClipboardList />} {copied ? <Check className="text-green-500" /> : <ClipboardList />}
{copied ? "Copié !" : "Copier les résultats"} {copied ? "Copié !" : "Copier les résultats"}

View file

@ -90,7 +90,7 @@ function AdminPanel({ onLogout }: { onLogout: () => void }) {
questions.isError && /401|autoris/i.test(String(questions.error)) questions.isError && /401|autoris/i.test(String(questions.error))
return ( return (
<div className="mx-auto flex min-h-svh w-full max-w-2xl flex-col gap-6 p-6"> <div className="mx-auto flex min-h-svh w-full max-w-5xl flex-col gap-6 p-6">
<header className="flex items-center justify-between"> <header className="flex items-center justify-between">
<h1 className="font-heading text-2xl font-bold">Back-office quiz</h1> <h1 className="font-heading text-2xl font-bold">Back-office quiz</h1>
<Button size="sm" variant="secondary" onClick={onLogout}> <Button size="sm" variant="secondary" onClick={onLogout}>
@ -106,7 +106,7 @@ function AdminPanel({ onLogout }: { onLogout: () => void }) {
</button> </button>
</p> </p>
) : ( ) : (
<> <div className="grid gap-6 md:grid-cols-2 md:items-start">
<QuestionForm <QuestionForm
onCreated={() => onCreated={() =>
qc.invalidateQueries({ queryKey: ["admin-questions"] }) qc.invalidateQueries({ queryKey: ["admin-questions"] })
@ -131,7 +131,7 @@ function AdminPanel({ onLogout }: { onLogout: () => void }) {
))} ))}
</ul> </ul>
</section> </section>
</> </div>
)} )}
</div> </div>
) )

View file

@ -71,7 +71,11 @@ export function RoomPage({ code }: { code: string }) {
/> />
<div <div
className={`flex w-full flex-col gap-6 transition-[max-width] ${ className={`flex w-full flex-col gap-6 transition-[max-width] ${
phase === "lobby" ? "max-w-3xl" : "max-w-lg" phase === "lobby"
? "max-w-3xl"
: phase === "ended"
? "max-w-4xl"
: "max-w-lg"
}`} }`}
> >
<header className="flex items-center justify-between"> <header className="flex items-center justify-between">