mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
update marketplace url to reflect build version (#2914)
* update marketplace url to reflect build version * adjust marketplace config * use helper function to compare urls * rework some registry stuff * #2900, #2899, and other registry changes * alpha.1 * trailing / * add startosRegistry * fix migration --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Aiden McClelland <me@drbonez.dev> Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
[style.border-radius.%]="!registry ? 100 : null"
|
||||
size="60px"
|
||||
[url]="registry?.url || ''"
|
||||
[marketplace]="iconConfig"
|
||||
/>
|
||||
<h1 [tuiSkeleton]="!registry">
|
||||
{{ registry?.info?.name || 'Unnamed Registry' }}
|
||||
@@ -27,7 +26,6 @@
|
||||
[style.height.px]="42"
|
||||
[style.border-radius.%]="100"
|
||||
[url]="registry?.url || ''"
|
||||
[marketplace]="iconConfig"
|
||||
[tuiSkeleton]="!registry"
|
||||
/>
|
||||
<tui-drawer
|
||||
|
||||
@@ -60,7 +60,6 @@ header {
|
||||
}
|
||||
|
||||
store-icon {
|
||||
border-radius: 100%;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
OnDestroy,
|
||||
signal,
|
||||
} from '@angular/core'
|
||||
import { MarketplaceConfig } from '@start9labs/shared'
|
||||
import { Subject, takeUntil } from 'rxjs'
|
||||
import { AbstractCategoryService } from '../../services/category.service'
|
||||
import { StoreDataWithUrl } from '../../types'
|
||||
@@ -18,9 +17,6 @@ import { StoreDataWithUrl } from '../../types'
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class MenuComponent implements OnDestroy {
|
||||
@Input({ required: true })
|
||||
iconConfig!: MarketplaceConfig
|
||||
|
||||
@Input({ required: true })
|
||||
registry!: StoreDataWithUrl | null
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
||||
import { TuiIcon, TuiTitle } from '@taiga-ui/core'
|
||||
import { StoreIconComponentModule } from './store-icon/store-icon.component.module'
|
||||
import { MarketplaceConfig } from '@start9labs/shared'
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: '[registry]',
|
||||
template: `
|
||||
<store-icon [url]="registry.url" [marketplace]="marketplace" size="40px" />
|
||||
<store-icon [url]="registry.url" size="40px" />
|
||||
<div tuiTitle>
|
||||
{{ registry.name }}
|
||||
<div tuiSubtitle>{{ registry.url }}</div>
|
||||
@@ -24,8 +23,5 @@ import { MarketplaceConfig } from '@start9labs/shared'
|
||||
})
|
||||
export class MarketplaceRegistryComponent {
|
||||
@Input()
|
||||
marketplace!: MarketplaceConfig
|
||||
|
||||
@Input()
|
||||
registry!: { url: string; selected: boolean; name?: string }
|
||||
registry!: { url: string; selected: boolean; name: string }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
||||
import { MarketplaceConfig, sameUrl } from '@start9labs/shared'
|
||||
import { knownRegistries, sameUrl } from '@start9labs/shared'
|
||||
|
||||
@Component({
|
||||
selector: 'store-icon',
|
||||
@@ -9,13 +9,13 @@ import { MarketplaceConfig, sameUrl } from '@start9labs/shared'
|
||||
[style.border-radius.%]="100"
|
||||
[style.max-width]="size || '100%'"
|
||||
[src]="icon"
|
||||
alt="Marketplace Icon"
|
||||
alt="Registry Icon"
|
||||
/>
|
||||
<ng-template #noIcon>
|
||||
<img
|
||||
[style.max-width]="size || '100%'"
|
||||
src="assets/img/storefront-outline.png"
|
||||
alt="Marketplace Icon"
|
||||
alt="Registry Icon"
|
||||
/>
|
||||
</ng-template>
|
||||
`,
|
||||
@@ -27,17 +27,20 @@ export class StoreIconComponent {
|
||||
url = ''
|
||||
@Input()
|
||||
size?: string
|
||||
@Input({ required: true })
|
||||
marketplace!: MarketplaceConfig
|
||||
|
||||
get icon() {
|
||||
const { start9, community } = this.marketplace
|
||||
const { start9Alpha, start9Beta, start9, community } = knownRegistries
|
||||
|
||||
if (sameUrl(this.url, start9)) {
|
||||
if (sameUrl(this.url, start9Alpha)) {
|
||||
return 'assets/img/icon_alpha.png'
|
||||
} else if (sameUrl(this.url, start9Beta)) {
|
||||
return 'assets/img/icon_beta.png'
|
||||
} else if (sameUrl(this.url, start9)) {
|
||||
return 'assets/img/icon_transparent.png'
|
||||
} else if (sameUrl(this.url, community)) {
|
||||
return 'assets/img/community-store.png'
|
||||
return 'assets/img/community-icon.png'
|
||||
} else {
|
||||
return 'assets/img/storefront-outline.png'
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@ export class CategoriesComponent {
|
||||
readonly categoryChange = new EventEmitter<string>()
|
||||
|
||||
readonly fallback: Record<string, T.Category> = {
|
||||
a: { name: '', description: { short: 'a', long: 'a' } },
|
||||
b: { name: '', description: { short: 'a', long: 'a' } },
|
||||
c: { name: '', description: { short: 'a', long: 'a' } },
|
||||
d: { name: '', description: { short: 'a', long: 'a' } },
|
||||
e: { name: '', description: { short: 'a', long: 'a' } },
|
||||
a: { name: '' },
|
||||
b: { name: '' },
|
||||
c: { name: '' },
|
||||
d: { name: '' },
|
||||
e: { name: '' },
|
||||
}
|
||||
|
||||
switchCategory(category: string): void {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { T } from '@start9labs/start-sdk'
|
||||
|
||||
export type GetPackageReq = {
|
||||
id: string
|
||||
version: string | null
|
||||
targetVersion: string | null
|
||||
otherVersions: 'short'
|
||||
}
|
||||
export type GetPackageRes = T.GetPackageResponse & {
|
||||
@@ -12,7 +12,7 @@ export type GetPackageRes = T.GetPackageResponse & {
|
||||
|
||||
export type GetPackagesReq = {
|
||||
id: null
|
||||
version: null
|
||||
targetVersion: null
|
||||
otherVersions: 'short'
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export type GetPackagesRes = {
|
||||
|
||||
export type StoreIdentity = {
|
||||
url: string
|
||||
name?: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export type Marketplace = Record<string, StoreData | null>
|
||||
|
||||
Reference in New Issue
Block a user