A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: don't mark facet with custom code as active

+7 -3
+7 -3
src/facets/common/grid.js
··· 33 33 34 34 const out = await foundation.orchestrator.output(); 35 35 const collection = await Output.data(out.facets); 36 - const isActive = collection.some((f) => f.uri === uri); 36 + const isActive = collection.some((f) => 37 + f.uri === uri && f.html === undefined 38 + ); 37 39 38 40 if (isActive) { 39 41 out.facets.save(collection.filter((f) => f.uri !== uri)); ··· 67 69 68 70 const col = out.facets.collection(); 69 71 const collection = col.state === "loaded" ? col.data : []; 70 - const activeURIs = new Set(collection.map((f) => f.uri)); 72 + const colMap = new Map(collection.map((f) => [f.uri, f])); 71 73 72 74 for (const li of gridItems) { 73 75 const uri = li.getAttribute("data-uri"); ··· 79 81 80 82 button.style.opacity = "revert-layer"; 81 83 82 - const isActive = activeURIs.has(uri); 84 + const item = colMap.get(uri); 85 + const isActive = item && item.html === undefined; 86 + 83 87 button.title = isActive 84 88 ? "Remove from your collection" 85 89 : "Add to your collection";