From 596d435d5251f63cc0ce8556bfa1634b6ef0d7b9 Mon Sep 17 00:00:00 2001 From: JiaJun <2394389886@qq.com> Date: Thu, 16 Jul 2026 14:47:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(game):=20=E6=B7=BB=E5=8A=A0=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2=E5=92=8C=E7=A7=BB=E5=8A=A8=E8=AE=BE=E5=A4=87=E7=9A=84?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A0=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 FORCE_DESKTOP_STREAK_EFFECT_PREVIEW 和 FORCE_MOBILE_STREAK_EFFECT_PREVIEW 常量用于预览 - 在桌面状态栏中实现连击效果显示逻辑 - 在移动状态栏中实现不同的背景图像和布局样式 - 为移动设备添加火焰图标和连击计数显示 - 更新移动设备状态栏的列布局和间距配置 - 使用条件渲染来切换不同的背景和字体样式 --- .../components/desktop/desktop-status.tsx | 6 ++- .../game/components/mobile/mobile-status.tsx | 44 +++++++++++++------ 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/src/features/game/components/desktop/desktop-status.tsx b/src/features/game/components/desktop/desktop-status.tsx index cbbaa82..0a2f74a 100644 --- a/src/features/game/components/desktop/desktop-status.tsx +++ b/src/features/game/components/desktop/desktop-status.tsx @@ -17,6 +17,8 @@ import { DesktopCountdown } from '@/features/game/components/desktop/desktop-cou import { useGameStatusVm } from '@/hooks/use-game-status-vm.ts' import { cn } from '@/lib/utils.ts' +const FORCE_DESKTOP_STREAK_EFFECT_PREVIEW = true + export function DesktopStatusLine() { const { t } = useTranslation() const prefersReducedMotion = useReducedMotion() @@ -32,7 +34,9 @@ export function DesktopStatusLine() { } = useGameStatusVm() const [remainingMs, setRemainingMs] = useState(countdownMs) const showWarningCountdown = remainingMs <= 5000 && remainingMs > 0 - const showStreakLimitOnly = typeof streakValue === 'number' && streakValue > 1 + const showStreakLimitOnly = + FORCE_DESKTOP_STREAK_EFFECT_PREVIEW || + (typeof streakValue === 'number' && streakValue > 1) const countdownClassName = useMemo( () => showWarningCountdown diff --git a/src/features/game/components/mobile/mobile-status.tsx b/src/features/game/components/mobile/mobile-status.tsx index d08663d..8490d70 100644 --- a/src/features/game/components/mobile/mobile-status.tsx +++ b/src/features/game/components/mobile/mobile-status.tsx @@ -15,6 +15,8 @@ import { DesktopCountdown } from '@/features/game/components/desktop/desktop-cou import { useGameStatusVm } from '@/hooks/use-game-status-vm.ts' import { cn } from '@/lib/utils.ts' +const FORCE_MOBILE_STREAK_EFFECT_PREVIEW = true + function isIosDevice() { if (typeof navigator === 'undefined') { return false @@ -160,23 +162,32 @@ export function MobileStatusLine() { export function MobileStatusMetrics() { const { t } = useTranslation() const { limitLabel, oddsLabel, streakLabel, streakValue } = useGameStatusVm() - const showStreakLimitOnly = typeof streakValue === 'number' && streakValue > 1 + const showStreakLimitOnly = + FORCE_MOBILE_STREAK_EFFECT_PREVIEW || + (typeof streakValue === 'number' && streakValue > 1) return ( {showStreakLimitOnly ? ( -
+
+ + {t('gameDesktop.status.streak')}: + {/**/} + {streakLabel} +
) : ( <>
@@ -196,7 +207,14 @@ export function MobileStatusMetrics() {
)} -
+
{t('gameDesktop.status.limit')}: