ui: adds install/uninstall warnings

This commit is contained in:
Aaron Greenspan
2021-01-13 17:11:12 -07:00
committed by Aiden McClelland
parent 071bd159ab
commit 238ede33b9
12 changed files with 57 additions and 75 deletions

View File

@@ -61,6 +61,8 @@ export class AppAvailableShowPage extends Cleanup {
this.appId = this.route.snapshot.paramMap.get('appId') as string
this.cleanup(
// new version always includes dependencies, but not vice versa
this.$newVersionLoading$.subscribe(this.$dependenciesLoading$),
markAsLoadingDuring$(this.$loading$,
from(this.apiService.getAvailableApp(this.appId)).pipe(
tap(app => this.$app$ = initPropertySubject(app)),
@@ -133,7 +135,7 @@ export class AppAvailableShowPage extends Cleanup {
const previousVersion = this.$app$.versionViewing.getValue()
this.$app$.versionViewing.next(version)
markAsLoadingDuring$(
this.$newVersionLoading$, this.syncVersionSpecificInfo(`=${version}`)
this.$newVersionLoading$, this.syncVersionSpecificInfo(`=${version}`),
)
.subscribe({
error: e => {
@@ -158,6 +160,7 @@ export class AppAvailableShowPage extends Cleanup {
title: app.title,
version: app.versionViewing,
serviceRequirements: app.serviceRequirements,
installWarning: app.installWarning,
}),
)
if (cancelled) return
@@ -172,6 +175,7 @@ export class AppAvailableShowPage extends Cleanup {
title: app.title,
version: app.versionViewing,
serviceRequirements: app.serviceRequirements,
installWarning: app.installWarning,
}
switch (action) {

View File

@@ -267,6 +267,7 @@ export class AppInstalledShowPage extends Cleanup {
id: app.id,
title: app.title,
version: app.versionInstalled,
uninstallWarning: app.uninstallWarning,
}),
)