fix registry connect styles and remove view complete listing link

This commit is contained in:
Lucy Cifferello
2024-04-05 16:56:06 -04:00
parent cd933ce6e4
commit 35fe06a892
5 changed files with 18 additions and 36 deletions

View File

@@ -75,7 +75,6 @@
rel="noreferrer"
href="https://docs.start9.com/0.3.5.x/developer-docs/"
>
<!-- @TODO need rocket icon -->
<span>Package a service</span>
<tui-icon
tuiAppearance="icon"
@@ -109,7 +108,6 @@
rel="noreferrer"
href="https://docs.start9.com/0.3.5.x/developer-docs/"
>
<!-- @TODO need rocket icon -->
<span>Package a service</span>
<tui-icon
tuiAppearance="icon"

View File

@@ -27,7 +27,5 @@ export class SearchComponent {
onModelChange(query: string) {
this.query = query
this.queryChange.emit(query)
// @TODO fix in brochure
// this.router.navigate(['../'])
}
}

View File

@@ -4,6 +4,5 @@
<p>
{{ pkg.manifest.description.long }}
</p>
<ng-content></ng-content>
</div>
</div>

View File

@@ -45,19 +45,7 @@ import { Router } from '@angular/router'
<ng-content select="[slot=controls]" />
</marketplace-package-hero>
<div class="inner-container">
<marketplace-about [pkg]="pkg">
@if (hostInfo$ | async; as info) {
<a
[href]="constructDetailLink(info, pkg.manifest.id)"
rel="noreferrer"
target="_blank"
class="listing"
>
View complete listing
<tui-icon icon="tuiIconExternalLink" />
</a>
}
</marketplace-about>
<marketplace-about [pkg]="pkg" />
@if (!(pkg.manifest.dependencies | empty)) {
<marketplace-dependencies
[pkg]="pkg"
@@ -121,7 +109,6 @@ import { Router } from '@angular/router'
margin-top: 5rem;
@media (min-width: 768px) {
// min-width: 30rem;
margin-top: 0;
}
}
@@ -192,7 +179,6 @@ export class MarketplacePreviewComponent {
this.router.routerState.snapshot.root.queryParamMap.get('url') || undefined
readonly loadVersion$ = new BehaviorSubject<string>('*')
readonly hostInfo$ = this.marketplaceService.getSelectedHost$()
readonly pkg$ = this.loadVersion$.pipe(
switchMap(version =>
this.marketplaceService.getPackage$(this.pkgId, version, this.url),
@@ -212,11 +198,6 @@ export class MarketplacePreviewComponent {
this.router.navigate([], { queryParams: { id } })
}
constructDetailLink(info: StoreIdentity, id: string) {
const domain = new URL(info.url).hostname
return `https://marketplace.start9.com/${id}?api=${domain}&name=${info.name}`
}
presentAlertVersions(
pkg: MarketplacePkg,
version: TemplateRef<TuiDialogContext>,

View File

@@ -43,12 +43,17 @@ import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry'
></button>
}
<h3 class="g-title">Custom Registries</h3>
<button tuiCell (click)="add()">
<tui-icon icon="tuiIconPlus" [style.margin-inline.rem]="0.5" />
<button tuiCell (click)="add()" [style.width]="'-webkit-fill-available'">
<tui-icon icon="tuiIconPlus" [style.margin-inline.rem]="'0.5'" />
<div tuiTitle>Add custom registry</div>
</button>
@for (registry of stores.alt; track $index) {
<div tuiCell [registry]="registry">
<div class="connect-container">
<button
tuiCell
[registry]="registry"
(click)="connect(registry.url)"
></button>
<button
tuiIconButton
appearance="icon"
@@ -57,18 +62,19 @@ import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry'
>
Delete
</button>
<button
tuiIconButton
appearance="icon"
iconLeft="tuiIconLogIn"
(click)="connect(registry.url)"
>
Connect
</button>
</div>
}
}
`,
styles: [
`
.connect-container {
display: flex;
flex-direction: row;
align-items: center;
}
`,
],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
CommonModule,