feat(project): 댓글 채팅에 상대방 프로필 아이콘 + 보드 세션 이름 클릭 인라인 변경
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923f" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923g" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -96,5 +96,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/project.js?v=20260923f" defer></script>
|
||||
<script src="/static/project.js?v=20260923g" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923f" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923g" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -117,5 +117,5 @@
|
||||
"today": {{ today | tojson }}
|
||||
}
|
||||
</script>
|
||||
<script src="/static/project.js?v=20260923f" defer></script>
|
||||
<script src="/static/project.js?v=20260923g" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923f" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20260923g" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
@@ -518,5 +518,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20260923f" defer></script>
|
||||
<script src="/static/project.js?v=20260923g" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -244,6 +244,15 @@
|
||||
}
|
||||
/* 세션 제목 — 업무 카드 제목(pj-card-title 13.5px/600)보다 뚜렷하게 크고 굵게 */
|
||||
.pj-col-name { font-size: 15.5px; font-weight: 800; }
|
||||
/* 이름 클릭 → 인라인 이름 변경 */
|
||||
.pj-col-name.pj-col-name-editable { cursor: text; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; }
|
||||
.pj-col-name.pj-col-name-editable:hover { background: rgba(0,0,0,.06); }
|
||||
.pj-col-head-colored .pj-col-name.pj-col-name-editable:hover { background: rgba(255,255,255,.22); }
|
||||
.pj-col-name-input {
|
||||
font: inherit; font-size: 15.5px; font-weight: 800; color: var(--pj-ink);
|
||||
min-width: 0; flex: 1 1 auto; max-width: 70%; padding: 2px 6px;
|
||||
border: 1px solid var(--pj-accent); border-radius: 6px; background: #fff; outline: none;
|
||||
}
|
||||
/* 세션 색상 지정 시 — 점 대신 헤더(윗부분) 전체를 그 색으로 칠한다.
|
||||
.pj-col 의 padding(12px)만큼 밀어내 컬럼 테두리에 딱 맞춘다. */
|
||||
.pj-col-head.pj-col-head-colored {
|
||||
@@ -670,6 +679,13 @@
|
||||
.pj-chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
|
||||
.pj-chat-msg.mine { align-self: flex-end; align-items: flex-end; }
|
||||
.pj-chat-name { font-size: 11px; color: #6b7280; margin-bottom: 2px; padding: 0 2px; }
|
||||
/* 상대방 댓글 — 왼쪽 프로필 아이콘 + (이름/말풍선/시간) 세로 묶음 */
|
||||
.pj-chat-msg.other { flex-direction: row; align-items: flex-start; gap: 8px; }
|
||||
.pj-chat-av { flex: 0 0 auto; display: inline-flex; }
|
||||
.pj-avatar.pj-chat-avatar { width: 34px; height: 34px; }
|
||||
.pj-gicon.pj-chat-avatar { font-size: 36px; line-height: 1; color: #9aa1a9; }
|
||||
.pj-chat-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
|
||||
.pj-chat-msg.other .pj-chat-name { font-size: 12px; font-weight: 600; color: #4b5563; }
|
||||
.pj-chat-bubble {
|
||||
background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 12px;
|
||||
font-size: 13.5px; color: #1e1f21; white-space: pre-wrap; word-break: break-word;
|
||||
|
||||
+59
-3
@@ -440,19 +440,26 @@
|
||||
comments.forEach(function (c) {
|
||||
const mine = (c.author_email || "").toLowerCase() === me;
|
||||
const li = document.createElement("li");
|
||||
li.className = "pj-chat-msg" + (mine ? " mine" : "");
|
||||
li.className = "pj-chat-msg" + (mine ? " mine" : " other");
|
||||
const atts = attByComment[c.id] || [];
|
||||
const attsHtml = atts.length
|
||||
? '<div class="pj-chat-atts">' + atts.map(function (a) { return attachmentHtml(a, me); }).join("") + "</div>"
|
||||
: "";
|
||||
li.innerHTML =
|
||||
(mine ? "" : '<span class="pj-chat-name">' + escapeHtml(idOf(c.author_email)) + "</span>") +
|
||||
const inner =
|
||||
(c.body ? '<div class="pj-chat-bubble"></div>' : "") +
|
||||
attsHtml +
|
||||
'<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.innerHTML = mine
|
||||
? inner
|
||||
: '<span class="pj-chat-av">' + avatarHtml(c.author_email, "pj-chat-avatar") + "</span>" +
|
||||
'<div class="pj-chat-body">' +
|
||||
'<span class="pj-chat-name">' + escapeHtml(idOf(c.author_email)) + "</span>" +
|
||||
inner +
|
||||
"</div>";
|
||||
const bubble = li.querySelector(".pj-chat-bubble");
|
||||
if (bubble) bubble.textContent = c.body;
|
||||
if (mine) {
|
||||
@@ -2079,6 +2086,55 @@
|
||||
renderBoard();
|
||||
} catch (err) { showToast("삭제 실패: " + err.message, "error"); }
|
||||
}
|
||||
// 세션 이름 클릭 → 그 자리에서 이름 변경(Enter/포커스 이탈=저장, Esc=취소).
|
||||
// 헤더가 드래그(세션 재정렬) 대상이라 편집 중엔 draggable 을 꺼 둔다 —
|
||||
// 안 끄면 입력칸 안에서 글자 선택하려고 끌면 컬럼이 끌려간다.
|
||||
const nameEl = col.querySelector(".pj-col-name");
|
||||
if (nameEl) {
|
||||
nameEl.classList.add("pj-col-name-editable");
|
||||
nameEl.title = "클릭해서 이름 변경";
|
||||
nameEl.addEventListener("click", function (e) {
|
||||
e.stopPropagation();
|
||||
const head = col.querySelector(".pj-col-head");
|
||||
const wasDraggable = head.getAttribute("draggable");
|
||||
head.setAttribute("draggable", "false");
|
||||
const input = document.createElement("input");
|
||||
input.type = "text";
|
||||
input.className = "pj-col-name-input";
|
||||
input.value = s.name;
|
||||
input.maxLength = 100;
|
||||
nameEl.replaceWith(input);
|
||||
input.focus();
|
||||
input.select();
|
||||
let done = false;
|
||||
async function finish(save) {
|
||||
if (done) return;
|
||||
done = true;
|
||||
const name = input.value.trim();
|
||||
if (!save || !name || name === s.name) {
|
||||
input.replaceWith(nameEl);
|
||||
if (wasDraggable) head.setAttribute("draggable", wasDraggable);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await api("PUT", "/project/api/projects/" + projectId + "/stages/" + s.id, { name: name });
|
||||
await reloadStagesForCurrentProject();
|
||||
renderBoard();
|
||||
} catch (err) {
|
||||
showToast("이름 변경 실패: " + err.message, "error");
|
||||
input.replaceWith(nameEl);
|
||||
if (wasDraggable) head.setAttribute("draggable", wasDraggable);
|
||||
}
|
||||
}
|
||||
input.addEventListener("keydown", function (ev) {
|
||||
if (ev.isComposing) return; // 한글 조합 중 Enter 는 무시
|
||||
if (ev.key === "Enter") { ev.preventDefault(); finish(true); }
|
||||
else if (ev.key === "Escape") { ev.preventDefault(); finish(false); }
|
||||
});
|
||||
input.addEventListener("blur", function () { finish(true); });
|
||||
input.addEventListener("click", function (ev) { ev.stopPropagation(); });
|
||||
});
|
||||
}
|
||||
const renameBtn = col.querySelector(".pj-col-rename");
|
||||
if (renameBtn) renameBtn.addEventListener("click", function (e) { e.stopPropagation(); editStage(); });
|
||||
const doneBtn = col.querySelector(".pj-col-toggledone");
|
||||
|
||||
Reference in New Issue
Block a user