* 创建简单的进度条字符串
(percentage: number, width: number = 20)
| 82 | * 创建简单的进度条字符串 |
| 83 | */ |
| 84 | private static createProgressBar(percentage: number, width: number = 20): string { |
| 85 | const filled = Math.round((percentage / 100) * width); |
| 86 | const empty = width - filled; |
| 87 | |
| 88 | const filledBar = UIStyles.status.success('█'.repeat(filled)); |
| 89 | const emptyBar = UIStyles.status.muted('░'.repeat(empty)); |
| 90 | |
| 91 | return `[${filledBar}${emptyBar}]`; |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * 格式化时间 |