mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
move registry component to shared marketplace lib
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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" />
|
||||
<div tuiTitle>
|
||||
{{ registry.name }}
|
||||
<div tuiSubtitle>{{ registry.url }}</div>
|
||||
</div>
|
||||
@if (registry.selected) {
|
||||
<tui-icon icon="@tui.check" [style.color]="'var(--tui-text-positive)'" />
|
||||
} @else {
|
||||
<ng-content />
|
||||
}
|
||||
`,
|
||||
styles: [':host { border-radius: 0.25rem; width: stretch; }'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
imports: [StoreIconComponentModule, TuiIcon, TuiTitle],
|
||||
})
|
||||
export class MarketplaceRegistryComponent {
|
||||
@Input()
|
||||
marketplace!: MarketplaceConfig
|
||||
|
||||
@Input()
|
||||
registry!: { url: string; selected: boolean; name?: string }
|
||||
}
|
||||
@@ -27,6 +27,7 @@ export * from './components/store-icon/store-icon.component.module'
|
||||
export * from './components/store-icon/store-icon.component'
|
||||
export * from './components/menu/menu.component.module'
|
||||
export * from './components/menu/menu.component'
|
||||
export * from './components/registry.component'
|
||||
|
||||
export * from './services/marketplace.service'
|
||||
export * from './services/category.service'
|
||||
|
||||
Reference in New Issue
Block a user