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/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html75
-rw-r--r--client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts13
2 files changed, 38 insertions, 50 deletions
diff --git a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html
index fe579ffd7..961ac51d3 100644
--- a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html
+++ b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.html
@@ -1,49 +1,42 @@
1<div i18n *ngIf="pagination.totalItems === 0">No results.</div> 1<div i18n *ngIf="pagination.totalItems === 0">No results.</div>
2<div
3 myInfiniteScroller
4 [pageHeight]="pageHeight"
5 (nearOfTop)="onNearOfTop()"
6 (nearOfBottom)="onNearOfBottom()"
7 (pageChanged)="onPageChanged($event)"
8 class="videos" #videosElement
9>
10 <div *ngFor="let videos of videoPages; let i = index" class="videos-page">
11 <div class="video" *ngFor="let video of videos; let j = index">
12 <div class="checkbox-container">
13 <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="checkedVideos[video.id]"></my-peertube-checkbox>
14 </div>
15 <my-video-thumbnail [video]="video"></my-video-thumbnail>
16 2
17 <div class="video-info"> 3<div myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" class="videos">
18 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a> 4 <div class="video" *ngFor="let video of videos; let i = index">
19 <div>{{ video.account.displayName }}</div> 5 <div class="checkbox-container">
20 <div>{{ video.publishedAt | myFromNow }}</div> 6 <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="checkedVideos[video.id]"></my-peertube-checkbox>
21 <div><span i18n>Privacy: </span><span>{{ video.privacy.label }}</span></div> 7 </div>
22 <div><span i18n>Sensitve: </span><span> {{ video.nsfw }}</span></div>
23 </div>
24 8
25 <!-- Display only once --> 9 <my-video-thumbnail [video]="video"></my-video-thumbnail>
26 <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0 && j === 0">
27 <div class="action-selection-mode-child">
28 <span i18n class="action-button action-button-cancel-selection" (click)="abortSelectionMode()">
29 Cancel
30 </span>
31 10
32 <span class="action-button action-button-unblacklist-selection" (click)="removeSelectedVideosFromBlacklist()"> 11 <div class="video-info">
33 <my-global-icon iconName="tick"></my-global-icon> 12 <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a>
34 <ng-container i18n>Unblacklist</ng-container> 13 <div>{{ video.account.displayName }}</div>
35 </span> 14 <div>{{ video.publishedAt | myFromNow }}</div>
36 </div> 15 <div><span i18n>Privacy: </span><span>{{ video.privacy.label }}</span></div>
37 </div> 16 <div><span i18n>Sensitive: </span><span> {{ video.nsfw }}</span></div>
17 </div>
18
19 <!-- Display only once -->
20 <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0 && j === 0">
21 <div class="action-selection-mode-child">
22 <span i18n class="action-button action-button-cancel-selection" (click)="abortSelectionMode()">
23 Cancel
24 </span>
38 25
39 <div class="video-buttons" *ngIf="isInSelectionMode() === false"> 26 <span class="action-button action-button-unblacklist-selection" (click)="removeSelectedVideosFromBlacklist()">
40 <my-button 27 <my-global-icon iconName="tick"></my-global-icon>
41 i18n-label 28 <ng-container i18n>Unblacklist</ng-container>
42 label="Unblacklist" 29 </span>
43 icon="tick"
44 (click)="removeVideoFromBlacklist(video)"
45 ></my-button>
46 </div> 30 </div>
47 </div> 31 </div>
48 32
49</div> \ No newline at end of file 33 <div class="video-buttons" *ngIf="isInSelectionMode() === false">
34 <my-button
35 i18n-label
36 label="Unblacklist"
37 icon="tick"
38 (click)="removeVideoFromBlacklist(video)"
39 ></my-button>
40 </div>
41 </div>
42</div>
diff --git a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts
index b79f574c9..af68d7e2e 100644
--- a/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts
+++ b/client/src/app/+admin/moderation/video-auto-blacklist-list/video-auto-blacklist-list.component.ts
@@ -4,7 +4,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
4import { Router, ActivatedRoute } from '@angular/router' 4import { Router, ActivatedRoute } from '@angular/router'
5import { AbstractVideoList } from '@app/shared/video/abstract-video-list' 5import { AbstractVideoList } from '@app/shared/video/abstract-video-list'
6import { ComponentPagination } from '@app/shared/rest/component-pagination.model' 6import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
7import { Notifier, AuthService } from '@app/core' 7import { Notifier, AuthService, ServerService } from '@app/core'
8import { Video } from '@shared/models' 8import { Video } from '@shared/models'
9import { VideoBlacklistService } from '@app/shared' 9import { VideoBlacklistService } from '@app/shared'
10import { immutableAssign } from '@app/shared/misc/utils' 10import { immutableAssign } from '@app/shared/misc/utils'
@@ -17,7 +17,6 @@ import { ScreenService } from '@app/shared/misc/screen.service'
17}) 17})
18export class VideoAutoBlacklistListComponent extends AbstractVideoList implements OnInit, OnDestroy { 18export class VideoAutoBlacklistListComponent extends AbstractVideoList implements OnInit, OnDestroy {
19 titlePage: string 19 titlePage: string
20 currentRoute = '/admin/moderation/video-auto-blacklist/list'
21 checkedVideos: { [ id: number ]: boolean } = {} 20 checkedVideos: { [ id: number ]: boolean } = {}
22 pagination: ComponentPagination = { 21 pagination: ComponentPagination = {
23 currentPage: 1, 22 currentPage: 1,
@@ -25,18 +24,15 @@ export class VideoAutoBlacklistListComponent extends AbstractVideoList implement
25 totalItems: null 24 totalItems: null
26 } 25 }
27 26
28 protected baseVideoWidth = -1
29 protected baseVideoHeight = 155
30
31 constructor ( 27 constructor (
32 protected router: Router, 28 protected router: Router,
33 protected route: ActivatedRoute, 29 protected route: ActivatedRoute,
34 protected i18n: I18n,
35 protected notifier: Notifier, 30 protected notifier: Notifier,
36 protected location: Location,
37 protected authService: AuthService, 31 protected authService: AuthService,
38 protected screenService: ScreenService, 32 protected screenService: ScreenService,
39 private videoBlacklistService: VideoBlacklistService, 33 protected serverService: ServerService,
34 private i18n: I18n,
35 private videoBlacklistService: VideoBlacklistService
40 ) { 36 ) {
41 super() 37 super()
42 38
@@ -96,5 +92,4 @@ export class VideoAutoBlacklistListComponent extends AbstractVideoList implement
96 error => this.notifier.error(error.message) 92 error => this.notifier.error(error.message)
97 ) 93 )
98 } 94 }
99
100} 95}