feat(room): 공간 카드에 실제 사진 소스와 교체 경로를 연결

맥락:
- 오늘의 공간 카드를 단색에서 실제 사진 기반으로 전환하고, 사진 출처를 추적할 수 있는 링크가 필요했다.
- 추후 자가 호스팅 이미지로 교체할 수 있도록 데이터 구조에서 전환 경로를 미리 확보해야 했다.

변경사항:
- entities/room 모델에 cardPhotoUrl, googleImageSearchUrl, managedCardPhotoUrl 필드를 추가했다.
- 10개 공간 카드에 실제 사진 URL과 Google 이미지 검색 링크를 매핑했다.
- getRoomCardPhotoUrl, getRoomCardBackgroundStyle helper를 추가해 추후 managed 이미지로 교체 가능한 fallback 구조를 만들었다.
- RoomPreviewCard 배경을 실제 사진 렌더링으로 변경하고, 텍스트 가독성을 위한 오버레이를 적용했다.
- 세션 문서(90_current_state, session_brief)에 이번 작업 내역과 리스크를 반영했다.

검증:
- npx tsc --noEmit

세션-상태: 오늘의 공간 카드에 실제 사진 소스/구글 링크/교체 경로 반영 완료
세션-다음: RoomSheet/도크 패널의 인원수 기반 표현을 분위기형 정보로 전환
세션-리스크: 외부 이미지 URL 의존으로 소스 만료/속도 이슈 가능성이 있어 자가 호스팅 전환 필요
This commit is contained in:
2026-03-01 00:01:39 +09:00
parent 22ff9e6e41
commit a1981b0577
5 changed files with 88 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import type { RoomTheme } from '@/entities/room';
import { getRoomCardBackgroundStyle, type RoomTheme } from '@/entities/room';
import { cn } from '@/shared/lib/cn';
interface RoomPreviewCardProps {
@@ -26,22 +26,22 @@ export const RoomPreviewCard = ({
<div
aria-hidden
className="absolute inset-0"
style={{
backgroundColor: room.hubColor,
}}
style={getRoomCardBackgroundStyle(room)}
/>
<div aria-hidden className="absolute inset-0 bg-slate-900/28" />
<div aria-hidden className="absolute inset-0 bg-[linear-gradient(to_top,rgba(2,6,23,0.64),rgba(2,6,23,0.2))]" />
<div className="relative space-y-3 rounded-xl border border-brand-dark/10 bg-white/42 p-3 backdrop-blur-[1px]">
<div className="relative space-y-3 rounded-xl border border-white/20 bg-slate-950/22 p-3 backdrop-blur-[1.5px]">
<div>
<h3 className="text-base font-semibold text-brand-dark">{room.name}</h3>
<p className="mt-1 text-xs text-brand-dark/72">{room.description}</p>
<h3 className="text-base font-semibold text-white">{room.name}</h3>
<p className="mt-1 text-xs text-white/82">{room.description}</p>
</div>
<div className="flex flex-wrap gap-2">
{room.tags.map((tag) => (
<span
key={tag}
className="inline-flex items-center gap-1 rounded-full bg-white/62 px-3 py-1.5 text-xs font-medium text-brand-dark/86 ring-1 ring-brand-dark/12"
className="inline-flex items-center gap-1 rounded-full bg-white/16 px-3 py-1.5 text-xs font-medium text-white/92 ring-1 ring-white/22"
>
{tag}
</span>
@@ -49,14 +49,14 @@ export const RoomPreviewCard = ({
</div>
<div className="space-y-2">
<p className="text-xs text-brand-dark/78">
: <span className="font-medium text-brand-dark">{room.recommendedSound}</span>
<p className="text-xs text-white/84">
: <span className="font-medium text-white">{room.recommendedSound}</span>
</p>
<div className="flex flex-wrap gap-2">
<span className="inline-flex items-center gap-1 rounded-full bg-white/58 px-3 py-1.5 text-xs font-medium text-brand-dark/84 ring-1 ring-brand-dark/12">
<span className="inline-flex items-center gap-1 rounded-full bg-white/14 px-3 py-1.5 text-xs font-medium text-white/90 ring-1 ring-white/22">
· {room.recommendedTime}
</span>
<span className="inline-flex items-center gap-1 rounded-full bg-white/58 px-3 py-1.5 text-xs font-medium text-brand-dark/84 ring-1 ring-brand-dark/12">
<span className="inline-flex items-center gap-1 rounded-full bg-white/14 px-3 py-1.5 text-xs font-medium text-white/90 ring-1 ring-white/22">
· {room.vibeLabel}
</span>
</div>