Phase 1 of turning the game into the company landing page. - Add src/config/company.js with name, tagline, contact, about and the product line, plus a brand palette built around #00a693 (contrast checked); placeholders are marked TODO(company). - Add src/config/assets.js listing every loaded file with its expected format; placeholders are marked TODO(asset). - Move all Persian interface text, dialogue, missions and scenery text into src/i18n/fa.js; components and game code read from it. - Expose the palette as CSS variables (--color-primary and shades) and Tailwind colours, and use it for 3D materials and map drawings. - Fix the arrival line that still called the manager's car a white pickup. - Add tests that block hard-coded Persian text and low-contrast colours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.1 KiB
React
31 lines
1.1 KiB
React
import { GameNode } from '@/components/shared/GameNode.jsx';
|
|
import { strings } from '@/i18n/fa.js';
|
|
/** @typedef {{nodes:object,actions:object}} StatusBarProps */
|
|
/** Presents the StatusBar using the current interface snapshot. */
|
|
export function StatusBar({ nodes }) {
|
|
return (
|
|
<GameNode as="div" id="status" model={nodes['status']}>
|
|
<div className="stat">
|
|
<small>{strings.status.budget}</small>
|
|
<GameNode as="strong" id="balance" model={nodes['balance']}>
|
|
{strings.status.budgetStart}
|
|
</GameNode>
|
|
<span>{strings.units.hetomanName}</span>
|
|
</div>
|
|
<div className="stat">
|
|
<small>{strings.status.clock}</small>
|
|
<GameNode as="strong" id="clock" model={nodes['clock']}>
|
|
{strings.status.clockStart}
|
|
</GameNode>
|
|
</div>
|
|
<GameNode as="div" className="stat" id="speed-stat" hidden model={nodes['speed-stat']}>
|
|
<small>{strings.status.speed}</small>
|
|
<GameNode as="strong" id="speed" model={nodes['speed']}>
|
|
{strings.status.speedStart}
|
|
</GameNode>
|
|
<span>{'km/h'}</span>
|
|
</GameNode>
|
|
</GameNode>
|
|
);
|
|
}
|