diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-27 15:19:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 15:19:03 +0100 |
commit | 76314386aeafdd6849b7b70c517779d6b2013473 (patch) | |
tree | f0ba33e0f6e7b2eb99222a9eb5b85846cf309ab1 /client/src/app/shared | |
parent | 56d72521ec139dfc0aef083b8541a5b16d974ac1 (diff) | |
download | PeerTube-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')
-rw-r--r-- | client/src/app/shared/shared.module.ts | 7 | ||||
-rw-r--r-- | client/src/app/shared/users/user.model.ts | 10 | ||||
-rw-r--r-- | client/src/app/shared/users/user.service.ts | 5 | ||||
-rw-r--r-- | client/src/app/shared/video/modals/video-report.component.html | 3 |
4 files changed, 19 insertions, 6 deletions
diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts index 75aa30dab..b89f0a8d1 100644 --- a/client/src/app/shared/shared.module.ts +++ b/client/src/app/shared/shared.module.ts | |||
@@ -106,6 +106,7 @@ import { InputSwitchModule } from 'primeng/inputswitch' | |||
106 | 106 | ||
107 | import { MyAccountVideoSettingsComponent } from '@app/+my-account/my-account-settings/my-account-video-settings' | 107 | import { MyAccountVideoSettingsComponent } from '@app/+my-account/my-account-settings/my-account-video-settings' |
108 | import { MyAccountInterfaceSettingsComponent } from '@app/+my-account/my-account-settings/my-account-interface' | 108 | import { MyAccountInterfaceSettingsComponent } from '@app/+my-account/my-account-settings/my-account-interface' |
109 | import { ActorAvatarInfoComponent } from '@app/+my-account/shared/actor-avatar-info.component' | ||
109 | 110 | ||
110 | @NgModule({ | 111 | @NgModule({ |
111 | imports: [ | 112 | imports: [ |
@@ -189,7 +190,8 @@ import { MyAccountInterfaceSettingsComponent } from '@app/+my-account/my-account | |||
189 | PreviewUploadComponent, | 190 | PreviewUploadComponent, |
190 | 191 | ||
191 | MyAccountVideoSettingsComponent, | 192 | MyAccountVideoSettingsComponent, |
192 | MyAccountInterfaceSettingsComponent | 193 | MyAccountInterfaceSettingsComponent, |
194 | ActorAvatarInfoComponent | ||
193 | ], | 195 | ], |
194 | 196 | ||
195 | exports: [ | 197 | exports: [ |
@@ -270,7 +272,8 @@ import { MyAccountInterfaceSettingsComponent } from '@app/+my-account/my-account | |||
270 | VideoDurationPipe, | 272 | VideoDurationPipe, |
271 | 273 | ||
272 | MyAccountVideoSettingsComponent, | 274 | MyAccountVideoSettingsComponent, |
273 | MyAccountInterfaceSettingsComponent | 275 | MyAccountInterfaceSettingsComponent, |
276 | ActorAvatarInfoComponent | ||
274 | ], | 277 | ], |
275 | 278 | ||
276 | providers: [ | 279 | providers: [ |
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 | ||
diff --git a/client/src/app/shared/video/modals/video-report.component.html b/client/src/app/shared/video/modals/video-report.component.html index b9434da26..cc1d361b3 100644 --- a/client/src/app/shared/video/modals/video-report.component.html +++ b/client/src/app/shared/video/modals/video-report.component.html | |||
@@ -7,8 +7,7 @@ | |||
7 | <div class="modal-body"> | 7 | <div class="modal-body"> |
8 | 8 | ||
9 | <div i18n class="information"> | 9 | <div i18n class="information"> |
10 | Your report will be sent to moderators of {{ currentHost }}. | 10 | Your report will be sent to moderators of {{ currentHost }}<ng-container *ngIf="isRemoteVideo()"> and will be forwarded to the video origin ({{ originHost }}) too</ng-container>. |
11 | <ng-container *ngIf="isRemoteVideo()"> It will be forwarded to origin instance {{ originHost }} too.</ng-container> | ||
12 | </div> | 11 | </div> |
13 | 12 | ||
14 | <form novalidate [formGroup]="form" (ngSubmit)="report()"> | 13 | <form novalidate [formGroup]="form" (ngSubmit)="report()"> |