style(project): 작업 팝업 협업자 줄을 담당자 칸과 같은 모양으로

- 라벨·간격을 담당자 칸(.pj-meta-cell)과 같게, 그룹 아이콘 제거
- 협업자는 담당자 버튼처럼 "아이콘 + 이름", 빼기(×)는 마우스를 올렸을 때만
- 없으면 점선 원 "협업자 없음"(누르면 추가 메뉴), + 버튼은 한 명 이상일 때만
- 추가 메뉴도 "아이콘 + 이름"
- 정적 파일 버전 20260926d

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 11:44:24 +09:00
parent 069d7a4081
commit de9daf7bad
6 changed files with 49 additions and 37 deletions
+24 -15
View File
@@ -4296,14 +4296,21 @@
function renderFollowers() {
const box = el("pj-follower-chips");
if (!box) return;
// 담당자 버튼과 같은 "아이콘 + 이름". × 는 마우스를 올릴 때만. 없으면 점선 원
// "협업자 없음"(누르면 추가 메뉴) — 이땐 옆 + 버튼은 숨긴다.
box.innerHTML = followers.map(function (e) {
return '<span class="pj-follower-chip" data-tip="' + escapeHtml(e) + '">' +
avatarHtml(e, "pj-gicon-sm") + '<span class="pj-follower-name">' + escapeHtml(idOf(e)) + "</span>" +
return '<span class="pj-assignee-btn pj-follower-chip" data-tip="' + escapeHtml(e) + '">' +
personIconHtml(e) + '<span class="pj-assignee-btn-name">' + escapeHtml(idOf(e)) + "</span>" +
'<button type="button" class="pj-follower-x" data-email="' + escapeHtml(e) + '" title="협업자에서 빼기">×</button></span>';
}).join("") || '<span class="pj-muted-sm">없음</span>';
}).join("") ||
'<button type="button" class="pj-assignee-btn is-empty pj-follower-empty">' + personIconHtml("") +
'<span class="pj-assignee-btn-name">협업자 없음</span></button>';
el("pj-follower-add").hidden = !followers.length;
box.querySelectorAll(".pj-follower-x").forEach(function (b) {
b.addEventListener("click", function () { setFollower(b.dataset.email, false); });
});
const empty = box.querySelector(".pj-follower-empty");
if (empty) empty.addEventListener("click", openFollowerAddMenu);
const followingMe = followers.indexOf(me) >= 0;
const tog = el("pj-follow-toggle");
tog.textContent = followingMe ? "협업자에서 나가기" : "협업자로 참여";
@@ -4333,18 +4340,20 @@
el("pj-follow-toggle").addEventListener("click", function () {
setFollower(me, followers.indexOf(me) < 0);
});
el("pj-follower-add").addEventListener("click", async function (e) {
if (!followersTask) return;
const r = e.currentTarget.getBoundingClientRect();
let list = [];
try { list = await membersOfProject(followersTask.project_id); } catch (_) {}
const cands = list.map(function (m) { return (m.user_email || "").toLowerCase(); })
.filter(function (em) { return em && followers.indexOf(em) < 0; });
if (!cands.length) { showToast("추가할 수 있는 멤버가 없습니다."); return; }
showContextMenu(r.left, r.bottom + 4, cands.map(function (em) {
return { label: idOf(em), onClick: function () { setFollower(em, true); } };
}));
});
el("pj-follower-add").addEventListener("click", openFollowerAddMenu);
}
// 협업자 추가 메뉴 — 담당자 메뉴처럼 "아이콘 + 이름".
async function openFollowerAddMenu(e) {
if (!followersTask) return;
const r = e.currentTarget.getBoundingClientRect();
let list = [];
try { list = await membersOfProject(followersTask.project_id); } catch (_) {}
const cands = list.map(function (m) { return (m.user_email || "").toLowerCase(); })
.filter(function (em) { return em && followers.indexOf(em) < 0; });
if (!cands.length) { showToast("추가할 수 있는 멤버가 없습니다."); return; }
showContextMenu(r.left, r.bottom + 4, cands.map(function (em) {
return { label: idOf(em), icon: personIconHtml(em), onClick: function () { setFollower(em, true); } };
}));
}
async function loadTaskExtras(task) {