* fix html displaying in marketplace banner description

* always bold install risk copy

* display correct pkg in marketplace when diff registry, copy changes

Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>
This commit is contained in:
Lucy C
2022-12-02 23:20:01 -07:00
committed by GitHub
parent 1d6c61cc5b
commit bd5668d15d
9 changed files with 78 additions and 76 deletions

View File

@@ -15,7 +15,7 @@
<ion-item [color]="details.color">
<ion-icon slot="start" name="information-circle-outline"></ion-icon>
<ion-label>
<h2 style="font-weight: 600">{{ details.description }}</h2>
<h2 style="font-weight: 600" [innerHTML]="details.description"></h2>
</ion-label>
</ion-item>

View File

@@ -19,7 +19,6 @@ export class MarketplaceListPage {
readonly back = !!this.route.snapshot.queryParamMap.get('back')
readonly store$ = this.marketplaceService.getSelectedStore$().pipe(
filter(Boolean),
map(({ info, packages }) => {
const categories = new Set<string>()
if (info.categories.includes('featured')) categories.add('featured')
@@ -57,7 +56,7 @@ export class MarketplaceListPage {
// alt marketplace
color = 'warning'
description =
'This is a Custom Registry. Start9 cannot verify the integrity or functionality of services from this registry, and they may cause harm to your system. Install at your own risk.'
'This is a Custom Registry. Start9 cannot verify the integrity or functionality of services from this registry, and they may cause harm to your system. <b>Install at your own risk</b>.'
}
return {

View File

@@ -2,7 +2,16 @@
<ion-content class="ion-padding">
<ng-container *ngIf="pkg$ | async as pkg else loading">
<ng-container *ngIf="!(pkg | empty)">
<ng-container *ngIf="pkg | empty; else show">
<ng-container *ngIf="loadVersion$ | async as version">
<h2>
{{ pkgId }} version {{ version === '*' ? 'latest' : version }} not
found in this registry
</h2>
</ng-container>
</ng-container>
<ng-template #show>
<marketplace-package [pkg]="pkg"></marketplace-package>
<marketplace-show-controls
[url]="url"
@@ -24,7 +33,7 @@
[pkg]="pkg"
(version)="loadVersion$.next($event)"
></marketplace-additional>
</ng-container>
</ng-template>
</ng-container>
<ng-template #loading>

View File

@@ -14,7 +14,7 @@ import { DataModel } from 'src/app/services/patch-db/data-model'
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MarketplaceShowPage {
private readonly pkgId = getPkgId(this.route)
readonly pkgId = getPkgId(this.route)
readonly url = this.route.snapshot.queryParamMap.get('url') || undefined
readonly loadVersion$ = new BehaviorSubject<string>('*')