Skip to content
This repository was archived by the owner on Oct 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/media/BookCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ export function BookCard({ book, className, showSeries, eager, selection }: Book
? book.readProgress.page / book.media.pagesCount
: 0

// meta line: in-progress "45% · 120 pages", completed "✓ 3d ago"
// meta line: in-progress "#3 · 45% · 120 pages", completed "#3 · ✓ 3d ago"; oneshots omit the number (single book)
const readAgo = book.readProgress?.completed ? relativeTime(book.readProgress.readDate) : ''
const metaParts: string[] = []
if (!showSeries) metaParts.push(`#${book.metadata.number}`)
if (!book.oneshot) metaParts.push(`#${book.metadata.number}`)
if (progress > 0) metaParts.push(`${Math.round(progress * 100)}%`)
metaParts.push(t('card.pageCount', { count: book.media.pagesCount }))
const secondary = readAgo ? (
<span className="inline-flex items-center gap-1">
{!showSeries && `#${book.metadata.number} · `}
{!book.oneshot && `#${book.metadata.number} · `}
<CheckCircle className="size-3" weight="fill" />
{readAgo}
</span>
Expand Down
9 changes: 7 additions & 2 deletions src/components/media/KeepReadingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,20 @@ export function KeepReadingCard({ book, className }: { book: BookDto; className?
const metaColor = tinted ? 'text-white/70' : 'text-ink-2'

const statusLabel = cardStatusLabel({ deleted: unavailable, mediaStatus: book.media.status })
const numberPrefix = book.oneshot ? '' : `#${book.metadata.number} · `
const meta = statusLabel ? (
<span className={statusLabel.className}>{statusLabel.text}</span>
<span className={statusLabel.className}>
{numberPrefix}
{statusLabel.text}
</span>
) : completed ? (
<span className="inline-flex items-center gap-1">
{numberPrefix}
<CheckCircle className="size-3" weight="fill" />
{relativeTime(book.readProgress!.readDate)}
</span>
) : (
`${Math.round(pct * 100)}% · ${t('card.pageCount', { count: book.media.pagesCount })}`
`${numberPrefix}${Math.round(pct * 100)}% · ${t('card.pageCount', { count: book.media.pagesCount })}`
)

return (
Expand Down
Loading