MCPcopy
hub / github.com/stemdeckapp/stemdeck / applyStemPresenceCards

Function applyStemPresenceCards

static/js/catalog.js:384–398  ·  view source on GitHub ↗
(stemPresence)

Source from the content-addressed store, hash-verified

382}
383
384export function applyStemPresenceCards(stemPresence) {
385 const cards = document.querySelectorAll(".stem-presence-panel .stem-card");
386 cards.forEach((card) => {
387 const stem = card.dataset.stem;
388 const pct = stemPresence?.[stem];
389 const label = card.querySelector(".stem-card-pct");
390 if (pct != null && pct > 0) {
391 card.classList.remove("inactive");
392 if (label) label.textContent = `${pct}%`;
393 } else {
394 card.classList.add("inactive");
395 if (label) label.textContent = pct === 0 ? "0%" : "—";
396 }
397 });
398}
399
400function applyTrackInfoToPanel(track) {
401 titleEl.textContent = track.title || "Untitled track";

Callers 2

applyStateFunction · 0.90
applyTrackInfoToPanelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected