From 27878816b111748297cb3a62381b90275b13d171 Mon Sep 17 00:00:00 2001 From: caadiq Date: Sat, 3 Jan 2026 14:27:19 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=95=A8=EB=B2=94=20=EC=82=AC?= =?UTF-8?q?=EC=A7=84=20=EA=B4=80=EB=A6=AC=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - '솔로' → '개인'으로 텍스트 변경 - 컨셉명 필수 검증 제거 (선택사항으로 변경) - 라이트박스에서 컨셉명 없어도 멤버 이름 표시되도록 수정 - 'Default' 컨셉명은 표시하지 않음 --- frontend/src/pages/pc/AlbumGallery.jsx | 44 ++++++++++++------- .../src/pages/pc/admin/AdminAlbumPhotos.jsx | 15 ++----- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/frontend/src/pages/pc/AlbumGallery.jsx b/frontend/src/pages/pc/AlbumGallery.jsx index b838a23..2fd0eb8 100644 --- a/frontend/src/pages/pc/AlbumGallery.jsx +++ b/frontend/src/pages/pc/AlbumGallery.jsx @@ -317,23 +317,37 @@ function AlbumGallery() { animate={{ x: 0 }} transition={{ duration: 0.25, ease: 'easeOut' }} /> - {/* 컨셉 정보 - 정보가 있을 때만 표시 */} - {imageLoaded && photos[lightbox.index]?.title && ( -
- - {photos[lightbox.index]?.title} - - {/* 멤버가 있고 빈 문자열이 아닐 때만 표시, 쉼표로 분리해서 개별 태그 */} - {photos[lightbox.index]?.members && String(photos[lightbox.index]?.members).trim() && ( -
- {String(photos[lightbox.index]?.members).split(',').map((member, idx) => ( - - {member.trim()} + {/* 컨셉 정보 + 멤버 - 하나라도 있으면 표시 */} + {imageLoaded && ( + (() => { + const title = photos[lightbox.index]?.title; + const hasValidTitle = title && title.trim() && title !== 'Default'; + const members = photos[lightbox.index]?.members; + const hasMembers = members && String(members).trim(); + + if (!hasValidTitle && !hasMembers) return null; + + return ( +
+ {/* 컨셉명 - 있고 유효할 때만 */} + {hasValidTitle && ( + + {title} - ))} + )} + {/* 멤버 - 있으면 항상 표시 */} + {hasMembers && ( +
+ {String(members).split(',').map((member, idx) => ( + + {member.trim()} + + ))} +
+ )}
- )} -
+ ); + })() )}
diff --git a/frontend/src/pages/pc/admin/AdminAlbumPhotos.jsx b/frontend/src/pages/pc/admin/AdminAlbumPhotos.jsx index 63bd38d..431cb77 100644 --- a/frontend/src/pages/pc/admin/AdminAlbumPhotos.jsx +++ b/frontend/src/pages/pc/admin/AdminAlbumPhotos.jsx @@ -371,19 +371,12 @@ function AdminAlbumPhotos() { // 컨셉 포토일 때만 검증 if (photoType === 'concept') { - // 컨셉명 검증 (각 파일별로) - const missingConcept = pendingFiles.some(f => !f.conceptName.trim()); - if (missingConcept) { - setToast({ message: '모든 사진의 컨셉명을 입력해주세요.', type: 'warning' }); - return; - } - - // 솔로/유닛인데 멤버 선택 안 한 경우 + // 개인/유닛인데 멤버 선택 안 한 경우 const missingMembers = pendingFiles.some(f => (f.groupType === 'solo' || f.groupType === 'unit') && f.members.length === 0 ); if (missingMembers) { - setToast({ message: '솔로/유닛 사진에는 멤버를 선택해주세요.', type: 'warning' }); + setToast({ message: '개인/유닛 사진에는 멤버를 선택해주세요.', type: 'warning' }); return; } } @@ -996,7 +989,7 @@ function AdminAlbumPhotos() {
{[ { value: 'group', icon: Users, label: '단체' }, - { value: 'solo', icon: User, label: '솔로' }, + { value: 'solo', icon: User, label: '개인' }, { value: 'unit', icon: Users2, label: '유닛' }, ].map(({ value, icon: Icon, label }) => (