aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/users
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-03-27 15:19:03 +0100
committerGitHub <noreply@github.com>2020-03-27 15:19:03 +0100
commit76314386aeafdd6849b7b70c517779d6b2013473 (patch)
treef0ba33e0f6e7b2eb99222a9eb5b85846cf309ab1 /client/src/app/shared/users
parent56d72521ec139dfc0aef083b8541a5b16d974ac1 (diff)
downloadPeerTube-76314386aeafdd6849b7b70c517779d6b2013473.tar.gz
PeerTube-76314386aeafdd6849b7b70c517779d6b2013473.tar.zst
PeerTube-76314386aeafdd6849b7b70c517779d6b2013473.zip
Add overview of a user's actions in user-edit (#2558)
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r--client/src/app/shared/users/user.model.ts10
-rw-r--r--client/src/app/shared/users/user.service.ts5
2 files changed, 13 insertions, 2 deletions
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index a37cae749..76c57d2fb 100644
--- a/client/src/app/shared/users/user.model.ts
+++ b/client/src/app/shared/users/user.model.ts
@@ -51,6 +51,11 @@ export class User implements UserServerModel {
51 videoQuotaDaily: number 51 videoQuotaDaily: number
52 videoQuotaUsed?: number 52 videoQuotaUsed?: number
53 videoQuotaUsedDaily?: number 53 videoQuotaUsedDaily?: number
54 videosCount?: number
55 videoAbusesCount?: number
56 videoAbusesAcceptedCount?: number
57 videoAbusesCreatedCount?: number
58 videoCommentsCount?: number
54 59
55 theme: string 60 theme: string
56 61
@@ -79,6 +84,11 @@ export class User implements UserServerModel {
79 this.videoQuotaDaily = hash.videoQuotaDaily 84 this.videoQuotaDaily = hash.videoQuotaDaily
80 this.videoQuotaUsed = hash.videoQuotaUsed 85 this.videoQuotaUsed = hash.videoQuotaUsed
81 this.videoQuotaUsedDaily = hash.videoQuotaUsedDaily 86 this.videoQuotaUsedDaily = hash.videoQuotaUsedDaily
87 this.videosCount = hash.videosCount
88 this.videoAbusesCount = hash.videoAbusesCount
89 this.videoAbusesAcceptedCount = hash.videoAbusesAcceptedCount
90 this.videoAbusesCreatedCount = hash.videoAbusesCreatedCount
91 this.videoCommentsCount = hash.videoCommentsCount
82 92
83 this.nsfwPolicy = hash.nsfwPolicy 93 this.nsfwPolicy = hash.nsfwPolicy
84 this.webTorrentEnabled = hash.webTorrentEnabled 94 this.webTorrentEnabled = hash.webTorrentEnabled
diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts
index a79343646..5442a8453 100644
--- a/client/src/app/shared/users/user.service.ts
+++ b/client/src/app/shared/users/user.service.ts
@@ -234,8 +234,9 @@ export class UserService {
234 return this.userCache[userId] 234 return this.userCache[userId]
235 } 235 }
236 236
237 getUser (userId: number) { 237 getUser (userId: number, withStats = false) {
238 return this.authHttp.get<UserServerModel>(UserService.BASE_USERS_URL + userId) 238 const params = new HttpParams().append('withStats', withStats + '')
239 return this.authHttp.get<UserServerModel>(UserService.BASE_USERS_URL + userId, { params })
239 .pipe(catchError(err => this.restExtractor.handleError(err))) 240 .pipe(catchError(err => this.restExtractor.handleError(err)))
240 } 241 }
241 242