feat(project): 리스트 행 배경에 프로젝트 색 연하게 + 타임라인 확대구간 기억
- 리스트: 각 행 배경을 프로젝트 색 8%로 칠함 - 타임라인: 보던 확대/이동 구간을 localStorage(pj_tl_window)에 저장, 재렌더·탭전환 시 복원(초기화 방지) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -548,6 +548,23 @@
|
||||
const t = tasks.find(function (x) { return x.id === props.items[0]; });
|
||||
if (t) openTaskModal(t);
|
||||
});
|
||||
|
||||
// 확대/이동(보던 구간) 기억 — 저장된 창이 있으면 복원, 사용자가 바꾸면 저장.
|
||||
const saved = loadTLWindow();
|
||||
if (saved) timeline.setWindow(new Date(saved.start), new Date(saved.end), { animation: false });
|
||||
timeline.on("rangechanged", function (p) { saveTLWindow(p.start, p.end); });
|
||||
}
|
||||
function loadTLWindow() {
|
||||
try {
|
||||
const r = JSON.parse(localStorage.getItem("pj_tl_window") || "null");
|
||||
return (r && r.start && r.end) ? r : null;
|
||||
} catch (_) { return null; }
|
||||
}
|
||||
function saveTLWindow(s, e) {
|
||||
try {
|
||||
localStorage.setItem("pj_tl_window",
|
||||
JSON.stringify({ start: new Date(s).toISOString(), end: new Date(e).toISOString() }));
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
// ── 보드 (칸반) — 전체 프로젝트를 단계 '이름' 기준 컬럼으로 묶음 ──
|
||||
@@ -703,6 +720,9 @@
|
||||
rows.forEach(function (t) {
|
||||
const tr = document.createElement("tr");
|
||||
if (t.completed_at) tr.className = "is-done";
|
||||
// 행 배경 = 프로젝트 색 연하게(10%)
|
||||
const pc = t.project_color || "#4573d2";
|
||||
tr.style.background = pc + "14";
|
||||
tr.innerHTML = LIST_COLS.map(function (c) {
|
||||
return "<td>" + escapeHtml(String(c.text(t))) + "</td>";
|
||||
}).join("");
|
||||
|
||||
Reference in New Issue
Block a user