fix more bugs with updates tab... (#2219)

This commit is contained in:
Matt Hill
2023-03-15 11:33:54 -06:00
committed by GitHub
parent 2bcc8e0d30
commit a615882b3f
2 changed files with 8 additions and 7 deletions

View File

@@ -40,7 +40,10 @@
<ion-label>
<h1 style="line-height: 1.3">{{ pkg.manifest.title }}</h1>
<h2 class="inline">
<span>{{ local.manifest.version | displayEmver }}</span>
<span>
{{ local.installed?.manifest?.version || '' |
displayEmver }}
</span>
&nbsp;
<ion-icon name="arrow-forward"></ion-icon>
&nbsp;
@@ -92,7 +95,7 @@
<ion-button
fill="clear"
strong
(click)="viewInMarketplace($event, local)"
(click)="viewInMarketplace($event, host.url, pkg.manifest.id)"
>
View listing
<ion-icon slot="end" name="open-outline"></ion-icon>

View File

@@ -55,13 +55,11 @@ export class UpdatesPage {
private readonly alertCtrl: AlertController,
) {}
viewInMarketplace(event: Event, pkg: PackageDataEntry) {
viewInMarketplace(event: Event, url: string, id: string) {
event.stopPropagation()
const url = pkg.installed?.['marketplace-url']
const queryParams = url ? { url } : {}
this.navCtrl.navigateForward([`marketplace/${pkg.manifest.id}`], {
queryParams,
this.navCtrl.navigateForward([`marketplace/${id}`], {
queryParams: { url },
})
}