diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-10 11:51:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-10 14:32:00 +0200 |
commit | a3b472a12ec6e57dbe2f650419f8064864686eab (patch) | |
tree | f36559488e34493c029b686772e986902150a647 /client/src/app/+my-library/my-video-imports | |
parent | 0567049a9819d67070aa6d548a75a7e632a4aaa4 (diff) | |
download | PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.tar.gz PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.tar.zst PeerTube-a3b472a12ec6e57dbe2f650419f8064864686eab.zip |
Add ability to list imports of a channel sync
Diffstat (limited to 'client/src/app/+my-library/my-video-imports')
3 files changed, 21 insertions, 2 deletions
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html index fb0f6f5a3..866cd1a72 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html | |||
@@ -3,9 +3,18 @@ | |||
3 | <ng-container i18n>My imports</ng-container> | 3 | <ng-container i18n>My imports</ng-container> |
4 | </h1> | 4 | </h1> |
5 | 5 | ||
6 | <div class="mb-4 d-flex justify-content-between"> | ||
7 | <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> | ||
8 | |||
9 | <a routerLink="/my-library/video-channel-syncs" class="button-link"> | ||
10 | <my-global-icon iconName="repeat" aria-hidden="true"></my-global-icon> | ||
11 | <ng-container i18n>My synchronizations</ng-container> | ||
12 | </a> | ||
13 | </div> | ||
14 | |||
6 | <p-table | 15 | <p-table |
7 | [value]="videoImports" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start" | 16 | [value]="videoImports" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start" |
8 | [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | 17 | [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" dataKey="id" |
9 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | 18 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
10 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} imports" | 19 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} imports" |
11 | [expandedRowKeys]="expandedRows" | 20 | [expandedRowKeys]="expandedRows" |
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.scss b/client/src/app/+my-library/my-video-imports/my-video-imports.component.scss index 7acacd47f..d9b12151e 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.scss +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.scss | |||
@@ -8,3 +8,9 @@ pre { | |||
8 | .video-import-error { | 8 | .video-import-error { |
9 | color: #ff0000; | 9 | color: #ff0000; |
10 | } | 10 | } |
11 | |||
12 | .button-link { | ||
13 | @include peertube-button-link; | ||
14 | @include grey-button; | ||
15 | @include button-with-icon(18px, 3px, -1px); | ||
16 | } | ||
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts index f01558061..46d689bd1 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts | |||
@@ -33,12 +33,16 @@ export class MyVideoImportsComponent extends RestTable implements OnInit { | |||
33 | switch (state) { | 33 | switch (state) { |
34 | case VideoImportState.FAILED: | 34 | case VideoImportState.FAILED: |
35 | return 'badge-red' | 35 | return 'badge-red' |
36 | |||
36 | case VideoImportState.REJECTED: | 37 | case VideoImportState.REJECTED: |
37 | return 'badge-banned' | 38 | return 'badge-banned' |
39 | |||
38 | case VideoImportState.PENDING: | 40 | case VideoImportState.PENDING: |
39 | return 'badge-yellow' | 41 | return 'badge-yellow' |
42 | |||
40 | case VideoImportState.PROCESSING: | 43 | case VideoImportState.PROCESSING: |
41 | return 'badge-blue' | 44 | return 'badge-blue' |
45 | |||
42 | default: | 46 | default: |
43 | return 'badge-green' | 47 | return 'badge-green' |
44 | } | 48 | } |
@@ -87,7 +91,7 @@ export class MyVideoImportsComponent extends RestTable implements OnInit { | |||
87 | } | 91 | } |
88 | 92 | ||
89 | protected reloadData () { | 93 | protected reloadData () { |
90 | this.videoImportService.getMyVideoImports(this.pagination, this.sort) | 94 | this.videoImportService.getMyVideoImports(this.pagination, this.sort, this.search) |
91 | .subscribe({ | 95 | .subscribe({ |
92 | next: resultList => { | 96 | next: resultList => { |
93 | this.videoImports = resultList.data | 97 | this.videoImports = resultList.data |