(summary)
| 15581 | try { localStorage.setItem('mesh_share_seen', String(peerCount)); } catch (e) { /* ignore */ } |
| 15582 | _filesFlagSharedNew = false; |
| 15583 | } else { |
| 15584 | _filesFlagSharedNew = peerCount > (parseInt(raw, 10) || 0); |
| 15585 | } |
| 15586 | _applyFilesFlag(); |
| 15587 | }) |
| 15588 | .catch(() => { /* silent — background check */ }); |
| 15589 | } |
| 15590 | // Everything currently shared is now "seen" (called when Mesh Share is opened). |
| 15591 | function markSharedSeen(peerCount) { |
| 15592 | try { localStorage.setItem('mesh_share_seen', String(peerCount || 0)); } catch (e) { /* ignore */ } |
| 15593 | _filesFlagSharedNew = false; |
| 15594 | _applyFilesFlag(); |
| 15595 | } |
| 15596 | |
| 15597 | async function restartService() { |
| 15598 | if (!confirm('This will restart the Ragnar service. The web interface may be temporarily unavailable. Continue?')) { |
| 15599 | return; |
| 15600 | } |
| 15601 | |
| 15602 | try { |
| 15603 | addConsoleMessage('Restarting Ragnar service...', 'info'); |
| 15604 | updateElement('service-status', 'Restarting...'); |
| 15605 | document.getElementById('service-status').className = 'text-sm px-2 py-1 rounded bg-yellow-700 text-yellow-300'; |
| 15606 |
no test coverage detected