mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
fix marketplace search and better category disabling (#1991)
* fix marketplace search and better category disabling * bump marketplace version * fix issue with marketplace settings and absent community reg
This commit is contained in:
committed by
Aiden McClelland
parent
f9a4699e84
commit
ccb85737f7
@@ -29,14 +29,14 @@ export class MarketplaceSettingsPage {
|
||||
this.marketplaceService.getSelectedHost$(),
|
||||
]).pipe(
|
||||
map(([stores, selected]) => {
|
||||
const hmmm = stores.map(s => ({
|
||||
const toSlice = stores.map(s => ({
|
||||
...s,
|
||||
selected: s.url === selected.url,
|
||||
}))
|
||||
// 0 and 1 are prod and community
|
||||
const standard = hmmm.slice(0, 2)
|
||||
const standard = toSlice.slice(0, 1)
|
||||
// 2 and beyond are alts
|
||||
const alt = hmmm.slice(2)
|
||||
const alt = toSlice.slice(1)
|
||||
|
||||
return { standard, alt }
|
||||
}),
|
||||
|
||||
@@ -38,8 +38,7 @@
|
||||
<ng-container *ngIf="store$ | async as store; else loading">
|
||||
<marketplace-categories
|
||||
[categories]="store.categories"
|
||||
[category]="category"
|
||||
[disableCategories]="!!query"
|
||||
[category]="query ? '' : category"
|
||||
(categoryChange)="onCategoryChange($event)"
|
||||
></marketplace-categories>
|
||||
|
||||
@@ -48,22 +47,30 @@
|
||||
<ion-grid
|
||||
*ngIf="store.packages | filterPackages: query:category as filtered"
|
||||
>
|
||||
<ion-row *ngIf="localPkgs$ | async as localPkgs">
|
||||
<ion-col
|
||||
*ngFor="let pkg of filtered"
|
||||
sizeXs="12"
|
||||
sizeSm="12"
|
||||
sizeMd="6"
|
||||
>
|
||||
<marketplace-item [pkg]="pkg">
|
||||
<marketplace-status
|
||||
class="status"
|
||||
[version]="pkg.manifest.version"
|
||||
[localPkg]="localPkgs[pkg.manifest.id]"
|
||||
></marketplace-status>
|
||||
</marketplace-item>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ng-container *ngIf="filtered.length; else empty">
|
||||
<ion-row *ngIf="localPkgs$ | async as localPkgs">
|
||||
<ion-col
|
||||
*ngFor="let pkg of filtered"
|
||||
sizeXs="12"
|
||||
sizeSm="12"
|
||||
sizeMd="6"
|
||||
>
|
||||
<marketplace-item [pkg]="pkg">
|
||||
<marketplace-status
|
||||
class="status"
|
||||
[version]="pkg.manifest.version"
|
||||
[localPkg]="localPkgs[pkg.manifest.id]"
|
||||
></marketplace-status>
|
||||
</marketplace-item>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #empty>
|
||||
<div class="ion-padding">
|
||||
<h2>No results</h2>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ion-grid>
|
||||
</ng-container>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user