Dashboard: drop the Credits and Game date tiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
716002b3c7
commit
2a0a9fb0f1
|
|
@ -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.
|
- **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).
|
- **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.
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,17 @@
|
||||||
import { content } from "@deadhead/content";
|
import { content } from "@deadhead/content";
|
||||||
import type { Dispatch, Pilot, PlayerState, Ship, TutorialState } from "@deadhead/schema";
|
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 { Link } from "react-router";
|
||||||
import { useClock } from "../clock/clock";
|
import { useClock } from "../clock/clock";
|
||||||
import { formatGameTime } from "../clock/GameClock";
|
|
||||||
import { Countdown } from "../components/Countdown";
|
import { Countdown } from "../components/Countdown";
|
||||||
import { formatFu, FuelGauge } from "../components/Fuel";
|
import { formatFu, FuelGauge } from "../components/Fuel";
|
||||||
import { GoalsCard } from "../components/GoalsCard";
|
import { GoalsCard } from "../components/GoalsCard";
|
||||||
import { goodName, PriorityChip } from "../components/Goods";
|
import { goodName, PriorityChip } from "../components/Goods";
|
||||||
import { LoanCard } from "../components/LoanCard";
|
import { LoanCard } from "../components/LoanCard";
|
||||||
import { RouteStrip } from "../components/RouteStrip";
|
import { RouteStrip } from "../components/RouteStrip";
|
||||||
import { formatCredits, formatGameHours, locationName, shipModelName } from "../format";
|
import { formatGameHours, locationName, shipModelName } from "../format";
|
||||||
import { lowFuel } from "../game";
|
import { lowFuel } from "../game";
|
||||||
import { useLoadedPlayer } from "../state/actions";
|
import { useLoadedPlayer } from "../state/actions";
|
||||||
import { usePreferences } from "../state/preferences";
|
|
||||||
import {
|
import {
|
||||||
Art,
|
Art,
|
||||||
buttonClass,
|
buttonClass,
|
||||||
|
|
@ -77,7 +75,6 @@ function flightShipName(state: PlayerState, dispatch: Dispatch): string {
|
||||||
export function Dashboard() {
|
export function Dashboard() {
|
||||||
const state = useLoadedPlayer();
|
const state = useLoadedPlayer();
|
||||||
const now = useClock((s) => s.now);
|
const now = useClock((s) => s.now);
|
||||||
const clockFormat = usePreferences((p) => p.clock);
|
|
||||||
const idle = state.ships.filter((s) => s.status === "idle").length;
|
const idle = state.ships.filter((s) => s.status === "idle").length;
|
||||||
const flying = state.ships.filter((s) => s.status === "in-flight").length;
|
const flying = state.ships.filter((s) => s.status === "in-flight").length;
|
||||||
const runsBeforeDeal = content.config.tutorialRunsBeforeDeal;
|
const runsBeforeDeal = content.config.tutorialRunsBeforeDeal;
|
||||||
|
|
@ -100,18 +97,7 @@ export function Dashboard() {
|
||||||
<Alerts />
|
<Alerts />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-2 gap-3 md:grid-cols-4">
|
<div className="grid grid-cols-2 gap-3">
|
||||||
<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"
|
|
||||||
/>
|
|
||||||
<StatTile label="Ships idle" value={String(idle)} icon="fleet" tone="emerald" />
|
<StatTile label="Ships idle" value={String(idle)} icon="fleet" tone="emerald" />
|
||||||
<StatTile label="Ships in flight" value={String(flying)} icon="send" tone="cyan" />
|
<StatTile label="Ships in flight" value={String(flying)} icon="send" tone="cyan" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue