fix(modal): 모달 닫기·프로젝트 삭제 동작 + 세로 가운데 정렬

- 모달 오버레이 마커를 data-open-id → data-open-pid 로 변경
  (열기 감지 셀렉터 [data-open-id] 와 충돌해 모달 내부 클릭이
   닫기/삭제 대신 모달 재오픈으로 잡히던 문제)
- .modal/.share-modal 에 margin:auto → 짧으면 정중앙, 길면 스크롤
- 프로젝트 삭제 버튼 앞에 휴지통 아이콘 추가

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-30 16:32:28 +09:00
parent ebf9599199
commit 540a170b0d
3 changed files with 9 additions and 6 deletions

View File

@@ -9,7 +9,9 @@ export function openDetail(id) {
mount.innerHTML = tpl.innerHTML;
overlay.hidden = false;
document.body.style.overflow = "hidden";
overlay.setAttribute("data-open-id", id);
// 주의: 열기 감지 셀렉터가 [data-open-id] 라서 같은 이름을 쓰면 모달 내부 클릭(닫기/삭제)이
// 다시 "열기"로 잡힌다. 마커는 반드시 다른 속성명(data-open-pid)으로 둔다.
overlay.setAttribute("data-open-pid", id);
const ta = $(".comment-input", overlay);
if (ta) ta.focus();
}
@@ -17,7 +19,7 @@ function closeDetail() {
const overlay = $("#detailModal");
if (!overlay || overlay.hidden) return;
overlay.hidden = true;
overlay.removeAttribute("data-open-id");
overlay.removeAttribute("data-open-pid");
document.body.style.overflow = "";
}