integer progress

This commit is contained in:
Andy Miller
2025-10-17 14:19:29 -06:00
parent 4aedf58f78
commit a572533120
2 changed files with 4 additions and 2 deletions

View File

@@ -673,7 +673,8 @@ export default class SafeUpgrade {
};
percent = scaledPercent();
const percentLabel = percent !== null ? `${percent}%` : '';
const displayPercent = percent !== null ? Math.round(percent) : null;
const percentLabel = displayPercent !== null ? `${displayPercent}%` : '';
const statusLine = job && job.status ? `<p class="safe-upgrade-status">${t('SAFE_UPGRADE_JOB_STATUS', 'Status')}: <strong>${job.status.toUpperCase()}</strong>${job.error ? ` &mdash; ${job.error}` : ''}</p>` : '';
const animateBar = stage !== 'complete' && stage !== 'error' && percent !== null;

View File

@@ -5141,7 +5141,8 @@ var SafeUpgrade = /*#__PURE__*/function () {
return percent;
};
percent = scaledPercent();
var percentLabel = percent !== null ? "".concat(percent, "%") : '';
var displayPercent = percent !== null ? Math.round(percent) : null;
var percentLabel = displayPercent !== null ? "".concat(displayPercent, "%") : '';
var statusLine = job && job.status ? "<p class=\"safe-upgrade-status\">".concat(t('SAFE_UPGRADE_JOB_STATUS', 'Status'), ": <strong>").concat(job.status.toUpperCase(), "</strong>").concat(job.error ? " &mdash; ".concat(job.error) : '', "</p>") : '';
var animateBar = stage !== 'complete' && stage !== 'error' && percent !== null;
var barClass = "safe-upgrade-progress-bar".concat(animateBar ? ' is-active' : '');