mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
move registry component to shared marketplace lib
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
inject,
|
||||
Input,
|
||||
} from '@angular/core'
|
||||
import { StoreIconComponentModule } from '@start9labs/marketplace'
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
||||
import { TuiIcon, TuiTitle } from '@taiga-ui/core'
|
||||
import { ConfigService } from 'src/app/services/config.service'
|
||||
import { StoreIconComponentModule } from './store-icon/store-icon.component.module'
|
||||
import { MarketplaceConfig } from '@start9labs/shared'
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
@@ -28,7 +23,8 @@ import { ConfigService } from 'src/app/services/config.service'
|
||||
imports: [StoreIconComponentModule, TuiIcon, TuiTitle],
|
||||
})
|
||||
export class MarketplaceRegistryComponent {
|
||||
readonly marketplace = inject(ConfigService).marketplace
|
||||
@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'
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
import {
|
||||
AbstractMarketplaceService,
|
||||
StoreIconComponentModule,
|
||||
MarketplaceRegistryComponent,
|
||||
} from '@start9labs/marketplace'
|
||||
import { TuiDialogService, TuiIcon, TuiTitle, TuiButton } from '@taiga-ui/core'
|
||||
import { PolymorpheusComponent } from '@taiga-ui/polymorpheus'
|
||||
@@ -21,8 +22,8 @@ import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { DataModel, UIStore } from 'src/app/services/patch-db/data-model'
|
||||
import { MarketplaceService } from 'src/app/services/marketplace.service'
|
||||
import { FormDialogService } from 'src/app/services/form-dialog.service'
|
||||
import { MarketplaceRegistryComponent } from '../components/registry.component'
|
||||
import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry'
|
||||
import { ConfigService } from 'src/app/services/config.service'
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
@@ -33,6 +34,7 @@ import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry'
|
||||
<button
|
||||
tuiCell
|
||||
[disabled]="registry.selected"
|
||||
[marketplace]="marketplaceConfig"
|
||||
[registry]="registry"
|
||||
(click)="connect(registry.url)"
|
||||
></button>
|
||||
@@ -47,6 +49,7 @@ import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry'
|
||||
<button
|
||||
tuiCell
|
||||
[registry]="registry"
|
||||
[marketplace]="marketplaceConfig"
|
||||
(click)="connect(registry.url)"
|
||||
></button>
|
||||
<button
|
||||
@@ -95,6 +98,7 @@ export class MarketplaceRegistryModal {
|
||||
'marketplace',
|
||||
'knownHosts',
|
||||
)
|
||||
readonly marketplaceConfig = inject(ConfigService).marketplace
|
||||
|
||||
readonly stores$ = combineLatest([
|
||||
this.marketplace.getKnownHosts$(),
|
||||
|
||||
Reference in New Issue
Block a user