feat(game): 添加桌面和移动设备的状态栏功能
- 添加 FORCE_DESKTOP_STREAK_EFFECT_PREVIEW 和 FORCE_MOBILE_STREAK_EFFECT_PREVIEW 常量用于预览 - 在桌面状态栏中实现连击效果显示逻辑 - 在移动状态栏中实现不同的背景图像和布局样式 - 为移动设备添加火焰图标和连击计数显示 - 更新移动设备状态栏的列布局和间距配置 - 使用条件渲染来切换不同的背景和字体样式
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user