mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
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:
@@ -143,7 +143,7 @@ export default {
|
||||
140: 'Diagnose-Logs des Tor-Daemons unter StartOS',
|
||||
141: 'Downgrade',
|
||||
142: 'Neu installieren',
|
||||
143: 'Installierte anzeigen',
|
||||
143: 'Installierte',
|
||||
144: 'Wechseln',
|
||||
145: 'Installieren',
|
||||
146: 'Installation wird gestartet',
|
||||
|
||||
@@ -142,7 +142,7 @@ export const ENGLISH = {
|
||||
'Diagnostic logs for the Tor daemon on StartOS': 140,
|
||||
'Downgrade': 141,
|
||||
'Reinstall': 142,
|
||||
'View Installed': 143,
|
||||
'Installed': 143,
|
||||
'Switch': 144,
|
||||
'Install': 145,
|
||||
'Beginning install': 146,
|
||||
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
140: 'Registros de diagnóstico del servicio Tor en StartOS',
|
||||
141: 'Retroceder versión',
|
||||
142: 'Reinstalar',
|
||||
143: 'Ver instalados',
|
||||
143: 'Instalados',
|
||||
144: 'Cambiar',
|
||||
145: 'Instalar',
|
||||
146: 'Iniciando instalación',
|
||||
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
140: 'Logi diagnostyczne usługi Tor w StartOS',
|
||||
141: 'Przywróć starszą wersję',
|
||||
142: 'Zainstaluj ponownie',
|
||||
143: 'Zobacz zainstalowane',
|
||||
143: 'Zainstalowane',
|
||||
144: 'Przełącz',
|
||||
145: 'Zainstaluj',
|
||||
146: 'Rozpoczynanie instalacji',
|
||||
|
||||
@@ -12,8 +12,8 @@ export class i18nPipe implements PipeTransform {
|
||||
private readonly i18n = inject(I18N)
|
||||
|
||||
// @TODO uncomment to make sure translations are present
|
||||
transform(englishKey: string | null | undefined): string | undefined {
|
||||
// transform(englishKey: i18nKey | null | undefined): string | undefined {
|
||||
// transform(englishKey: string | null | undefined): string | undefined {
|
||||
transform(englishKey: i18nKey | null | undefined): string | undefined {
|
||||
return englishKey
|
||||
? this.i18n()?.[ENGLISH[englishKey as i18nKey]] || englishKey
|
||||
: undefined
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user