MCPcopy Create free account
hub / github.com/error311/FileRise / formatSourceBadgeText

Function formatSourceBadgeText

public/js/fileListView.js:1715–1723  ·  view source on GitHub ↗
(meta)

Source from the content-addressed store, hash-verified

1713}
1714
1715function formatSourceBadgeText(meta) {
1716 const name = String(meta?.name || '').trim();
1717 const typeLabel = formatSourceTypeLabel(meta?.type || '');
1718 if (typeLabel && name) {
1719 if (typeLabel.toLowerCase() === name.toLowerCase()) return name;
1720 return `${typeLabel}: ${name}`;
1721 }
1722 return name || typeLabel;
1723}
1724
1725function setSourceBadge(titleEl, sourceId) {
1726 if (!titleEl) return;

Callers 5

drawPageFunction · 0.85
setSourceBadgeFunction · 0.85

Calls 1

formatSourceTypeLabelFunction · 0.85

Tested by

no test coverage detected