From 798b883250e5d2ececeb03219a00bff7091e71b4 Mon Sep 17 00:00:00 2001 From: kurihada Date: Thu, 26 Feb 2026 15:50:51 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E6=88=BF=E9=97=B4=E9=A1=B5=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E4=BC=98=E5=8C=96=20=E2=80=94=20TopNav=20=E9=87=8D?= =?UTF-8?q?=E6=8E=92=E3=80=81=E8=BF=9B=E5=BA=A6=E8=B4=B4=E8=BF=91=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E3=80=81=E6=8C=89=E9=92=AE=E9=97=B4=E8=B7=9D=E6=94=B6?= =?UTF-8?q?=E7=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - TopNav: 退出按钮移到最左侧,房间号合并到邀请按钮,移除右侧内容避免与全局徽章重叠 - SwipeDeck: 移除绿色进度条,UserProgressBar 始终显示并贴在卡片正上方 - ActionButtons: 缩小与卡片的垂直间距 --- src/components/ActionButtons.tsx | 2 +- src/components/SwipeDeck.tsx | 112 ++++++++++++++----------------- src/components/TopNav.tsx | 38 ++++------- 3 files changed, 64 insertions(+), 88 deletions(-) diff --git a/src/components/ActionButtons.tsx b/src/components/ActionButtons.tsx index 29f600f..e9e6f8b 100644 --- a/src/components/ActionButtons.tsx +++ b/src/components/ActionButtons.tsx @@ -14,7 +14,7 @@ export default function ActionButtons({ disabled, }: ActionButtonsProps) { return ( -
+
; localIndex: number; total: number; userProfiles: Record; + onUndo: () => void; }) { const others = Object.entries(swipeCounts).filter(([id]) => id !== userId); - if (others.length === 0) return null; const myProfile = userProfiles[userId]; const myAvatar = myProfile?.avatar ?? getAvatar(userId).emoji; const myAvatarBg = myProfile ? getAvatarBg(myProfile.avatar) : "bg-emerald-500/20"; return ( -
- - - {myAvatar} - - 你 {localIndex}/{total} - - {others.map(([id, count]) => { - const finished = count >= total; - const profile = userProfiles[id]; - const emoji = profile?.avatar ?? getAvatar(id).emoji; - const bg = profile ? getAvatarBg(profile.avatar) : getAvatar(id).bg; - const label = profile?.username ?? ""; - return ( - - - {emoji} - - {label && {label}} - {count}/{total} - {finished && } +
+
+ + + {myAvatar} - ); - })} + 你 {localIndex}/{total} + + {others.map(([id, count]) => { + const finished = count >= total; + const profile = userProfiles[id]; + const emoji = profile?.avatar ?? getAvatar(id).emoji; + const bg = profile ? getAvatarBg(profile.avatar) : getAvatar(id).bg; + const label = profile?.username ?? ""; + return ( + + + {emoji} + + {label && {label}} + {count}/{total} + {finished && } + + ); + })} +
+
); } @@ -323,43 +334,20 @@ export default function SwipeDeck({ return ( <> - {!allSwiped && !resolvedMatchId && ( -
-
-
- -
- - {currentIndex}/{restaurants.length} - - -
- -
- )} -
+ {!allSwiped && !resolvedMatchId && ( +
+ +
+ )} {currentIndex === 0 && !resolvedMatchId && guideVisible && ( setGuideVisible(false)} /> )} diff --git a/src/components/TopNav.tsx b/src/components/TopNav.tsx index 9c8b822..e078c08 100644 --- a/src/components/TopNav.tsx +++ b/src/components/TopNav.tsx @@ -1,7 +1,7 @@ "use client"; import { useState, useCallback } from "react"; -import { Users, QrCode, LogOut, Crown, Lock } from "lucide-react"; +import { QrCode, LogOut, Crown, Lock } from "lucide-react"; import { motion, AnimatePresence } from "framer-motion"; import QrInviteModal from "./QrInviteModal"; import RoomManageModal from "./RoomManageModal"; @@ -10,7 +10,7 @@ import { getSceneConfig } from "@/lib/sceneConfig"; interface TopNavProps { roomId: string; - userCount: number; + userCount?: number; onExit?: () => void; isCreator?: boolean; userId?: string; @@ -47,14 +47,21 @@ export default function TopNav({ return ( <> -