refactor(assets): relocate character avatars

This commit is contained in:
2026-07-17 14:30:11 +08:00
parent ae97366a4a
commit 2394f9031a
12 changed files with 8 additions and 8 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

@@ -56,7 +56,7 @@ describe("shared Tailwind components", () => {
expect(html).toContain("width:48px"); expect(html).toContain("width:48px");
expect(html).toContain("height:48px"); expect(html).toContain("height:48px");
expect(html).toContain("size-full object-cover"); expect(html).toContain("size-full object-cover");
expect(html).toContain("%2Fimages%2Fchat%2Fpic-chat-elio.png"); expect(html).toContain("%2Fimages%2Favatar%2Felio.png");
}); });
it("renders UserMessageAvatar custom and fallback images", () => { it("renders UserMessageAvatar custom and fallback images", () => {
@@ -71,6 +71,6 @@ describe("shared Tailwind components", () => {
expect(userHtml).toContain("size-full object-cover"); expect(userHtml).toContain("size-full object-cover");
expect(userHtml).toContain("%2Favatar.png"); expect(userHtml).toContain("%2Favatar.png");
expect(guestHtml).toContain('aria-label="Guest avatar"'); expect(guestHtml).toContain('aria-label="Guest avatar"');
expect(guestHtml).toContain("%2Fimages%2Fchat%2Fpic-chat-guest.png"); expect(guestHtml).toContain("%2Fimages%2Favatar%2Fplaceholder.png");
}); });
}); });
+1 -1
View File
@@ -13,7 +13,7 @@ export interface CharacterAvatarProps {
} }
export function CharacterAvatar({ export function CharacterAvatar({
src = "/images/chat/pic-chat-elio.png", src = "/images/avatar/elio.png",
alt = "Elio Silvestri", alt = "Elio Silvestri",
className, className,
size = 43, size = 43,
+1 -1
View File
@@ -47,7 +47,7 @@ export function UserMessageAvatar({
aria-label="Guest avatar" aria-label="Guest avatar"
> >
<Image <Image
src="/images/chat/pic-chat-guest.png" src="/images/avatar/placeholder.png"
alt="Guest" alt="Guest"
width={imageSize} width={imageSize}
height={imageSize} height={imageSize}
@@ -30,7 +30,7 @@ describe("chat Tailwind components", () => {
expect(aiHtml).toContain('aria-label="AI avatar"'); expect(aiHtml).toContain('aria-label="AI avatar"');
expect(aiHtml).toContain("size-(--chat-avatar-size,43px)"); expect(aiHtml).toContain("size-(--chat-avatar-size,43px)");
expect(aiHtml).toContain("size-full object-cover"); expect(aiHtml).toContain("size-full object-cover");
expect(aiHtml).toContain("%2Fimages%2Fchat%2Fpic-chat-elio.png"); expect(aiHtml).toContain("%2Fimages%2Favatar%2Felio.png");
expect(userHtml).toContain('aria-label="User avatar"'); expect(userHtml).toContain('aria-label="User avatar"');
expect(userHtml).toContain("%2Fuser-avatar.png"); expect(userHtml).toContain("%2Fuser-avatar.png");
}); });
+1 -1
View File
@@ -16,7 +16,7 @@ export function MessageAvatar({ isFromAI, userAvatarUrl }: MessageAvatarProps) {
return ( return (
<div className={AVATAR_CLASS_NAME} aria-label="AI avatar"> <div className={AVATAR_CLASS_NAME} aria-label="AI avatar">
<Image <Image
src="/images/chat/pic-chat-elio.png" src="/images/avatar/elio.png"
alt="Elio" alt="Elio"
width={43} width={43}
height={43} height={43}
@@ -33,7 +33,7 @@ function renderCard(album: PrivateAlbum): string {
<PrivateAlbumCard <PrivateAlbumCard
album={album} album={album}
displayName="Elio Silvestri" displayName="Elio Silvestri"
avatarUrl="/images/chat/pic-chat-elio.png" avatarUrl="/images/avatar/elio.png"
index={0} index={0}
isUnlocking={false} isUnlocking={false}
onOpenGallery={() => undefined} onOpenGallery={() => undefined}
+1 -1
View File
@@ -36,7 +36,7 @@ import {
const FALLBACK_PROFILE = { const FALLBACK_PROFILE = {
name: "Elio Silvestri", name: "Elio Silvestri",
avatar: "/images/chat/pic-chat-elio.png", avatar: "/images/avatar/elio.png",
title: "Elio Private room", title: "Elio Private room",
subtitle: "Join me, unlock my private room", subtitle: "Join me, unlock my private room",
} as const; } as const;