diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-16 11:44:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-16 11:44:54 +0200 |
commit | c4a6f7901cef3dda857a789af827caae0a8f114f (patch) | |
tree | 1c7d19a01ecebccfbfc06e50c09aa53f20b9a27c /client/src/app | |
parent | b27b12552b1442db0f88bc891ceffc8c8ad79c43 (diff) | |
download | PeerTube-c4a6f7901cef3dda857a789af827caae0a8f114f.tar.gz PeerTube-c4a6f7901cef3dda857a789af827caae0a8f114f.tar.zst PeerTube-c4a6f7901cef3dda857a789af827caae0a8f114f.zip |
Add channel information in my videos
Diffstat (limited to 'client/src/app')
5 files changed, 17 insertions, 4 deletions
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html index 825bddf5e..32264a70a 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html | |||
@@ -13,6 +13,7 @@ | |||
13 | [miniatureDisplayOptions]="miniatureDisplayOptions" | 13 | [miniatureDisplayOptions]="miniatureDisplayOptions" |
14 | [titlePage]="titlePage" | 14 | [titlePage]="titlePage" |
15 | [getVideosObservableFunction]="getVideosObservableFunction" | 15 | [getVideosObservableFunction]="getVideosObservableFunction" |
16 | [ownerDisplayType]="ownerDisplayType" | ||
16 | #videosSelection | 17 | #videosSelection |
17 | > | 18 | > |
18 | <ng-template ptTemplate="globalButtons"> | 19 | <ng-template ptTemplate="globalButtons"> |
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index 4aa570363..0ec033eaf 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | |||
@@ -12,7 +12,7 @@ import { VideoService } from '../../shared/video/video.service' | |||
12 | import { I18n } from '@ngx-translate/i18n-polyfill' | 12 | import { I18n } from '@ngx-translate/i18n-polyfill' |
13 | import { ScreenService } from '@app/shared/misc/screen.service' | 13 | import { ScreenService } from '@app/shared/misc/screen.service' |
14 | import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component' | 14 | import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component' |
15 | import { MiniatureDisplayOptions } from '@app/shared/video/video-miniature.component' | 15 | import { MiniatureDisplayOptions, OwnerDisplayType } from '@app/shared/video/video-miniature.component' |
16 | import { SelectionType, VideosSelectionComponent } from '@app/shared/video/videos-selection.component' | 16 | import { SelectionType, VideosSelectionComponent } from '@app/shared/video/videos-selection.component' |
17 | import { VideoSortField } from '@app/shared/video/sort-field.type' | 17 | import { VideoSortField } from '@app/shared/video/sort-field.type' |
18 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' | 18 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' |
@@ -36,12 +36,14 @@ export class MyAccountVideosComponent implements OnInit, DisableForReuseHook { | |||
36 | miniatureDisplayOptions: MiniatureDisplayOptions = { | 36 | miniatureDisplayOptions: MiniatureDisplayOptions = { |
37 | date: true, | 37 | date: true, |
38 | views: true, | 38 | views: true, |
39 | by: false, | 39 | by: true, |
40 | privacyLabel: false, | 40 | privacyLabel: false, |
41 | privacyText: true, | 41 | privacyText: true, |
42 | state: true, | 42 | state: true, |
43 | blacklistInfo: true | 43 | blacklistInfo: true |
44 | } | 44 | } |
45 | ownerDisplayType: OwnerDisplayType = 'videoChannel' | ||
46 | |||
45 | videos: Video[] = [] | 47 | videos: Video[] = [] |
46 | videosSearch: string | 48 | videosSearch: string |
47 | videosSearchChanged = new Subject<string>() | 49 | videosSearchChanged = new Subject<string>() |
diff --git a/client/src/app/shared/video/video-miniature.component.scss b/client/src/app/shared/video/video-miniature.component.scss index 1816192ba..38cac5b6e 100644 --- a/client/src/app/shared/video/video-miniature.component.scss +++ b/client/src/app/shared/video/video-miniature.component.scss | |||
@@ -165,6 +165,10 @@ $more-margin-right: 15px; | |||
165 | width: fit-content; | 165 | width: fit-content; |
166 | } | 166 | } |
167 | 167 | ||
168 | .video-miniature-created-at-views + .video-miniature-channel { | ||
169 | margin-top: 5px; | ||
170 | } | ||
171 | |||
168 | .video-info-privacy { | 172 | .video-info-privacy { |
169 | margin-top: 5px; | 173 | margin-top: 5px; |
170 | } | 174 | } |
diff --git a/client/src/app/shared/video/videos-selection.component.html b/client/src/app/shared/video/videos-selection.component.html index 2b4b353cf..44aa567b9 100644 --- a/client/src/app/shared/video/videos-selection.component.html +++ b/client/src/app/shared/video/videos-selection.component.html | |||
@@ -7,7 +7,10 @@ | |||
7 | <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="_selection[video.id]"></my-peertube-checkbox> | 7 | <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="_selection[video.id]"></my-peertube-checkbox> |
8 | </div> | 8 | </div> |
9 | 9 | ||
10 | <my-video-miniature [video]="video" [displayAsRow]="true" [displayOptions]="miniatureDisplayOptions" [displayVideoActions]="false"></my-video-miniature> | 10 | <my-video-miniature |
11 | [video]="video" [displayAsRow]="true" [displayOptions]="miniatureDisplayOptions" | ||
12 | [displayVideoActions]="false" [ownerDisplayType]="ownerDisplayType" | ||
13 | ></my-video-miniature> | ||
11 | 14 | ||
12 | <!-- Display only once --> | 15 | <!-- Display only once --> |
13 | <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0"> | 16 | <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0"> |
diff --git a/client/src/app/shared/video/videos-selection.component.ts b/client/src/app/shared/video/videos-selection.component.ts index 17e5beb24..9453664dd 100644 --- a/client/src/app/shared/video/videos-selection.component.ts +++ b/client/src/app/shared/video/videos-selection.component.ts | |||
@@ -14,7 +14,7 @@ import { ActivatedRoute, Router } from '@angular/router' | |||
14 | import { AbstractVideoList } from '@app/shared/video/abstract-video-list' | 14 | import { AbstractVideoList } from '@app/shared/video/abstract-video-list' |
15 | import { AuthService, Notifier, ServerService } from '@app/core' | 15 | import { AuthService, Notifier, ServerService } from '@app/core' |
16 | import { ScreenService } from '@app/shared/misc/screen.service' | 16 | import { ScreenService } from '@app/shared/misc/screen.service' |
17 | import { MiniatureDisplayOptions } from '@app/shared/video/video-miniature.component' | 17 | import { MiniatureDisplayOptions, OwnerDisplayType } from '@app/shared/video/video-miniature.component' |
18 | import { Observable } from 'rxjs' | 18 | import { Observable } from 'rxjs' |
19 | import { Video } from '@app/shared/video/video.model' | 19 | import { Video } from '@app/shared/video/video.model' |
20 | import { PeerTubeTemplateDirective } from '@app/shared/angular/peertube-template.directive' | 20 | import { PeerTubeTemplateDirective } from '@app/shared/angular/peertube-template.directive' |
@@ -36,7 +36,10 @@ export class VideosSelectionComponent extends AbstractVideoList implements OnIni | |||
36 | @Input() pagination: ComponentPagination | 36 | @Input() pagination: ComponentPagination |
37 | @Input() titlePage: string | 37 | @Input() titlePage: string |
38 | @Input() miniatureDisplayOptions: MiniatureDisplayOptions | 38 | @Input() miniatureDisplayOptions: MiniatureDisplayOptions |
39 | @Input() ownerDisplayType: OwnerDisplayType | ||
40 | |||
39 | @Input() getVideosObservableFunction: (page: number, sort?: VideoSortField) => Observable<ResultList<Video>> | 41 | @Input() getVideosObservableFunction: (page: number, sort?: VideoSortField) => Observable<ResultList<Video>> |
42 | |||
40 | @ContentChildren(PeerTubeTemplateDirective) templates: QueryList<PeerTubeTemplateDirective<'rowButtons' | 'globalButtons'>> | 43 | @ContentChildren(PeerTubeTemplateDirective) templates: QueryList<PeerTubeTemplateDirective<'rowButtons' | 'globalButtons'>> |
41 | 44 | ||
42 | @Output() selectionChange = new EventEmitter<SelectionType>() | 45 | @Output() selectionChange = new EventEmitter<SelectionType>() |