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
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
08890bd5bf
commit
71fe6e3462
@ -188,10 +188,7 @@ const parseMacInstallerProgress = (output) => {
|
||||
} else if (line.startsWith('installer:%')) {
|
||||
const value = Number.parseFloat(line.slice('installer:%'.length))
|
||||
if (Number.isFinite(value)) {
|
||||
percent = Math.min(
|
||||
100,
|
||||
Math.round(value <= 1 ? value * 100 : value)
|
||||
)
|
||||
percent = Math.min(100, Math.round(value <= 1 ? value * 100 : value))
|
||||
}
|
||||
} else if (
|
||||
line.startsWith('installer: ') &&
|
||||
@ -259,8 +256,7 @@ const launchMacInstaller = (app, installerPath, webContents) => {
|
||||
sendProgress(webContents, {
|
||||
phase: 'installing',
|
||||
percent: 0,
|
||||
message:
|
||||
'Installing update. Enter your Mac password when prompted, then Farm Control will restart automatically.'
|
||||
message: 'Enter your Mac password when prompted.'
|
||||
})
|
||||
|
||||
app.focus({ steal: true })
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user