- 在 .gitignore 中添加 public/audio/* 以忽略音频文件。 - 更新 bun.lock,添加 eslint-config-prettier 和 eslint-plugin-prettier 依赖,确保 ESLint 与 Prettier 的兼容性。 - 修改 eslint.config.ts,整合 Prettier 规则,优化代码风格一致性。 - 在 package.json 中添加 lint:fix 和 format 脚本,简化代码格式化和修复流程。 - 更新 tailwind.config.ts 和其他组件文件,统一代码风格,提升可读性。
34 lines
779 B
TypeScript
34 lines
779 B
TypeScript
import { useScale } from '@/contexts/ScaleContext'
|
|
|
|
/**
|
|
* 横屏提示组件
|
|
* 在移动端竖屏时显示提示,引导用户横屏观看
|
|
*/
|
|
export function RotateHint() {
|
|
const { isMobilePortrait } = useScale()
|
|
|
|
if (!isMobilePortrait) return null
|
|
|
|
return (
|
|
<div
|
|
style={{
|
|
position: 'fixed',
|
|
inset: 0,
|
|
background:
|
|
'rgba(0,0,0,0.55) radial-gradient(circle at center, rgba(255,255,255,0.1), rgba(0,0,0,0.6))',
|
|
color: '#fff',
|
|
zIndex: 9999,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
textAlign: 'center',
|
|
padding: '24px',
|
|
fontSize: '20px',
|
|
lineHeight: 1.5,
|
|
}}
|
|
>
|
|
请横屏观看,以获得最佳体验
|
|
</div>
|
|
)
|
|
}
|