(fraction?: number)
| 277 | const safeFraction = clampFraction(fraction) ?? 0; |
| 278 | const filled = Math.round(safeFraction * PROGRESS_BAR_WIDTH); |
| 279 | return `${"█".repeat(filled)}${"░".repeat(PROGRESS_BAR_WIDTH - filled)}`; |
| 280 | } |
| 281 | |
| 282 | function renderTransferProgress(song: ApiSong, update: TransferProgressUpdate): string { |
| 283 | const fraction = progressFraction(update); |
| 284 | const stageIcon = update.stage === "download" ? "⬇️" : "📤"; |
| 285 | const stageText = update.stage === "download" ? "本地下载中" : "本地上传中"; |
no outgoing calls
no test coverage detected