mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
fix: fix dynamic status and instructions modal (#1382)
This commit is contained in:
@@ -5,6 +5,8 @@ import { AlertController, ModalController, NavController } from '@ionic/angular'
|
||||
import { MarkdownComponent } from '@start9labs/shared'
|
||||
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
|
||||
import { ModalService } from 'src/app/services/modal.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { from } from 'rxjs'
|
||||
|
||||
export interface Button {
|
||||
title: string
|
||||
@@ -24,6 +26,7 @@ export class ToButtonsPipe implements PipeTransform {
|
||||
private readonly navCtrl: NavController,
|
||||
private readonly modalCtrl: ModalController,
|
||||
private readonly modalService: ModalService,
|
||||
private readonly apiService: ApiService,
|
||||
) {}
|
||||
|
||||
transform(pkg: PackageDataEntry): Button[] {
|
||||
@@ -103,7 +106,9 @@ export class ToButtonsPipe implements PipeTransform {
|
||||
const modal = await this.modalCtrl.create({
|
||||
componentProps: {
|
||||
title: 'Instructions',
|
||||
contentUrl: pkg['static-files']['instructions'],
|
||||
content: from(
|
||||
this.apiService.getStatic(pkg['static-files']['instructions']),
|
||||
),
|
||||
},
|
||||
component: MarkdownComponent,
|
||||
})
|
||||
|
||||
@@ -21,6 +21,7 @@ export class MarketplaceListPage {
|
||||
).pipe(
|
||||
filter(data => exists(data) && !isEmptyObject(data)),
|
||||
tap(pkgs => Object.values(pkgs).forEach(spreadProgress)),
|
||||
map(pkgs => ({ ...pkgs })),
|
||||
startWith({}),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user