fix: save character name correctly and show story on character sheet
CI / Lint, Build & Test (push) Successful in 1m9s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m9s

- Load route syncs characterName from Player record so profile updates
  are reflected immediately on next load
- Save route preserves Player record's characterName so auto-saves
  cannot overwrite profile updates
- Public profile response now includes completedChapters
- Character sheet panel displays completed story chapters with outcome
- Removed stale CSS for old achievement/codex toast classes
This commit is contained in:
2026-03-08 20:19:40 -07:00
committed by Naomi Carrigan
parent c3d79e0c11
commit e10eabc8b5
7 changed files with 76 additions and 0 deletions
@@ -657,6 +657,15 @@ const CharacterSheetPanel = (): JSX.Element => {
if (choice === undefined) {
return null;
}
const characterName
= player?.characterName === ""
|| player?.characterName === undefined
? "the guild leader"
: player.characterName;
const outcome = choice.outcome.replaceAll(
"{characterName}",
characterName,
);
return (
<div
className="character-sheet-story-entry"
@@ -668,6 +677,7 @@ const CharacterSheetPanel = (): JSX.Element => {
<span className="character-sheet-story-choice">
{choice.label}
</span>
<p className="character-sheet-story-outcome">{outcome}</p>
</div>
);
})}
+7
View File
@@ -4386,3 +4386,10 @@ body {
font-size: 0.8rem;
font-style: italic;
}
.character-sheet-story-outcome {
margin: 0;
color: var(--colour-muted);
font-size: 0.8rem;
line-height: 1.5;
}