fix rendering bug in marketplace

This commit is contained in:
Matt Hill
2021-07-21 10:31:08 -06:00
committed by Aiden McClelland
parent eb245aea50
commit dc923ea6fb
3 changed files with 4 additions and 6 deletions

View File

@@ -11,7 +11,7 @@
</ion-header>
<ion-content class="ion-padding-top">
<text-spinner *ngIf="pageLoading; else pageLoaded" [text]="'loading marketplace'"></text-spinner>
<text-spinner *ngIf="pageLoading; else pageLoaded" text="Loading Marketplace"></text-spinner>
<ng-template #pageLoaded>
<ion-card *ngIf="eos" class="eos-card" (click)="updateEos()">
@@ -39,7 +39,7 @@
</div>
<div *ngIf="pkgsLoading; else loaded" style="margin-top: 64px;" class="ion-text-center">
<ion-spinner name="lines" color="warning"></ion-spinner>
<text-spinner [text]="'Loading ' + (category | titlecase)"></text-spinner>
</div>
<ng-template #loaded>
@@ -53,7 +53,7 @@
<ion-label>
<h2 style="font-family: 'Montserrat';">{{ pkg.manifest.title }}</h2>
<p>{{ pkg.manifest.description.short }}</p>
<ng-container *ngIf="localPkgs[pkg.id] as localPkg">
<ng-container *ngIf="localPkgs[pkg.manifest.id] as localPkg">
<p *ngIf="localPkg.state === PackageState.Installed">
<ion-text *ngIf="(pkg.manifest.version | compareEmver : localPkg.manifest.version) === 0" color="success">Installed</ion-text>
<ion-text *ngIf="(pkg.manifest.version | compareEmver : localPkg.manifest.version) === 1" color="warning">Update Available</ion-text>

View File

@@ -131,8 +131,6 @@ export class MarketplaceShowPage {
}),
)
if (cancelled) return
await pauseFor(250)
this.navCtrl.back()
}
async update (action: 'update' | 'downgrade') {

View File

@@ -9,7 +9,7 @@ import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
})
export class MarketplaceService {
pkgs: { [id: string]: MarketplacePkg } = { }
updates: MarketplacePkg[] = null
updates: MarketplacePkg[] = []
releaseNotes: { [id: string]: {
[version: string]: string
} } = { }