]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/video-list/video-recently-added.component.ts
Fix markdown links truncating
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-recently-added.component.ts
index 535b6e618433a8a8d58823a30e4722cfaca99e76..8183357f87bd0d0b450b062c153d8fe09bf79001 100644 (file)
@@ -7,6 +7,7 @@ import { AuthService } from '../../core/auth'
 import { AbstractVideoList } from '../../shared/video/abstract-video-list'
 import { VideoSortField } from '../../shared/video/sort-field.type'
 import { VideoService } from '../../shared/video/video.service'
+import { I18n } from '@ngx-translate/i18n-polyfill'
 
 @Component({
   selector: 'my-videos-recently-added',
@@ -14,17 +15,22 @@ import { VideoService } from '../../shared/video/video.service'
   templateUrl: '../../shared/video/abstract-video-list.html'
 })
 export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
-  titlePage = 'Recently added'
+  titlePage: string
   currentRoute = '/videos/recently-added'
-  sort: VideoSortField = '-createdAt'
-
-  constructor (protected router: Router,
-               protected route: ActivatedRoute,
-               protected location: Location,
-               protected notificationsService: NotificationsService,
-               protected authService: AuthService,
-               private videoService: VideoService) {
+  sort: VideoSortField = '-publishedAt'
+
+  constructor (
+    protected router: Router,
+    protected route: ActivatedRoute,
+    protected location: Location,
+    protected notificationsService: NotificationsService,
+    protected authService: AuthService,
+    protected i18n: I18n,
+    private videoService: VideoService
+  ) {
     super()
+
+    this.titlePage = i18n('Recently added')
   }
 
   ngOnInit () {