Enhance isInstallComplete function in AppUpdateProgress to recognize additional completion messages, including 'successful' and 'restarting', improving accuracy of installation status detection during updates.
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
e0b409434d
commit
8677691da3
@ -72,11 +72,17 @@ const getDownloadStageStatus = (phase, isError) => {
|
|||||||
return 'pending'
|
return 'pending'
|
||||||
}
|
}
|
||||||
|
|
||||||
const isInstallComplete = (phase, message) =>
|
const isInstallComplete = (phase, message) => {
|
||||||
phase === 'installing' &&
|
if (phase !== 'installing') return false
|
||||||
String(message || '')
|
|
||||||
.toLowerCase()
|
const normalized = String(message || '').toLowerCase()
|
||||||
.includes('complete')
|
|
||||||
|
return (
|
||||||
|
normalized.includes('complete') ||
|
||||||
|
normalized.includes('successful') ||
|
||||||
|
normalized.includes('restarting')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const getInstallStageStatus = (phase, isError, message) => {
|
const getInstallStageStatus = (phase, isError, message) => {
|
||||||
if (isError && ['downloaded', 'installing'].includes(phase)) return 'error'
|
if (isError && ['downloaded', 'installing'].includes(phase)) return 'error'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user