diff --git a/public/images/assets/icons/credits.png b/public/images/assets/icons/credits.png new file mode 100644 index 0000000..b99cfe6 Binary files /dev/null and b/public/images/assets/icons/credits.png differ diff --git a/src/collections/game/GameRules.ts b/src/collections/game/GameRules.ts index d829f47..70dba61 100644 --- a/src/collections/game/GameRules.ts +++ b/src/collections/game/GameRules.ts @@ -37,9 +37,11 @@ export const GameRules: GlobalConfig = { }, { name: "currencySymbol", - type: "text", + type: "upload", + relationTo: "media", admin: { - description: 'Optional symbol prefixed to amounts, e.g. "¢" or "$".', + description: + "Optional emblem shown inline before amounts. It renders scaled to the surrounding text height (unlike a text symbol).", }, }, { diff --git a/src/components/frontend/banking/AccountCard.tsx b/src/components/frontend/banking/AccountCard.tsx index ccd7325..42038ec 100644 --- a/src/components/frontend/banking/AccountCard.tsx +++ b/src/components/frontend/banking/AccountCard.tsx @@ -11,7 +11,8 @@ import { ItemTitle, } from "@/components/ui/item"; import { LandmarkIcon, UsersIcon, WalletIcon } from "lucide-react"; -import { formatAmount, type CurrencyConfig } from "@/lib/banking/format"; +import type { CurrencyConfig } from "@/lib/banking/format"; +import { CurrencyAmount } from "@/components/frontend/banking/CurrencyAmount"; import { type AccountStatus, accountStatusBase, accountStatusClass } from "@/lib/banking/ui"; const accountTypeMeta = { @@ -85,10 +86,10 @@ export function AccountCard({
- {formatAmount(
- account.balance ?? 0,
- currencyConfig.resourceName ? currencyConfig : currency,
- )}
+
UNIT FUNDS
- {formatAmount(unitFundsTotal, currencyConfig)}
+
- {formatAmount(
- account.balance ?? 0,
- currencyConfig.resourceName ? currencyConfig : currency,
- )}
+
LAST ACTIVITY {lastActivity} diff --git a/src/components/frontend/baseManagement/EmploymentCard.tsx b/src/components/frontend/baseManagement/EmploymentCard.tsx index 309ef2c..2a51e6c 100644 --- a/src/components/frontend/baseManagement/EmploymentCard.tsx +++ b/src/components/frontend/baseManagement/EmploymentCard.tsx @@ -1,7 +1,8 @@ "use client"; import { BadgeCheckIcon } from "lucide-react"; -import { formatAmount, type CurrencyConfig } from "@/lib/banking/format"; +import type { CurrencyConfig } from "@/lib/banking/format"; +import { CurrencyAmount } from "@/components/frontend/banking/CurrencyAmount"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { HireStaffDialog } from "@/components/frontend/baseManagement/HireStaffDialog"; import type { LaborClassificationOption, StructureStaffingOption } from "@/lib/base"; @@ -51,7 +52,7 @@ export function EmploymentCard({ {employment.positionType} · {employment.structureName}
- {formatAmount(employment.salary, currencyConfig)}/tick
+
- Maintenance: {formatAmount(structure.maintenanceCost, currencyConfig)}/tick
+ Maintenance:
{error}
} diff --git a/src/components/frontend/market/MakeOfferDialog.tsx b/src/components/frontend/market/MakeOfferDialog.tsx index 4b36db7..ef8764c 100644 --- a/src/components/frontend/market/MakeOfferDialog.tsx +++ b/src/components/frontend/market/MakeOfferDialog.tsx @@ -17,6 +17,7 @@ import { DialogTrigger, } from "@/components/ui/dialog"; import { currencyLabel, formatAmount, type CurrencyConfig } from "@/lib/banking/format"; +import { CurrencyAmount } from "@/components/frontend/banking/CurrencyAmount"; import { acceptMarketOffer, cancelMarketOffer, @@ -239,7 +240,7 @@ export function MakeOfferDialog({ listing, currentUserId, currencyConfig }: Make
{stock}× in stock · total{" "}
- {fmt((Number(amount) || 0) * clampedQty)}
+
{error}
} > @@ -291,7 +292,7 @@ export function MakeOfferDialog({ listing, currentUserId, currencyConfig }: Make {outcome?.kind === "pending" && (
- Offer of {fmt(negotiation?.amount ?? 0)} each for{" "}
+ Offer of
The {isVendor ? "vendor" : "seller"} counteroffers{" "}
- {fmt(negotiation?.amount ?? 0)}{" "}
+
- Sold at {fmt(outcome.price)} each for{" "}
+ Sold at