Hard code registry icons (#1951)

* component for store icons

* order registries and abstract registry urls

* use helper functionm
This commit is contained in:
Matt Hill
2022-11-17 12:23:27 -07:00
committed by Aiden McClelland
parent 4f9fe7245b
commit eec8c41e20
26 changed files with 223 additions and 149 deletions

View File

@@ -1,16 +1,10 @@
import { Observable } from 'rxjs'
import {
MarketplacePkg,
Marketplace,
StoreURL,
StoreData,
StoreIdentifier,
} from '../types'
import { MarketplacePkg, Marketplace, StoreData, StoreIdentity } from '../types'
export abstract class AbstractMarketplaceService {
abstract getKnownHosts$(): Observable<Record<StoreURL, StoreIdentifier>>
abstract getKnownHosts$(): Observable<StoreIdentity[]>
abstract getSelectedHost$(): Observable<StoreIdentifier & { url: string }>
abstract getSelectedHost$(): Observable<StoreIdentity>
abstract getMarketplace$(): Observable<Marketplace>

View File

@@ -2,13 +2,11 @@ import { Url } from '@start9labs/shared'
export type StoreURL = string
export type StoreName = string
export type StoreIcon = string // base64
export interface StoreIdentifier {
export interface StoreIdentity {
url: StoreURL
name?: StoreName
icon?: StoreIcon // base64
}
export type Marketplace = Record<StoreURL, StoreData | null>
export interface StoreData {
@@ -18,7 +16,6 @@ export interface StoreData {
export interface StoreInfo {
name: StoreName
icon?: StoreIcon
categories: string[]
}