1
0
Fork 0
polaris-task-force/src/lib/redaction.ts
Z8MB1E 824b03ec49 feat(missions): add redacted objective toggle
Mission objectives gain a redacted checkbox. Redacted objectives are
shown block-redacted to players; mission managers, authors, and Zeus
see the real text (via tooltip) and can toggle the flag from the
mission detail page. Toggles emit mission:objective-redacted-toggle
events. Also registers the mission:auto-complete event type used by
the upcoming mission-tick bin.
2026-08-25 12:27:52 -04:00

6 lines
164 B
TypeScript

const BLOCK = "█";
export function redactText(text: string | null | undefined): string | null {
if (!text) return null;
return text.replace(/\S/g, BLOCK);
}