aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/users/shared/user.service.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/app/+admin/users/shared/user.service.ts b/client/src/app/+admin/users/shared/user.service.ts
index a0e2f666d..470beef08 100644
--- a/client/src/app/+admin/users/shared/user.service.ts
+++ b/client/src/app/+admin/users/shared/user.service.ts
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core'
4import { BytesPipe } from 'ngx-pipes' 4import { BytesPipe } from 'ngx-pipes'
5import { SortMeta } from 'primeng/components/common/sortmeta' 5import { SortMeta } from 'primeng/components/common/sortmeta'
6import { Observable } from 'rxjs' 6import { Observable } from 'rxjs'
7import { ResultList, UserCreate, UserUpdate, User } from '../../../../../../shared' 7import { ResultList, UserCreate, UserUpdate, User, UserRole } from '../../../../../../shared'
8import { environment } from '../../../../environments/environment' 8import { environment } from '../../../../environments/environment'
9import { RestExtractor, RestPagination, RestService } from '../../../shared' 9import { RestExtractor, RestPagination, RestService } from '../../../shared'
10import { I18n } from '@ngx-translate/i18n-polyfill' 10import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -81,7 +81,14 @@ export class UserService {
81 81
82 const videoQuotaUsed = this.bytesPipe.transform(user.videoQuotaUsed, 0) 82 const videoQuotaUsed = this.bytesPipe.transform(user.videoQuotaUsed, 0)
83 83
84 const roleLabels: { [ id in UserRole ]: string } = {
85 [UserRole.USER]: this.i18n('User'),
86 [UserRole.ADMINISTRATOR]: this.i18n('Administrator'),
87 [UserRole.MODERATOR]: this.i18n('Moderator')
88 }
89
84 return Object.assign(user, { 90 return Object.assign(user, {
91 roleLabel: roleLabels[user.role],
85 videoQuota, 92 videoQuota,
86 videoQuotaUsed 93 videoQuotaUsed
87 }) 94 })