fix: 单人场景体验优化 — 跳过等待 spinner,适配结果文案
- SwipeDeck: userCount === 1 时不再显示"等待其他人完成选择" - MatchResult: 单人时标题改为"帮你选好了",副标题改为"你的首选" - MatchResult: 单人时隐藏"默契度 100%"徽章(无意义) - 更新 ROADMAP 将 Solo 模式改为单人体验修复
This commit is contained in:
+3
-4
@@ -23,10 +23,9 @@
|
||||
|
||||
## P1 — 体验提升
|
||||
|
||||
### 单人也能用(Solo 模式)
|
||||
- 只有一人创建房间时,等待页面体验空白
|
||||
- 加入 Solo 模式:一人时自动随机推荐 / 转盘选择
|
||||
- 降低使用门槛,不依赖必须拉人
|
||||
### 单人等待体验修复
|
||||
- `userCount === 1` 时跳过"等待其他人完成选择"spinner,直接出结果
|
||||
- 匹配文案适配单人场景("就去这了"→"帮你选好了","X/X 人想去"→"你的首选")
|
||||
|
||||
### 盲盒想法互动
|
||||
- 对想法点赞 / 加权(增加被抽中概率)
|
||||
|
||||
@@ -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
|
||||
{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