Fix/controls (#2938)

* adjust copy to display package state

* use package id for service column in notifications table

* fixes

* less translations, fix notificaiton item, remove unnecessary conditional

* tidy up

* forgot spanish

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
Lucy
2025-05-09 16:53:46 -04:00
committed by GitHub
parent 8bd71ccd5e
commit 3849d0d1a9
7 changed files with 17 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
import { TuiButton } from '@taiga-ui/core'
import { CommonModule } from '@angular/common'
import { CommonModule, TitleCasePipe } from '@angular/common'
import {
ChangeDetectionStrategy,
Component,
@@ -35,10 +35,7 @@ import { ApiService } from 'src/app/services/api/embassy-api.service'
selector: 'marketplace-controls',
template: `
@if (localPkg) {
@if (
localPkg.stateInfo.state === 'installed' && (localPkg | toManifest);
as localManifest
) {
@if (localPkg | toManifest; as localManifest) {
@switch (localManifest.version | compareExver: pkg.version) {
@case (1) {
<button
@@ -78,7 +75,11 @@ import { ApiService } from 'src/app/services/api/embassy-api.service'
appearance="secondary-grayscale"
(click)="showService()"
>
{{ 'View Installed' | i18n }}
{{
('View' | i18n) +
' ' +
($any(localPkg.stateInfo.state | titlecase) | i18n)
}}
</button>
} @else {
<button
@@ -99,6 +100,7 @@ import { ApiService } from 'src/app/services/api/embassy-api.service'
TuiButton,
ToManifestPipe,
i18nPipe,
TitleCasePipe,
],
})
export class MarketplaceControlsComponent {

View File

@@ -34,8 +34,10 @@ import { i18nPipe } from '@start9labs/shared'
<a tuiLink [routerLink]="getLink(manifest.id)">
{{ manifest.title }}
</a>
} @else if (notificationItem.packageId) {
{{ notificationItem.packageId }}
} @else {
N/A
-
}
</td>
<td class="content">