Rework PackageDataEntry for new strategy (#2573)

* rework PackageDataEntry for new strategy

* fix type error

* fix issues with manifest fetching

* mock installs working
This commit is contained in:
Matt Hill
2024-03-19 08:38:04 -06:00
committed by GitHub
parent c8be701f0e
commit cc38dab76f
64 changed files with 1759 additions and 2068 deletions

View File

@@ -4,6 +4,7 @@ import { map, take } from 'rxjs/operators'
import { DataModel, PackageState } from 'src/app/services/patch-db/data-model'
import { PatchDB } from 'patch-db-client'
import { firstValueFrom } from 'rxjs'
import { getManifest } from 'src/app/util/get-package-data'
@Component({
selector: 'backup-select',
@@ -32,13 +33,13 @@ export class BackupSelectPage {
map(pkgs => {
return Object.values(pkgs)
.map(pkg => {
const { id, title } = pkg.manifest
const { id, title } = getManifest(pkg)
return {
id,
title,
icon: pkg['static-files'].icon,
disabled: pkg.state !== PackageState.Installed,
checked: pkg.state === PackageState.Installed,
icon: pkg.icon,
disabled: pkg['state-info'].state !== PackageState.Installed,
checked: false,
}
})
.sort((a, b) =>