From 9b01cfc788a6ed525d72620da9f9e607b8d6396e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Wed, 1 Jul 2020 12:09:23 +0200 Subject: distinct style for rows of banned users in listing, saving space --- client/src/app/+admin/users/user-list/user-list.component.html | 9 ++++++--- client/src/app/+admin/users/user-list/user-list.component.scss | 4 ++-- client/src/app/+admin/users/user-list/user-list.component.ts | 6 ++++++ 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'client/src') diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/users/user-list/user-list.component.html index e0022d2ba..ea5aca024 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.html +++ b/client/src/app/+admin/users/user-list/user-list.component.html @@ -14,6 +14,7 @@ [showCurrentPageReport]="true" i18n-currentPageReportTemplate currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} users" (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" + [rowStyleClass]="getRowClasses" >
@@ -48,7 +49,7 @@ Role Auth plugin Created - + @@ -75,11 +76,13 @@ alt="Avatar" >
- {{ user.account.displayName }} + + + {{ user.account.displayName }} + {{ user.username }}
- (banned) diff --git a/client/src/app/+admin/users/user-list/user-list.component.scss b/client/src/app/+admin/users/user-list/user-list.component.scss index 99b22aaea..697b2c11b 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.scss +++ b/client/src/app/+admin/users/user-list/user-list.component.scss @@ -5,8 +5,8 @@ @include create-button; } -tr.banned { - color: red; +tr.banned > td { + background-color: lighten($color: $red, $amount: 40) !important; } .banned-info { diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts index 8f01c7d51..e167d1432 100644 --- a/client/src/app/+admin/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/users/user-list/user-list.component.ts @@ -87,6 +87,12 @@ export class UserListComponent extends RestTable implements OnInit { return 'UserListComponent' } + getRowClasses (rowData: User) { + return { + banned: rowData.blocked + } + } + openBanUserModal (users: User[]) { for (const user of users) { if (user.username === 'root') { -- cgit v1.2.3