From 98d971feba7d5ac60f913dcdd6cc557025968f2c Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Wed, 13 Nov 2019 15:16:21 +0100 Subject: [PATCH] feat(admin-ui): Truncate display of role permissions if too long --- .../role-list/role-list.component.html | 17 +++++++++++++++-- .../components/role-list/role-list.component.ts | 11 +++++++++++ packages/admin-ui/src/i18n-messages/en.json | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/admin-ui/src/app/settings/components/role-list/role-list.component.html b/packages/admin-ui/src/app/settings/components/role-list/role-list.component.html index 37260c7321..2d367bc38d 100644 --- a/packages/admin-ui/src/app/settings/components/role-list/role-list.component.html +++ b/packages/admin-ui/src/app/settings/components/role-list/role-list.component.html @@ -28,13 +28,26 @@ - {{ channel.code }} + {{ channel.code | channelCodeToLabel | translate }} - {{ permission }} + {{ permission }} + {{ 'settings.default-role-label' | translate }} diff --git a/packages/admin-ui/src/app/settings/components/role-list/role-list.component.ts b/packages/admin-ui/src/app/settings/components/role-list/role-list.component.ts index 534438555f..ad8ef08dc1 100644 --- a/packages/admin-ui/src/app/settings/components/role-list/role-list.component.ts +++ b/packages/admin-ui/src/app/settings/components/role-list/role-list.component.ts @@ -13,6 +13,9 @@ import { DataService } from '../../../data/providers/data.service'; changeDetection: ChangeDetectionStrategy.OnPush, }) export class RoleListComponent extends BaseListComponent { + readonly initialLimit = 3; + displayLimit: { [id: string]: number } = {}; + constructor(private dataService: DataService, router: Router, route: ActivatedRoute) { super(router, route); super.setQueryFn( @@ -21,6 +24,14 @@ export class RoleListComponent extends BaseListComponent