aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+admin/overview/videos/video-list.component.html1
-rw-r--r--client/src/app/+admin/overview/videos/video-list.component.scss4
-rw-r--r--client/src/app/+admin/overview/videos/video-list.component.ts26
3 files changed, 21 insertions, 10 deletions
diff --git a/client/src/app/+admin/overview/videos/video-list.component.html b/client/src/app/+admin/overview/videos/video-list.component.html
index dd4ab178e..67b554aaf 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.html
+++ b/client/src/app/+admin/overview/videos/video-list.component.html
@@ -10,6 +10,7 @@
10 [showCurrentPageReport]="true" i18n-currentPageReportTemplate 10 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
11 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} videos" 11 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} videos"
12 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" 12 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
13 [ngClass]="{ loading: loading }"
13> 14>
14 <ng-template pTemplate="caption"> 15 <ng-template pTemplate="caption">
15 <div class="caption"> 16 <div class="caption">
diff --git a/client/src/app/+admin/overview/videos/video-list.component.scss b/client/src/app/+admin/overview/videos/video-list.component.scss
index 158c161af..5ec9d4850 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.scss
+++ b/client/src/app/+admin/overview/videos/video-list.component.scss
@@ -15,3 +15,7 @@ my-embed {
15.video-info > div { 15.video-info > div {
16 display: flex; 16 display: flex;
17} 17}
18
19.loading {
20 opacity: 0.5;
21}
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts
index 8bd171c53..ed3a86b96 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.ts
+++ b/client/src/app/+admin/overview/videos/video-list.component.ts
@@ -1,11 +1,12 @@
1import { SortMeta } from 'primeng/api' 1import { SortMeta } from 'primeng/api'
2import { finalize } from 'rxjs/operators'
2import { Component, OnInit } from '@angular/core' 3import { Component, OnInit } from '@angular/core'
3import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
4import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' 5import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
5import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
6import { UserRight, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models'
7import { AdvancedInputFilter } from '@app/shared/shared-forms' 6import { AdvancedInputFilter } from '@app/shared/shared-forms'
7import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
8import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' 8import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature'
9import { UserRight, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models'
9 10
10@Component({ 11@Component({
11 selector: 'my-video-list', 12 selector: 'my-video-list',
@@ -51,6 +52,8 @@ export class VideoListComponent extends RestTable implements OnInit {
51 liveInfo: false 52 liveInfo: false
52 } 53 }
53 54
55 loading = false
56
54 constructor ( 57 constructor (
55 protected route: ActivatedRoute, 58 protected route: ActivatedRoute,
56 protected router: Router, 59 protected router: Router,
@@ -135,18 +138,21 @@ export class VideoListComponent extends RestTable implements OnInit {
135 protected reloadData () { 138 protected reloadData () {
136 this.selectedVideos = [] 139 this.selectedVideos = []
137 140
141 this.loading = true
142
138 this.videoService.getAdminVideos({ 143 this.videoService.getAdminVideos({
139 pagination: this.pagination, 144 pagination: this.pagination,
140 sort: this.sort, 145 sort: this.sort,
141 search: this.search 146 search: this.search
142 }).subscribe({ 147 }).pipe(finalize(() => this.loading = false))
143 next: resultList => { 148 .subscribe({
144 this.videos = resultList.data 149 next: resultList => {
145 this.totalRecords = resultList.total 150 this.videos = resultList.data
146 }, 151 this.totalRecords = resultList.total
147 152 },
148 error: err => this.notifier.error(err.message) 153
149 }) 154 error: err => this.notifier.error(err.message)
155 })
150 } 156 }
151 157
152 private async removeVideos (videos: Video[]) { 158 private async removeVideos (videos: Video[]) {