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:
1 parent
7ae1bcef0a
commit
60fa4ef6f7
17 files changed
+183
-15
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { displayAuthors } from '../../shared/names.ts';
|
||||
import type { SearchResult } from '../../shared/types.ts';
|
||||
|
||||
/** Next highlighted index for an arrow key; -1 means nothing is highlighted. */
|
||||
@@ -22,7 +23,7 @@ export function ResultList({ id, label, results, active, onPick, onHover, footer
|
||||
<li role="option" id={`${id}-${i}`} class={'result' + (i === active ? ' active' : '')} aria-selected={i === active}
|
||||
onMouseDown={keep} onMouseMove={() => onHover(i)} onClick={() => onPick(r)}>
|
||||
<span class="result-title">{r.title}</span>
|
||||
<span class="result-sub">{[r.authors.join(', '), r.year, r.publisher].filter(Boolean).join(' · ')}</span>
|
||||
<span class="result-sub">{[displayAuthors(r.authors).join(', '), r.year, r.publisher].filter(Boolean).join(' · ')}</span>
|
||||
</li>
|
||||
))}
|
||||
{footer ? (
|
||||
|
||||
Reference in new issue
Block a user