MCPcopy Create free account
hub / github.com/stemdeckapp/stemdeck / renderStrip

Function renderStrip

static/js/catalog.js:1209–1232  ·  view source on GitHub ↗
(strip, nonTrash)

Source from the content-addressed store, hash-verified

1207}
1208
1209function renderStrip(strip, nonTrash) {
1210 if (!strip) return;
1211 const folderTrackIds = new Set(folders.flatMap((folder) => folder.items));
1212 for (const [trackId, track] of Object.entries(tracks)) {
1213 if (folderTrackIds.has(trackId)) continue;
1214 strip.appendChild(makeStripItem({
1215 className: trackId === _currentTrackId ? "active" : "",
1216 id: trackId,
1217 title: track.title,
1218 html: thumbHtml(track),
1219 trackId,
1220 }));
1221 }
1222 for (const folder of nonTrash) {
1223 const folderColor = normalizeFolderColor(folder.color);
1224 strip.appendChild(makeStripItem({
1225 className: "folder-thumb",
1226 id: folder.id,
1227 title: `${folder.name} (${folder.items.length})`,
1228 html: folderThumbHtml(false),
1229 color: folderColor,
1230 }));
1231 }
1232}
1233
1234function render() {
1235 const list = document.getElementById("catalogList");

Callers 1

renderFunction · 0.85

Calls 4

makeStripItemFunction · 0.85
thumbHtmlFunction · 0.85
normalizeFolderColorFunction · 0.85
folderThumbHtmlFunction · 0.85

Tested by

no test coverage detected