export type BackstoryUnlockedChapter = { id: string; title: string; content: string; }; export type BackstoryLockedChapter = { id: string; title: string; teaser: string; affinityRequired: number; }; interface BackstoryArchiveProps { publicSummary?: string | null; unlockedChapters: BackstoryUnlockedChapter[]; lockedChapters: BackstoryLockedChapter[]; } export function BackstoryArchive({ publicSummary, unlockedChapters, lockedChapters, }: BackstoryArchiveProps) { const totalChapters = unlockedChapters.length + lockedChapters.length; return (
背景故事
{totalChapters > 0 ? (
已解锁 {unlockedChapters.length} / {totalChapters}
) : null}
{publicSummary ? (
公开印象
{publicSummary}
) : null} {unlockedChapters.map((chapter) => (
{chapter.title}
已解锁
{chapter.content}
))} {lockedChapters.map((chapter) => (
{chapter.title}
需好感 {chapter.affinityRequired}
{chapter.teaser}
))} {!publicSummary && totalChapters === 0 ? (
暂无可整理的背景线索。
) : null}
); }