fix: 单人场景体验优化 — 跳过等待 spinner,适配结果文案
- SwipeDeck: userCount === 1 时不再显示"等待其他人完成选择" - MatchResult: 单人时标题改为"帮你选好了",副标题改为"你的首选" - MatchResult: 单人时隐藏"默契度 100%"徽章(无意义) - 更新 ROADMAP 将 Solo 模式改为单人体验修复
This commit is contained in:
@@ -189,6 +189,7 @@ export default function MatchResult({
|
||||
const [toast, setToast] = useState("");
|
||||
const celebratedRef = useRef(false);
|
||||
const historySavedRef = useRef(false);
|
||||
const isSolo = userCount <= 1;
|
||||
const isUnanimous = matchType === "unanimous";
|
||||
const [favorited, setFavorited] = useState(false);
|
||||
const [favLoading, setFavLoading] = useState(false);
|
||||
@@ -300,7 +301,7 @@ export default function MatchResult({
|
||||
animate={{ y: 0, opacity: 1 }}
|
||||
transition={{ delay: 0.35 }}
|
||||
>
|
||||
就去这了!
|
||||
{isSolo ? "帮你选好了!" : "就去这了!"}
|
||||
</motion.h1>
|
||||
|
||||
<motion.p
|
||||
@@ -309,12 +310,14 @@ export default function MatchResult({
|
||||
animate={{ y: 0, opacity: 1 }}
|
||||
transition={{ delay: 0.45 }}
|
||||
>
|
||||
{isUnanimous
|
||||
? "大家一拍即合!"
|
||||
: `${matchLikes}/${userCount} 人想去这家`}
|
||||
{isSolo
|
||||
? "你的首选,别犹豫了"
|
||||
: isUnanimous
|
||||
? "大家一拍即合!"
|
||||
: `${matchLikes}/${userCount} 人想去这家`}
|
||||
</motion.p>
|
||||
|
||||
{isUnanimous && (
|
||||
{isUnanimous && !isSolo && (
|
||||
<motion.div
|
||||
className="mt-3 flex items-center gap-2 rounded-full bg-emerald-500/15 px-4 py-1.5 ring-1 ring-emerald-500/30"
|
||||
initial={{ scale: 0, opacity: 0 }}
|
||||
|
||||
@@ -319,7 +319,7 @@ export default function SwipeDeck({
|
||||
? restaurants.find((r) => r.id === resolvedMatchId) ?? null
|
||||
: null;
|
||||
|
||||
const showWaiting = allSwiped && !resolvedMatchId;
|
||||
const showWaiting = allSwiped && !resolvedMatchId && userCount > 1;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user