feat(HUD): 添加HUD界面资产与组件
- 新增HUD图标、面板和状态指示器资产 - 实现HUD图标组件和错误边界组件 - 重构顶部状态栏和底部导航栏 - 更新路线面板样式和交互 - 添加HUD资产清单和切片脚本 - 移除未使用的资产文件 - 调整API安全配置和生产环境设置
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
export function StatMeter({
|
||||
iconSrc,
|
||||
label,
|
||||
value,
|
||||
maxValue,
|
||||
tone,
|
||||
}: {
|
||||
iconSrc?: string;
|
||||
label: string;
|
||||
value: number;
|
||||
maxValue: number;
|
||||
@@ -13,12 +15,15 @@ export function StatMeter({
|
||||
|
||||
return (
|
||||
<article className={`stat-meter tone-${tone}`}>
|
||||
<div>
|
||||
<div className="stat-meter-copy">
|
||||
{iconSrc ? <img className="stat-meter-icon" src={iconSrc} alt="" aria-hidden="true" /> : null}
|
||||
<div>
|
||||
<span>{label}</span>
|
||||
<strong>
|
||||
{Math.round(value)}
|
||||
<small>/{Math.round(maxValue)}</small>
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div className="meter-track">
|
||||
<div className="meter-fill" style={{ width: `${percentage}%` }} />
|
||||
|
||||
Reference in New Issue
Block a user