import { ArrowRight, Clock3 } from 'lucide-react'; import type { ProfilePlayedWorkSummary, ProfilePlayStatsResponse, ProfileSaveArchiveSummary, } from '../../../packages/shared/src/contracts/runtime'; import { PlatformAsyncStatePanel } from '../common/PlatformAsyncStatePanel'; import { PlatformEmptyState } from '../common/PlatformEmptyState'; import { PlatformFieldLabel } from '../common/PlatformFieldLabel'; import { PlatformProfileContentRow } from '../common/PlatformProfileContentRow'; import { PlatformProfileSkeletonList } from '../common/PlatformProfileSkeletonList'; import { PlatformProfileSummaryHeader } from '../common/PlatformProfileSummaryHeader'; import { PlatformPillBadge } from '../common/PlatformPillBadge'; import { PlatformStatusMessage } from '../common/PlatformStatusMessage'; import { ResolvedAssetImage } from '../ResolvedAssetImage'; import { PlatformProfileSecondaryModalShell } from './PlatformProfileModalShell'; import { formatCompactPlayTime, formatPlayedWorkId, formatPlayedWorkType, formatSnapshotTime, formatTotalPlayTimeHours, } from '../rpg-entry/rpgEntryProfileDashboardPresentation'; import { formatPlatformWorkDisplayName } from '../rpg-entry/rpgEntryWorldPresentation'; type PlatformProfilePlayedWorksModalProps = { stats: ProfilePlayStatsResponse | null; isLoading: boolean; error: string | null; saveEntries: ProfileSaveArchiveSummary[]; saveError: string | null; isResumingSaveWorldKey: string | null; onClose: () => void; onOpenWork?: (work: ProfilePlayedWorkSummary) => void; onResumeSave: (entry: ProfileSaveArchiveSummary) => void; }; function SaveArchivePreview({ entry, className, }: { entry: ProfileSaveArchiveSummary; className: string; }) { return (
); } function SaveArchiveCard({ entry, onClick, loading = false, }: { entry: ProfileSaveArchiveSummary; onClick: () => void; loading?: boolean; }) { const summaryText = entry.summaryText || entry.subtitle || '继续推进上一次保存的故事。'; const displayName = formatPlatformWorkDisplayName(entry.worldName); return ( ); } export function PlatformProfilePlayedWorksModal({ stats, isLoading, error, saveEntries, saveError, isResumingSaveWorldKey, onClose, onOpenWork, onResumeSave, }: PlatformProfilePlayedWorksModalProps) { // 中文注释:个人中心“玩过”弹层同时承接“可继续”的存档列表,保持同一入口下的历史/恢复语义。 const playedWorks = stats?.playedWorks ?? []; const hasArchiveEntries = saveEntries.length > 0; const hasPlayedWorks = playedWorks.length > 0; return (