-function generateProgressBar(current: number, max: number, color: string, displayPercent: boolean = true): string {
- let percent = 0;
- if(max > 0) {
- percent = Math.floor((current / max) * 100);
- }
- const display = `${displayPercent? `${percent}% - `: ''}`;
- return `<div class="progress-bar" style="background: linear-gradient(to right, ${color}, ${color} ${percent}%, transparent ${percent}%, transparent)" title="${display}${current}/${max}">${display}${current}/${max}</div>`;
-}
-