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:
@@ -1582,6 +1582,14 @@ const CSS = `
|
|||||||
.snap-item-node {
|
.snap-item-node {
|
||||||
border-left: 3px solid #6d28d9;
|
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 {
|
.snap-node-badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 9px;
|
font-size: 9px;
|
||||||
@@ -2387,6 +2395,12 @@ async function buildSidebar(el) {
|
|||||||
if (diffBaseSnapshot && diffBaseSnapshot.id === rec.id) {
|
if (diffBaseSnapshot && diffBaseSnapshot.id === rec.id) {
|
||||||
item.classList.add("snap-diff-base");
|
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");
|
const info = document.createElement("div");
|
||||||
info.className = "snap-item-info";
|
info.className = "snap-item-info";
|
||||||
|
|||||||
Reference in New Issue
Block a user