Darstellung: Anzeigename und Handle zweizeilig in der Byline
Mit "Anzeigename @handle" in einer Zeile wurde die Meta-Zeile lang und unruhig. Jetzt steht neben dem Avatar oben der Anzeigename, darunter @handle mit der Zeit; die Namen sind nicht mehr unterstrichen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { api, errMsg } from "../api";
|
||||
import { useMe } from "../auth";
|
||||
import { AuthBox } from "../components/AuthBox";
|
||||
import { avatarUrl, formatTime, linkify, userName } from "../format";
|
||||
import { AuthorName, avatarUrl, formatTime, linkify } from "../format";
|
||||
import { submitOnCtrlEnter } from "../keys";
|
||||
import {
|
||||
hasRememberedPassphrase,
|
||||
@@ -64,10 +64,11 @@ function ChatList({ handle }: { handle: string }) {
|
||||
{chats.data?.map((c) => (
|
||||
<li key={c.handle} className="byline">
|
||||
<img className="avatar avatar-sm" src={avatarUrl(c.avatar)} alt="" loading="lazy" />
|
||||
<span>
|
||||
<Link to={chatPath(c.handle)}>{userName(c)}</Link> · {formatTime(c.last_at)}
|
||||
{c.unread > 0 && <strong> · {c.unread} neu</strong>}
|
||||
</span>
|
||||
<AuthorName
|
||||
u={c}
|
||||
to={chatPath(c.handle)}
|
||||
meta={<> · {formatTime(c.last_at)}{c.unread > 0 && <strong> · {c.unread} neu</strong>}</>}
|
||||
/>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user