release/0.1.0 #18

Merged
ayoub merged 68 commits from release/0.1.0 into main 2026-06-11 18:36:42 +00:00
3 changed files with 23 additions and 12 deletions
Showing only changes of commit fa7c97c402 - Show all commits

View file

@ -180,7 +180,8 @@ export function GameEndView({ snapshot }: { snapshot: RoomSnapshot }) {
const rest = ranked.slice(3)
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>
<p className="text-muted-foreground text-xs uppercase">
Partie terminée
@ -253,16 +254,22 @@ export function GameEndView({ snapshot }: { snapshot: RoomSnapshot }) {
{gameRecap && gameRecap.length > 0 && (
<FunStats recap={gameRecap} snapshot={snapshot} />
)}
</div>
{gameTracks && gameTracks.length > 0 && (
<TracksRecap tracks={gameTracks} />
{/* 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 && (
<TracksRecap tracks={gameTracks} />
)}
{gameRecap && gameRecap.length > 0 && (
<RoundsRecap recap={gameRecap} nameOf={nameOf} playerId={playerId} />
)}
</div>
)}
{gameRecap && gameRecap.length > 0 && (
<RoundsRecap recap={gameRecap} nameOf={nameOf} playerId={playerId} />
)}
<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}>
{copied ? <Check className="text-green-500" /> : <ClipboardList />}
{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))
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">
<h1 className="font-heading text-2xl font-bold">Back-office quiz</h1>
<Button size="sm" variant="secondary" onClick={onLogout}>
@ -106,7 +106,7 @@ function AdminPanel({ onLogout }: { onLogout: () => void }) {
</button>
</p>
) : (
<>
<div className="grid gap-6 md:grid-cols-2 md:items-start">
<QuestionForm
onCreated={() =>
qc.invalidateQueries({ queryKey: ["admin-questions"] })
@ -131,7 +131,7 @@ function AdminPanel({ onLogout }: { onLogout: () => void }) {
))}
</ul>
</section>
</>
</div>
)}
</div>
)

View file

@ -71,7 +71,11 @@ export function RoomPage({ code }: { code: string }) {
/>
<div
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">