ui: cleanup wizard

This commit is contained in:
Aaron Greenspan
2021-02-05 14:48:46 -07:00
committed by Aiden McClelland
parent 46643cb3a4
commit 52fc2c4011
10 changed files with 292 additions and 165 deletions

View File

@@ -15,6 +15,7 @@ import { Cleanup } from 'src/app/util/cleanup'
import { InformationPopoverComponent } from 'src/app/components/information-popover/information-popover.component'
import { Emver } from 'src/app/services/emver.service'
import { displayEmver } from 'src/app/pipes/emver.pipe'
import { pauseFor } from 'src/app/util/misc.util'
@Component({
selector: 'app-available-show',
@@ -160,6 +161,7 @@ export class AppAvailableShowPage extends Cleanup {
}),
)
if (cancelled) return
await pauseFor(250)
this.navCtrl.back()
}
@@ -174,18 +176,16 @@ export class AppAvailableShowPage extends Cleanup {
installAlert: app.installAlert,
}
switch (action) {
case 'update':
return wizardModal(
this.modalCtrl,
this.wizardBaker.update(value),
).then(({ cancelled }) => cancelled || this.navCtrl.back())
case 'downgrade':
return wizardModal(
this.modalCtrl,
this.wizardBaker.downgrade(value),
).then(({ cancelled }) => cancelled || this.navCtrl.back())
}
const { cancelled } = await wizardModal(
this.modalCtrl,
action === 'update' ?
this.wizardBaker.update(value) :
this.wizardBaker.downgrade(value),
)
if (cancelled) return
await pauseFor(250)
this.navCtrl.back()
}
private fetchRecommendation (): Observable<any> {