aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/users/user-notification.model.ts6
-rw-r--r--client/src/app/shared/users/user-notifications.component.html8
-rw-r--r--client/src/app/shared/video-block/video-block.service.ts12
-rw-r--r--client/src/app/shared/video/video.model.ts4
4 files changed, 15 insertions, 15 deletions
diff --git a/client/src/app/shared/users/user-notification.model.ts b/client/src/app/shared/users/user-notification.model.ts
index bc1861c64..7b8368d87 100644
--- a/client/src/app/shared/users/user-notification.model.ts
+++ b/client/src/app/shared/users/user-notification.model.ts
@@ -96,7 +96,7 @@ export class UserNotification implements UserNotificationServer {
96 this.videoUrl = this.buildVideoUrl(this.video) 96 this.videoUrl = this.buildVideoUrl(this.video)
97 break 97 break
98 98
99 case UserNotificationType.UNBLOCK_ON_MY_VIDEO: 99 case UserNotificationType.UNBLACKLIST_ON_MY_VIDEO:
100 this.videoUrl = this.buildVideoUrl(this.video) 100 this.videoUrl = this.buildVideoUrl(this.video)
101 break 101 break
102 102
@@ -112,7 +112,7 @@ export class UserNotification implements UserNotificationServer {
112 this.videoUrl = this.buildVideoUrl(this.videoAbuse.video) 112 this.videoUrl = this.buildVideoUrl(this.videoAbuse.video)
113 break 113 break
114 114
115 case UserNotificationType.VIDEO_AUTO_BLOCK_FOR_MODERATORS: 115 case UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS:
116 this.videoAutoBlacklistUrl = '/admin/moderation/video-auto-blacklist/list' 116 this.videoAutoBlacklistUrl = '/admin/moderation/video-auto-blacklist/list'
117 // Backward compatibility where we did not assign videoBlacklist to this type of notification before 117 // Backward compatibility where we did not assign videoBlacklist to this type of notification before
118 if (!this.videoBlacklist) this.videoBlacklist = { id: null, video: this.video } 118 if (!this.videoBlacklist) this.videoBlacklist = { id: null, video: this.video }
@@ -120,7 +120,7 @@ export class UserNotification implements UserNotificationServer {
120 this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) 120 this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video)
121 break 121 break
122 122
123 case UserNotificationType.BLOCK_ON_MY_VIDEO: 123 case UserNotificationType.BLACKLIST_ON_MY_VIDEO:
124 this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video) 124 this.videoUrl = this.buildVideoUrl(this.videoBlacklist.video)
125 break 125 break
126 126
diff --git a/client/src/app/shared/users/user-notifications.component.html b/client/src/app/shared/users/user-notifications.component.html
index 5a102995a..c6037f0a9 100644
--- a/client/src/app/shared/users/user-notifications.component.html
+++ b/client/src/app/shared/users/user-notifications.component.html
@@ -26,7 +26,7 @@
26 </ng-template> 26 </ng-template>
27 </ng-container> 27 </ng-container>
28 28
29 <ng-container *ngSwitchCase="UserNotificationType.UNBLOCK_ON_MY_VIDEO"> 29 <ng-container *ngSwitchCase="UserNotificationType.UNBLACKLIST_ON_MY_VIDEO">
30 <my-global-icon iconName="undo"></my-global-icon> 30 <my-global-icon iconName="undo"></my-global-icon>
31 31
32 <div class="message" i18n> 32 <div class="message" i18n>
@@ -34,7 +34,7 @@
34 </div> 34 </div>
35 </ng-container> 35 </ng-container>
36 36
37 <ng-container *ngSwitchCase="UserNotificationType.BLOCK_ON_MY_VIDEO"> 37 <ng-container *ngSwitchCase="UserNotificationType.BLACKLIST_ON_MY_VIDEO">
38 <my-global-icon iconName="no"></my-global-icon> 38 <my-global-icon iconName="no"></my-global-icon>
39 39
40 <div class="message" i18n> 40 <div class="message" i18n>
@@ -50,11 +50,11 @@
50 </div> 50 </div>
51 </ng-container> 51 </ng-container>
52 52
53 <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLOCK_FOR_MODERATORS"> 53 <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS">
54 <my-global-icon iconName="no"></my-global-icon> 54 <my-global-icon iconName="no"></my-global-icon>
55 55
56 <div class="message" i18n> 56 <div class="message" i18n>
57 The recently added video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been <a (click)="markAsRead(notification)" [routerLink]="notification.videoAutoBlacklistUrl">auto-blocked</a> 57 The recently added video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been <a (click)="markAsRead(notification)" [routerLink]="notification.videoAutoBlacklistUrl">automatically blocked</a>
58 </div> 58 </div>
59 </ng-container> 59 </ng-container>
60 60
diff --git a/client/src/app/shared/video-block/video-block.service.ts b/client/src/app/shared/video-block/video-block.service.ts
index 67ca1d85b..31ccc84ea 100644
--- a/client/src/app/shared/video-block/video-block.service.ts
+++ b/client/src/app/shared/video-block/video-block.service.ts
@@ -3,7 +3,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { SortMeta } from 'primeng/api' 4import { SortMeta } from 'primeng/api'
5import { from as observableFrom, Observable } from 'rxjs' 5import { from as observableFrom, Observable } from 'rxjs'
6import { VideoBlocklist, VideoBlockType, ResultList } from '../../../../../shared' 6import { VideoBlacklist, VideoBlacklistType, ResultList } from '../../../../../shared'
7import { environment } from '../../../environments/environment' 7import { environment } from '../../../environments/environment'
8import { RestExtractor, RestPagination, RestService } from '../rest' 8import { RestExtractor, RestPagination, RestService } from '../rest'
9 9
@@ -21,8 +21,8 @@ export class VideoBlockService {
21 pagination: RestPagination 21 pagination: RestPagination
22 sort: SortMeta 22 sort: SortMeta
23 search?: string 23 search?: string
24 type?: VideoBlockType 24 type?: VideoBlacklistType
25 }): Observable<ResultList<VideoBlocklist>> { 25 }): Observable<ResultList<VideoBlacklist>> {
26 const { pagination, sort, search, type } = options 26 const { pagination, sort, search, type } = options
27 27
28 let params = new HttpParams() 28 let params = new HttpParams()
@@ -33,8 +33,8 @@ export class VideoBlockService {
33 type: { 33 type: {
34 prefix: 'type:', 34 prefix: 'type:',
35 handler: v => { 35 handler: v => {
36 if (v === 'manual') return VideoBlockType.MANUAL 36 if (v === 'manual') return VideoBlacklistType.MANUAL
37 if (v === 'auto') return VideoBlockType.AUTO_BEFORE_PUBLISHED 37 if (v === 'auto') return VideoBlacklistType.AUTO_BEFORE_PUBLISHED
38 38
39 return undefined 39 return undefined
40 } 40 }
@@ -44,7 +44,7 @@ export class VideoBlockService {
44 params = this.restService.addObjectParams(params, filters) 44 params = this.restService.addObjectParams(params, filters)
45 } 45 }
46 46
47 return this.authHttp.get<ResultList<VideoBlocklist>>(VideoBlockService.BASE_VIDEOS_URL + 'blacklist', { params }) 47 return this.authHttp.get<ResultList<VideoBlacklist>>(VideoBlockService.BASE_VIDEOS_URL + 'blacklist', { params })
48 .pipe( 48 .pipe(
49 map(res => this.restExtractor.convertResultListDateToHuman(res)), 49 map(res => this.restExtractor.convertResultListDateToHuman(res)),
50 catchError(res => this.restExtractor.handleError(res)) 50 catchError(res => this.restExtractor.handleError(res))
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts
index 2b3d915ef..16e43cbd8 100644
--- a/client/src/app/shared/video/video.model.ts
+++ b/client/src/app/shared/video/video.model.ts
@@ -164,11 +164,11 @@ export class Video implements VideoServerModel {
164 } 164 }
165 165
166 isBlockableBy (user: AuthUser) { 166 isBlockableBy (user: AuthUser) {
167 return this.blacklisted !== true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLOCKS) === true 167 return this.blacklisted !== true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true
168 } 168 }
169 169
170 isUnblockableBy (user: AuthUser) { 170 isUnblockableBy (user: AuthUser) {
171 return this.blacklisted === true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLOCKS) === true 171 return this.blacklisted === true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true
172 } 172 }
173 173
174 isUpdatableBy (user: AuthUser) { 174 isUpdatableBy (user: AuthUser) {