mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
fix(mod-tools): empty-value placeholder no longer renders as music note
User reported empty fields (Email, Last Purchase, Lock Expires, Banned Accs, Abusive CFHs) showing what looks like a music-note glyph next to the label. They aren't censored — they're genuinely empty (a rank-7 Administrator account has none of that data populated). The em-dash "—" (U+2014) used as the placeholder doesn't have a glyph in the Habbo pixel font (Volter / Volter-Goldfish), so the engine falls through to a placeholder glyph that on some font stacks looks like a music note. Two-part fix in ModToolsUserView (Field), ModToolsIssueInfoView (Field) and ModToolsRoomView (owner fallback): 1. Replace the U+2014 em-dash with a plain ASCII `-`. Hyphen-minus is safely in Volter, so the placeholder renders correctly across the whole client. 2. The `value || placeholder` guard is now `(value || value === 0)`. Stat fields whose value is the literal number 0 — a clean account with cfhCount=0, banCount=0, cautionCount=0 — were rendering the placeholder because 0 is falsy. Treat 0 as a real value. Also dropped the `italic` class on the placeholder span — the hyphen does the job on its own and italic on a single-character glyph in a pixel font was making it look like a tilted line.
This commit is contained in:
@@ -56,7 +56,7 @@ const Section: FC<{ title: string; children: React.ReactNode }> = ({ title, chil
|
||||
const Field: FC<{ label: string; value: React.ReactNode }> = ({ label, value }) => (
|
||||
<>
|
||||
<dt className="opacity-60 whitespace-nowrap">{ label }</dt>
|
||||
<dd className="m-0 break-words font-medium">{ value || <span className="opacity-40 italic">—</span> }</dd>
|
||||
<dd className="m-0 break-words font-medium">{ (value || value === 0) ? value : <span className="opacity-40">-</span> }</dd>
|
||||
</>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user