Browse Source

Task/improve labels of client of last request (#8149)

* Improve labels

* Update changelog
pull/8157/head^2
Thomas Kaul 2 days ago
committed by GitHub
parent
commit
f9f048905d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 2
      apps/client/src/app/components/admin-users/admin-users.component.ts
  3. 2
      apps/client/src/app/components/admin-users/admin-users.html
  4. 2
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts
  5. 4
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html
  6. 9
      libs/ui/src/lib/i18n.ts

4
CHANGELOG.md

@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support to paste a file in the import activities dialog
### Changed
- Improved the labels of the client of the last request in the users section of the admin control panel
### Fixed
- Fixed the link of the _Manage Asset Profile_ button in the holding detail dialog before the holding has loaded

2
apps/client/src/app/components/admin-users/admin-users.component.ts

@ -22,6 +22,7 @@ import {
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { internalRoutes } from '@ghostfolio/common/routes/routes';
import { RequestClient } from '@ghostfolio/prisma/enums';
import { translate } from '@ghostfolio/ui/i18n';
import { NotificationService } from '@ghostfolio/ui/notifications';
import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator';
import { AdminService, DataService } from '@ghostfolio/ui/services';
@ -114,6 +115,7 @@ export class GfAdminUsersComponent implements OnInit {
internalRoutes.adminControl.subRoutes.users.routerLink;
protected totalItems = 0;
protected readonly translate = translate;
protected user: User;
private readonly deviceType = computed(

2
apps/client/src/app/components/admin-users/admin-users.html

@ -197,7 +197,7 @@
<ion-icon
class="mr-1"
[name]="requestClientIcons[element.lastRequestClient]"
[title]="element.lastRequestClient"
[title]="translate(element.lastRequestClient)"
/>
} @else {
<ion-icon class="hidden mr-1" />

2
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.component.ts

@ -6,6 +6,7 @@ import {
} from '@ghostfolio/common/helper';
import { AdminUserResponse } from '@ghostfolio/common/interfaces';
import type { Subscription } from '@ghostfolio/prisma/browser';
import { translate } from '@ghostfolio/ui/i18n';
import { AdminService, DataService } from '@ghostfolio/ui/services';
import { GfValueComponent } from '@ghostfolio/ui/value';
@ -70,6 +71,7 @@ export class GfUserDetailDialogComponent implements OnInit {
'expiresAt'
];
protected readonly translate = translate;
protected user: AdminUserResponse;
protected readonly data = inject<UserDetailDialogParams>(MAT_DIALOG_DATA);

4
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html

@ -174,7 +174,9 @@
i18n
size="medium"
[isLoading]="isLoading"
[value]="user?.lastRequestClient || '-'"
[value]="
user?.lastRequestClient ? translate(user.lastRequestClient) : '-'
"
>Client</gf-value
>
</div>

9
libs/ui/src/lib/i18n.ts

@ -3,6 +3,7 @@ import type {
ProductPlatform,
SectorName
} from '@ghostfolio/common/types';
import { RequestClient } from '@ghostfolio/prisma/enums';
import '@angular/localize/init';
@ -121,9 +122,15 @@ const locales = {
LINUX: 'Linux',
MACOS: 'macOS',
WEB: $localize`Web`,
WINDOWS: 'Windows'
WINDOWS: 'Windows',
// Request clients (WEB is defined above under Product platforms)
API: 'API',
MCP: 'MCP',
SELF_HOSTING: $localize`Self-Hosting`
} satisfies Record<ProductCategory, string> &
Record<ProductPlatform, string> &
Record<RequestClient, string> &
Record<SectorName, string> &
Record<string, string>;

Loading…
Cancel
Save