(text)
| 19690 | dot = document.createElement('span'); |
| 19691 | dot.className = 'files-flag absolute -top-1 -right-1 w-3 h-3 bg-amber-500 rounded-full pulse-glow'; |
| 19692 | btn.style.position = 'relative'; |
| 19693 | btn.appendChild(dot); |
| 19694 | } |
| 19695 | } else if (dot) { |
| 19696 | dot.remove(); |
| 19697 | } |
| 19698 | }); |
| 19699 | } |
| 19700 | // Sent-to-this-unit case (Inbox count). |
| 19701 | function setFilesNavFlag(count) { _filesFlagInbox = count; _applyFilesFlag(); } |
| 19702 | function refreshFilesFlag() { |
| 19703 | networkAwareFetch('/api/mesh/inbox') |
| 19704 | .then(r => r.json()) |
| 19705 | .then(d => setFilesNavFlag((d && d.items) ? d.items.length : 0)) |
| 19706 | .catch(() => { /* silent — background check */ }); |
| 19707 | } |
| 19708 | // Shared-to-the-mesh case: flag when a peer has shared more files than we last |
| 19709 | // saw. Baselines silently on first observation so pre-existing shares don't flag. |
nothing calls this directly
no test coverage detected