fix(project): 아이콘버튼 호버 중앙정렬·댓글팝업 본인댓글 삭제 지원
- .pj-icon-btn 기본 스타일에 flex 중앙정렬 추가(닫기 버튼 등 호버 음영이 아이콘 기준 중앙에 오지 않던 문제, 버튼 UA 기본 패딩이 원인) - 댓글 팝업(카톡형)에서 본인이 작성한 댓글에만 삭제 버튼 노출 (서버는 이미 본인/관리자만 삭제 허용하도록 검증 중) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/project.css?v=20260915g" />
|
<link rel="stylesheet" href="/static/project.css?v=20260915h" />
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -45,5 +45,5 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/project.js?v=20260915f" defer></script>
|
<script src="/static/project.js?v=20260915g" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/project.css?v=20260915g" />
|
<link rel="stylesheet" href="/static/project.css?v=20260915h" />
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -330,5 +330,5 @@
|
|||||||
<script>
|
<script>
|
||||||
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
|
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/project.js?v=20260915f" defer></script>
|
<script src="/static/project.js?v=20260915g" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "erp_base.html" %}
|
{% extends "erp_base.html" %}
|
||||||
|
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/static/project.css?v=20260915g" />
|
<link rel="stylesheet" href="/static/project.css?v=20260915h" />
|
||||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
<!-- 타임라인 vis-timeline — self-host -->
|
<!-- 타임라인 vis-timeline — self-host -->
|
||||||
@@ -291,5 +291,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||||
<script src="/static/project.js?v=20260915f" defer></script>
|
<script src="/static/project.js?v=20260915g" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
.pj-icon-btn {
|
.pj-icon-btn {
|
||||||
border: none; background: transparent; color: #6b7280; cursor: pointer;
|
border: none; background: transparent; color: #6b7280; cursor: pointer;
|
||||||
font-size: 16px; line-height: 1; width: 24px; height: 24px; border-radius: 6px;
|
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; }
|
.pj-icon-btn:hover { background: #eceef0; color: #1e1f21; }
|
||||||
|
|
||||||
@@ -370,7 +371,12 @@
|
|||||||
box-shadow: 0 1px 2px rgba(0,0,0,.06);
|
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-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; }
|
.pj-col-head { position: relative; }
|
||||||
|
|||||||
+14
-1
@@ -453,8 +453,21 @@
|
|||||||
li.innerHTML =
|
li.innerHTML =
|
||||||
(mine ? "" : '<span class="pj-chat-name">' + escapeHtml(idOf(c.author_email)) + "</span>") +
|
(mine ? "" : '<span class="pj-chat-name">' + escapeHtml(idOf(c.author_email)) + "</span>") +
|
||||||
'<div class="pj-chat-bubble"></div>' +
|
'<div class="pj-chat-bubble"></div>' +
|
||||||
'<span class="pj-chat-time">' + (c.created_at || "").slice(0, 16).replace("T", " ") + "</span>";
|
'<span class="pj-chat-meta">' +
|
||||||
|
(mine ? '<button type="button" class="pj-icon-btn pj-chat-del" title="삭제"><span class="material-symbols-outlined">close</span></button>' : "") +
|
||||||
|
'<span class="pj-chat-time">' + (c.created_at || "").slice(0, 16).replace("T", " ") + "</span>" +
|
||||||
|
"</span>";
|
||||||
li.querySelector(".pj-chat-bubble").textContent = c.body;
|
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.appendChild(li);
|
||||||
});
|
});
|
||||||
list.scrollTop = list.scrollHeight;
|
list.scrollTop = list.scrollHeight;
|
||||||
|
|||||||
Reference in New Issue
Block a user