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:
Lucy
2025-04-29 16:12:21 -04:00
committed by GitHub
parent 2adf34fbaf
commit 5c473eb9cc
63 changed files with 733 additions and 470 deletions

View File

@@ -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

View File

@@ -60,7 +60,6 @@ header {
}
store-icon {
border-radius: 100%;
height: 64px;
}

View File

@@ -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

View File

@@ -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 }
}

View File

@@ -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
}
}