ui(post-match): compact the result modal so it fits mobile without scrolling
The end-of-match modal (title + reward rows + XP bar + full roster + button) was too tall on phones and scrolled. Shrink the mobile sizes (padding, emoji, title, hero-coins, spacing) with sm: bumping back up on larger screens, and tighten the player roster rows. Fits a portrait phone in one view. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -30,14 +30,14 @@ export function MatchPlayersList() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-5 text-start">
|
<div className="mt-3 sm:mt-4 text-start">
|
||||||
<div className="text-[11px] font-bold text-cream/55 mb-2">{t("match.players")}</div>
|
<div className="text-[11px] font-bold text-cream/55 mb-1.5">{t("match.players")}</div>
|
||||||
<div className="space-y-1.5">
|
<div className="space-y-1">
|
||||||
{seatPlayers.map((p, i) => {
|
{seatPlayers.map((p, i) => {
|
||||||
const isMe = p.id ? p.id === myId : !p.isBot;
|
const isMe = p.id ? p.id === myId : !p.isBot;
|
||||||
const canAdd = !!p.id && !p.isBot && p.id !== myId;
|
const canAdd = !!p.id && !p.isBot && p.id !== myId;
|
||||||
return (
|
return (
|
||||||
<div key={i} className="flex items-center gap-2.5 glass rounded-xl px-2.5 py-1.5">
|
<div key={i} className="flex items-center gap-2.5 glass rounded-xl px-2.5 py-1">
|
||||||
{canAdd ? (
|
{canAdd ? (
|
||||||
<button
|
<button
|
||||||
onClick={() => viewProfile(p.id!)}
|
onClick={() => viewProfile(p.id!)}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export function PostMatchRewardsModal({
|
|||||||
initial={{ scale: 0.82, y: 28 }}
|
initial={{ scale: 0.82, y: 28 }}
|
||||||
animate={{ scale: 1, y: 0 }}
|
animate={{ scale: 1, y: 0 }}
|
||||||
transition={{ type: "spring", stiffness: 200, damping: 18 }}
|
transition={{ type: "spring", stiffness: 200, damping: 18 }}
|
||||||
className="glass rounded-3xl p-7 short:p-4 w-full max-w-sm landscape:max-w-md text-center relative max-h-[94dvh] overflow-y-auto overflow-x-hidden"
|
className="glass rounded-3xl p-4 sm:p-6 short:p-4 w-full max-w-sm landscape:max-w-md text-center relative max-h-[94dvh] overflow-y-auto overflow-x-hidden"
|
||||||
>
|
>
|
||||||
{/* radiating bg glow */}
|
{/* radiating bg glow */}
|
||||||
<div
|
<div
|
||||||
@@ -98,13 +98,13 @@ export function PostMatchRewardsModal({
|
|||||||
initial={{ scale: 0, rotate: -20 }}
|
initial={{ scale: 0, rotate: -20 }}
|
||||||
animate={{ scale: 1, rotate: 0 }}
|
animate={{ scale: 1, rotate: 0 }}
|
||||||
transition={{ type: "spring", stiffness: 180, delay: 0.1 }}
|
transition={{ type: "spring", stiffness: 180, delay: 0.1 }}
|
||||||
className="text-6xl short:text-4xl mb-2 short:mb-0 relative"
|
className="text-5xl sm:text-6xl short:text-4xl mb-1 sm:mb-2 short:mb-0 relative"
|
||||||
>
|
>
|
||||||
{won ? "🏆" : "🎴"}
|
{won ? "🏆" : "🎴"}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
<h2 className="gold-text text-2xl short:text-xl font-black relative">{t("reward.title")}</h2>
|
<h2 className="gold-text text-xl sm:text-2xl short:text-xl font-black relative">{t("reward.title")}</h2>
|
||||||
<p className={"relative mt-1 font-bold text-lg short:text-base " + (won ? "text-teal-300" : "text-rose-300")}>
|
<p className={"relative mt-0.5 sm:mt-1 font-bold text-base sm:text-lg short:text-base " + (won ? "text-teal-300" : "text-rose-300")}>
|
||||||
{won ? t("reward.win") : t("reward.lose")}
|
{won ? t("reward.win") : t("reward.lose")}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -114,9 +114,9 @@ export function PostMatchRewardsModal({
|
|||||||
initial={{ scale: 0.5, opacity: 0 }}
|
initial={{ scale: 0.5, opacity: 0 }}
|
||||||
animate={{ scale: 1, opacity: 1 }}
|
animate={{ scale: 1, opacity: 1 }}
|
||||||
transition={{ type: "spring", stiffness: 200, damping: 14, delay: 0.18 }}
|
transition={{ type: "spring", stiffness: 200, damping: 14, delay: 0.18 }}
|
||||||
className="relative mt-4 short:mt-2 flex items-center justify-center gap-2"
|
className="relative mt-3 sm:mt-4 short:mt-2 flex items-center justify-center gap-2"
|
||||||
>
|
>
|
||||||
<span className="text-5xl short:text-3xl font-black gold-text">
|
<span className="text-4xl sm:text-5xl short:text-3xl font-black gold-text">
|
||||||
+<CountUp to={reward.coinsDelta} ms={1100} />
|
+<CountUp to={reward.coinsDelta} ms={1100} />
|
||||||
</span>
|
</span>
|
||||||
<motion.span
|
<motion.span
|
||||||
@@ -128,7 +128,7 @@ export function PostMatchRewardsModal({
|
|||||||
</motion.div>
|
</motion.div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="relative mt-5 short:mt-3 space-y-2 short:space-y-1.5">
|
<div className="relative mt-3 sm:mt-4 short:mt-3 space-y-1.5 sm:space-y-2">
|
||||||
{reward.ratingDelta !== 0 && (
|
{reward.ratingDelta !== 0 && (
|
||||||
<RewardRow
|
<RewardRow
|
||||||
icon={reward.ratingDelta > 0
|
icon={reward.ratingDelta > 0
|
||||||
@@ -239,7 +239,7 @@ export function PostMatchRewardsModal({
|
|||||||
|
|
||||||
<MatchPlayersList />
|
<MatchPlayersList />
|
||||||
|
|
||||||
<button onClick={onClose} className="relative press-3d btn-gold w-full rounded-xl py-3.5 mt-6 font-black text-base">
|
<button onClick={onClose} className="relative press-3d btn-gold w-full rounded-xl py-3 mt-4 sm:mt-5 font-black text-base">
|
||||||
{t("reward.continue")}
|
{t("reward.continue")}
|
||||||
</button>
|
</button>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
Reference in New Issue
Block a user