Add channel information in my videos
authorChocobozzz <me@florianbigard.com>
Tue, 16 Jun 2020 09:44:54 +0000 (11:44 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 16 Jun 2020 09:44:54 +0000 (11:44 +0200)
client/src/app/+my-account/my-account-videos/my-account-videos.component.html
client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
client/src/app/shared/video/video-miniature.component.scss
client/src/app/shared/video/videos-selection.component.html
client/src/app/shared/video/videos-selection.component.ts

index 825bddf5eb3c7d907156b2b7b381dc9cb6a58043..32264a70a126f16040706a506fe7b987ff3fe2a6 100644 (file)
@@ -13,6 +13,7 @@
   [miniatureDisplayOptions]="miniatureDisplayOptions"
   [titlePage]="titlePage"
   [getVideosObservableFunction]="getVideosObservableFunction"
+  [ownerDisplayType]="ownerDisplayType"
   #videosSelection
 >
   <ng-template ptTemplate="globalButtons">
index 4aa570363c83f7425f98c4c4b36d7d64f744c092..0ec033eaf82a894d777044833a434cba94c690da 100644 (file)
@@ -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<string>()
index 1816192bac015732a8b6d50f09239a6bd7baeb7e..38cac5b6e6452493c3463133106980a86dbca3d4 100644 (file)
@@ -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;
         }
index 2b4b353cf29693fc3b20b28e0733b55481fc1bd1..44aa567b93fa1dcb5ca8c95c4ce2212f60c58a98 100644 (file)
@@ -7,7 +7,10 @@
       <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="_selection[video.id]"></my-peertube-checkbox>
     </div>
 
-    <my-video-miniature [video]="video" [displayAsRow]="true" [displayOptions]="miniatureDisplayOptions" [displayVideoActions]="false"></my-video-miniature>
+    <my-video-miniature
+      [video]="video" [displayAsRow]="true" [displayOptions]="miniatureDisplayOptions"
+      [displayVideoActions]="false" [ownerDisplayType]="ownerDisplayType"
+    ></my-video-miniature>
 
     <!-- Display only once -->
     <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0">
index 17e5beb2476c49673d00eeabf02ae569d60e8b77..9453664dde5bc9c085053c24e0ebeadcde806b93 100644 (file)
@@ -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<ResultList<Video>>
+
   @ContentChildren(PeerTubeTemplateDirective) templates: QueryList<PeerTubeTemplateDirective<'rowButtons' | 'globalButtons'>>
 
   @Output() selectionChange = new EventEmitter<SelectionType>()