From c4a6f7901cef3dda857a789af827caae0a8f114f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Jun 2020 11:44:54 +0200 Subject: [PATCH] Add channel information in my videos --- .../my-account-videos/my-account-videos.component.html | 1 + .../my-account-videos/my-account-videos.component.ts | 6 ++++-- client/src/app/shared/video/video-miniature.component.scss | 4 ++++ client/src/app/shared/video/videos-selection.component.html | 5 ++++- client/src/app/shared/video/videos-selection.component.ts | 5 ++++- 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 @@ [miniatureDisplayOptions]="miniatureDisplayOptions" [titlePage]="titlePage" [getVideosObservableFunction]="getVideosObservableFunction" + [ownerDisplayType]="ownerDisplayType" #videosSelection > 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' import { I18n } from '@ngx-translate/i18n-polyfill' import { ScreenService } from '@app/shared/misc/screen.service' import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component' -import { MiniatureDisplayOptions } from '@app/shared/video/video-miniature.component' +import { MiniatureDisplayOptions, OwnerDisplayType } from '@app/shared/video/video-miniature.component' import { SelectionType, VideosSelectionComponent } from '@app/shared/video/videos-selection.component' import { VideoSortField } from '@app/shared/video/sort-field.type' import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' @@ -36,12 +36,14 @@ export class MyAccountVideosComponent implements OnInit, DisableForReuseHook { miniatureDisplayOptions: MiniatureDisplayOptions = { date: true, views: true, - by: false, + by: true, privacyLabel: false, privacyText: true, state: true, blacklistInfo: true } + ownerDisplayType: OwnerDisplayType = 'videoChannel' + videos: Video[] = [] videosSearch: string videosSearchChanged = new Subject() 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; width: fit-content; } + .video-miniature-created-at-views + .video-miniature-channel { + margin-top: 5px; + } + .video-info-privacy { margin-top: 5px; } 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 @@ - +
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' import { AbstractVideoList } from '@app/shared/video/abstract-video-list' import { AuthService, Notifier, ServerService } from '@app/core' import { ScreenService } from '@app/shared/misc/screen.service' -import { MiniatureDisplayOptions } from '@app/shared/video/video-miniature.component' +import { MiniatureDisplayOptions, OwnerDisplayType } from '@app/shared/video/video-miniature.component' import { Observable } from 'rxjs' import { Video } from '@app/shared/video/video.model' import { PeerTubeTemplateDirective } from '@app/shared/angular/peertube-template.directive' @@ -36,7 +36,10 @@ export class VideosSelectionComponent extends AbstractVideoList implements OnIni @Input() pagination: ComponentPagination @Input() titlePage: string @Input() miniatureDisplayOptions: MiniatureDisplayOptions + @Input() ownerDisplayType: OwnerDisplayType + @Input() getVideosObservableFunction: (page: number, sort?: VideoSortField) => Observable> + @ContentChildren(PeerTubeTemplateDirective) templates: QueryList> @Output() selectionChange = new EventEmitter() -- 2.25.1