Refactor Mac installer progress messages for clarity; simplify progress percentage calculation and update installation prompt message.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-06-21 18:38:23 +01:00
parent 08890bd5bf
commit 71fe6e3462

View File

@ -188,10 +188,7 @@ const parseMacInstallerProgress = (output) => {
} else if (line.startsWith('installer:%')) { } else if (line.startsWith('installer:%')) {
const value = Number.parseFloat(line.slice('installer:%'.length)) const value = Number.parseFloat(line.slice('installer:%'.length))
if (Number.isFinite(value)) { if (Number.isFinite(value)) {
percent = Math.min( percent = Math.min(100, Math.round(value <= 1 ? value * 100 : value))
100,
Math.round(value <= 1 ? value * 100 : value)
)
} }
} else if ( } else if (
line.startsWith('installer: ') && line.startsWith('installer: ') &&
@ -259,8 +256,7 @@ const launchMacInstaller = (app, installerPath, webContents) => {
sendProgress(webContents, { sendProgress(webContents, {
phase: 'installing', phase: 'installing',
percent: 0, percent: 0,
message: message: 'Enter your Mac password when prompted.'
'Installing update. Enter your Mac password when prompted, then Farm Control will restart automatically.'
}) })
app.focus({ steal: true }) app.focus({ steal: true })