Dashboard: drop the Credits and Game date tiles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
fireshaper 2026-10-10 22:45:19 -04:00
parent 716002b3c7
commit 2a0a9fb0f1
2 changed files with 7 additions and 17 deletions

View File

@ -1660,3 +1660,7 @@ Implementation decisions not spelled out in `memory-bank/implementation-plan.md`
- **Requested by the user directly** (not a supplied CR), so it takes the next free numbers: CR-020, Phase 20, decisions 0.5.118–0.5.121.
- **Asked:** the Dashboard's tab label (user chose "Bridge", since eight tabs leave about 48 px each on a phone and "Dashboard" won't fit) and whether Alerts should already list alerts the game can derive (user chose an empty placeholder for the future in-flight alerts/news).
## Follow-up after Phase 20: fewer Dashboard tiles
- **The Dashboard drops its Credits and Game date tiles** (user request): both are always in the header's chips. Ships idle and Ships in flight stay, side by side.

View File

@ -1,19 +1,17 @@
import { content } from "@deadhead/content";
import type { Dispatch, Pilot, PlayerState, Ship, TutorialState } from "@deadhead/schema";
import { dispatchProgress, realToGame } from "@deadhead/sim";
import { dispatchProgress } from "@deadhead/sim";
import { Link } from "react-router";
import { useClock } from "../clock/clock";
import { formatGameTime } from "../clock/GameClock";
import { Countdown } from "../components/Countdown";
import { formatFu, FuelGauge } from "../components/Fuel";
import { GoalsCard } from "../components/GoalsCard";
import { goodName, PriorityChip } from "../components/Goods";
import { LoanCard } from "../components/LoanCard";
import { RouteStrip } from "../components/RouteStrip";
import { formatCredits, formatGameHours, locationName, shipModelName } from "../format";
import { formatGameHours, locationName, shipModelName } from "../format";
import { lowFuel } from "../game";
import { useLoadedPlayer } from "../state/actions";
import { usePreferences } from "../state/preferences";
import {
Art,
buttonClass,
@ -77,7 +75,6 @@ function flightShipName(state: PlayerState, dispatch: Dispatch): string {
export function Dashboard() {
const state = useLoadedPlayer();
const now = useClock((s) => s.now);
const clockFormat = usePreferences((p) => p.clock);
const idle = state.ships.filter((s) => s.status === "idle").length;
const flying = state.ships.filter((s) => s.status === "in-flight").length;
const runsBeforeDeal = content.config.tutorialRunsBeforeDeal;
@ -100,18 +97,7 @@ export function Dashboard() {
<Alerts />
</div>
<div className="grid grid-cols-2 gap-3 md:grid-cols-4">
<StatTile
label="Credits"
value={formatCredits(state.company.credits)}
icon="credits"
tone="amber"
/>
<StatTile
label="Game date"
value={formatGameTime(realToGame(now, content.config), clockFormat)}
icon="clock"
/>
<div className="grid grid-cols-2 gap-3">
<StatTile label="Ships idle" value={String(idle)} icon="fleet" tone="emerald" />
<StatTile label="Ships in flight" value={String(flying)} icon="send" tone="cyan" />
</div>