Commit 795c7e32 authored by Roman Alifanov's avatar Roman Alifanov

Show 'you can close this window' when reboot is not required

parent 197e62f4
......@@ -75,21 +75,26 @@ func (p *UpdateProcessPage) UpdateProgress(event model.EventData) {
}
func (p *UpdateProcessPage) ShowComplete(success bool, showReboot bool) {
if success {
switch {
case success && showReboot:
p.finishStatusPage.SetTitle("Updating complete!")
p.finishStatusPage.SetIconName("face-smile-big-symbolic")
p.finishStatusPage.SetDescription("Click on button below to restart device")
} else if showReboot {
case success:
p.finishStatusPage.SetTitle("Updating complete!")
p.finishStatusPage.SetIconName("face-smile-big-symbolic")
p.finishStatusPage.SetDescription("You can close this window")
case showReboot:
p.finishStatusPage.SetTitle("Update Partially Complete")
p.finishStatusPage.SetIconName("dialog-warning-symbolic")
p.finishStatusPage.SetDescription("Some updates failed, but system packages were updated. A reboot is recommended.")
} else {
default:
p.finishStatusPage.SetTitle("Update Failed")
p.finishStatusPage.SetIconName("dialog-error-symbolic")
p.finishStatusPage.SetDescription("The update encountered an error. Please check the logs.")
}
p.rebootBtn.SetVisible(showReboot || success)
p.rebootBtn.SetVisible(showReboot)
// Copy log to finish page
start := p.logBuffer.StartIter()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment