Compare commits

...

3 Commits

Author SHA1 Message Date
admin 64e27b4fa6 refactor(private-room): rename default cover image 2026-07-17 14:50:30 +08:00
admin 4012b9cd17 chore 2026-07-17 14:32:35 +08:00
admin 2394f9031a refactor(assets): relocate character avatars 2026-07-17 14:30:11 +08:00
17 changed files with 20 additions and 17 deletions
+8 -5
View File
@@ -52,13 +52,16 @@ Authorization: Bearer <TOKEN>
"id": "character_elio",
"slug": "elio",
"displayName": "Elio Silvestri",
"avatarUrl": "https://cdn.example.com/characters/elio/avatar.jpg"
},
{
"id": "character_aria",
"slug": "aria",
"displayName": "Aria",
"avatarUrl": "https://cdn.example.com/characters/aria/avatar.jpg"
"id": "character_maya",
"slug": "maya",
"displayName": "Maya Tan",
},
{
"id": "character_nayeli",
"slug": "nayeli",
"displayName": "Nayeli Cervantes",
}
]
}
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

@@ -56,7 +56,7 @@ describe("shared Tailwind components", () => {
expect(html).toContain("width:48px");
expect(html).toContain("height:48px");
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", () => {
@@ -71,6 +71,6 @@ describe("shared Tailwind components", () => {
expect(userHtml).toContain("size-full object-cover");
expect(userHtml).toContain("%2Favatar.png");
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({
src = "/images/chat/pic-chat-elio.png",
src = "/images/avatar/elio.png",
alt = "Elio Silvestri",
className,
size = 43,
+1 -1
View File
@@ -47,7 +47,7 @@ export function UserMessageAvatar({
aria-label="Guest avatar"
>
<Image
src="/images/chat/pic-chat-guest.png"
src="/images/avatar/placeholder.png"
alt="Guest"
width={imageSize}
height={imageSize}
@@ -30,7 +30,7 @@ describe("chat Tailwind components", () => {
expect(aiHtml).toContain('aria-label="AI avatar"');
expect(aiHtml).toContain("size-(--chat-avatar-size,43px)");
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("%2Fuser-avatar.png");
});
+1 -1
View File
@@ -16,7 +16,7 @@ export function MessageAvatar({ isFromAI, userAvatarUrl }: MessageAvatarProps) {
return (
<div className={AVATAR_CLASS_NAME} aria-label="AI avatar">
<Image
src="/images/chat/pic-chat-elio.png"
src="/images/avatar/elio.png"
alt="Elio"
width={43}
height={43}
@@ -9,7 +9,7 @@ import {
import { PrivateAlbumCard } from "../private-album-card";
const COVER_URL = "/images/private-room/banner.png";
const COVER_URL = "/images/private-room/banner/elio.png";
function makeAlbum(overrides: Partial<PrivateAlbumInput> = {}): PrivateAlbum {
return PrivateAlbumSchema.parse({
@@ -33,7 +33,7 @@ function renderCard(album: PrivateAlbum): string {
<PrivateAlbumCard
album={album}
displayName="Elio Silvestri"
avatarUrl="/images/chat/pic-chat-elio.png"
avatarUrl="/images/avatar/elio.png"
index={0}
isUnlocking={false}
onOpenGallery={() => undefined}
@@ -58,7 +58,7 @@ describe("PrivateAlbumCard", () => {
}),
);
expect(html).toContain("banner.png");
expect(html).toContain("elio.png");
expect(html).not.toContain("pic-bg-home.png");
expect(html).toContain("8 photos");
expect(html).toContain("A quiet morning by the water.");
@@ -77,7 +77,7 @@ describe("PrivateAlbumCard", () => {
}),
);
expect(html).toContain("banner.png");
expect(html).toContain("elio.png");
expect(html).toContain(
'aria-label="Unlock 8 private room photos from Elio Silvestri"',
);
+2 -2
View File
@@ -36,7 +36,7 @@ import {
const FALLBACK_PROFILE = {
name: "Elio Silvestri",
avatar: "/images/chat/pic-chat-elio.png",
avatar: "/images/avatar/elio.png",
title: "Elio Private room",
subtitle: "Join me, unlock my private room",
} as const;
@@ -152,7 +152,7 @@ export function PrivateRoomScreen() {
<section className={styles.hero} aria-label={title}>
<div className={styles.heroCover}>
<Image
src="/images/private-room/banner.png"
src="/images/private-room/banner/elio.png"
alt=""
width={2048}
height={1152}