Highlight active and current snapshots in sidebar

Add white left border for the swapped-to snapshot and green left border
for the auto-saved "you were here" snapshot, matching timeline markers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 22:28:06 +01:00
parent e5d9e6ca99
commit 0b7fb5be0e

View File

@@ -1582,6 +1582,14 @@ const CSS = `
.snap-item-node {
border-left: 3px solid #6d28d9;
}
.snap-item-active {
background: rgba(255,255,255,0.06);
border-left: 3px solid #fff;
}
.snap-item-current {
background: rgba(16,185,129,0.06);
border-left: 3px solid #10b981;
}
.snap-node-badge {
display: inline-block;
font-size: 9px;
@@ -2387,6 +2395,12 @@ async function buildSidebar(el) {
if (diffBaseSnapshot && diffBaseSnapshot.id === rec.id) {
item.classList.add("snap-diff-base");
}
if (rec.id === activeSnapshotId) {
item.classList.add("snap-item-active");
}
if (rec.id === currentSnapshotId) {
item.classList.add("snap-item-current");
}
const info = document.createElement("div");
info.className = "snap-item-info";