From fee27659055fcf2e12c760b6957f61eab1340ddb Mon Sep 17 00:00:00 2001 From: king Date: Tue, 15 Sep 2026 13:28:02 +0900 Subject: [PATCH] =?UTF-8?q?fix(project):=20=EC=95=84=EC=9D=B4=EC=BD=98?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=ED=98=B8=EB=B2=84=20=EC=A4=91=EC=95=99?= =?UTF-8?q?=EC=A0=95=EB=A0=AC=C2=B7=EB=8C=93=EA=B8=80=ED=8C=9D=EC=97=85=20?= =?UTF-8?q?=EB=B3=B8=EC=9D=B8=EB=8C=93=EA=B8=80=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EC=A7=80=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .pj-icon-btn 기본 스타일에 flex 중앙정렬 추가(닫기 버튼 등 호버 음영이 아이콘 기준 중앙에 오지 않던 문제, 버튼 UA 기본 패딩이 원인) - 댓글 팝업(카톡형)에서 본인이 작성한 댓글에만 삭제 버튼 노출 (서버는 이미 본인/관리자만 삭제 허용하도록 검증 중) Co-Authored-By: Claude Sonnet 5 --- app/modules/project/templates/project/inbox.html | 4 ++-- app/modules/project/templates/project/index.html | 4 ++-- .../project/templates/project/project.html | 4 ++-- app/static/project.css | 8 +++++++- app/static/project.js | 15 ++++++++++++++- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/app/modules/project/templates/project/inbox.html b/app/modules/project/templates/project/inbox.html index 1df813a..a123116 100644 --- a/app/modules/project/templates/project/inbox.html +++ b/app/modules/project/templates/project/inbox.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -45,5 +45,5 @@ {% endif %} - + {% endblock %} diff --git a/app/modules/project/templates/project/index.html b/app/modules/project/templates/project/index.html index ee65ef3..dc37065 100644 --- a/app/modules/project/templates/project/index.html +++ b/app/modules/project/templates/project/index.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -330,5 +330,5 @@ - + {% endblock %} diff --git a/app/modules/project/templates/project/project.html b/app/modules/project/templates/project/project.html index 040ab54..b195963 100644 --- a/app/modules/project/templates/project/project.html +++ b/app/modules/project/templates/project/project.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + @@ -291,5 +291,5 @@ - + {% endblock %} diff --git a/app/static/project.css b/app/static/project.css index abd7650..46c4937 100644 --- a/app/static/project.css +++ b/app/static/project.css @@ -17,6 +17,7 @@ .pj-icon-btn { border: none; background: transparent; color: #6b7280; cursor: pointer; font-size: 16px; line-height: 1; width: 24px; height: 24px; border-radius: 6px; + padding: 0; display: inline-flex; align-items: center; justify-content: center; } .pj-icon-btn:hover { background: #eceef0; color: #1e1f21; } @@ -370,7 +371,12 @@ box-shadow: 0 1px 2px rgba(0,0,0,.06); } .pj-chat-msg.mine .pj-chat-bubble { background: #fee500; border-radius: 14px 14px 4px 14px; } -.pj-chat-time { font-size: 10px; color: #9aa1a9; margin-top: 3px; padding: 0 2px; } +.pj-chat-meta { display: flex; align-items: center; gap: 3px; margin-top: 3px; padding: 0 2px; } +.pj-chat-time { font-size: 10px; color: #9aa1a9; } +/* 본인 댓글만 보이는 삭제 버튼 */ +.pj-chat-del { width: 16px; height: 16px; color: #b7bdc5; } +.pj-chat-del .material-symbols-outlined { font-size: 13px; } +.pj-chat-del:hover { color: #c22b10; background: #fbecea; } /* ── 보드 단계 컨트롤 ── */ .pj-col-head { position: relative; } diff --git a/app/static/project.js b/app/static/project.js index c1adab8..b7fb7b5 100644 --- a/app/static/project.js +++ b/app/static/project.js @@ -453,8 +453,21 @@ li.innerHTML = (mine ? "" : '' + escapeHtml(idOf(c.author_email)) + "") + '
' + - '' + (c.created_at || "").slice(0, 16).replace("T", " ") + ""; + '' + + (mine ? '' : "") + + '' + (c.created_at || "").slice(0, 16).replace("T", " ") + "" + + ""; li.querySelector(".pj-chat-bubble").textContent = c.body; + if (mine) { + li.querySelector(".pj-chat-del").addEventListener("click", async function () { + if (!confirm("이 댓글을 삭제할까요?")) return; + try { + await api("DELETE", "/project/api/comments/" + c.id); + const n = await renderChat(taskId); + if (n !== null) { markSeen(taskId, n); syncBadge(taskId, n); } + } catch (e) { alert("삭제 실패: " + e.message); } + }); + } list.appendChild(li); }); list.scrollTop = list.scrollHeight;