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:%')) {
|
} 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 })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user