* Format transmission progress (0–100) to a percentage string. * Mirrors app.js `methods.formatProgress`.
(progress)
| 40 | * Mirrors app.js `methods.formatProgress`. |
| 41 | */ |
| 42 | function formatProgress(progress) { |
| 43 | const value = Number(progress || 0); |
| 44 | return `${Math.max(0, Math.min(100, value)).toFixed(0)}%`; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Format simulation seconds to "HH:MM:SS". |