Show author names in natural order everywhere

Names read from MARC personal-name fields are stored as "Steve Allen",
and names already stored as "Allen, Steve" are shown and printed in
natural order. Search matches both forms.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-19 14:09:09 -07:00
1 parent 7ae1bcef0a
commit 60fa4ef6f7
17 files changed
+183 -15

No files matched your search

+2 -1
View File
@@ -1,3 +1,4 @@
import { displayAuthors } from '../../shared/names.ts';
import { useState } from 'preact/hooks';
import { api } from '../api.ts';
import { rowState } from '../bookstate.ts';
@@ -32,7 +33,7 @@ export function LastScan({ onFix }: { onFix: (id: number) => void }) {
return (
<section class="last" aria-label="Last scan" aria-live="polite">
<h2 class="last-title">{book.title}</h2>
{book.authors.length ? <p class="last-author">{book.authors.join(', ')}</p> : null}
{book.authors.length ? <p class="last-author">{displayAuthors(book.authors).join(', ')}</p> : null}
<div class="last-state">
{s.kind === 'looking' ? <><span class="last-mark"><Spinner /></span><StateText book={book} /></> : null}
{s.kind === 'ready' ? (