diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-29 16:16:12 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-29 16:16:12 +0200 |
commit | 0ca454e3bdf89390d1a48760ab555ddd8725c82d (patch) | |
tree | ec648012f0deb674704732894bd895b336c91b0c /client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts | |
parent | 76b8d72e324d3a148beec38ed7b36ccfd5eb4009 (diff) | |
download | PeerTube-0ca454e3bdf89390d1a48760ab555ddd8725c82d.tar.gz PeerTube-0ca454e3bdf89390d1a48760ab555ddd8725c82d.tar.zst PeerTube-0ca454e3bdf89390d1a48760ab555ddd8725c82d.zip |
Only display homepage when components are loaded
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts')
-rw-r--r-- | client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts index eddc3636e..42a42d711 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
2 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' | 2 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' |
3 | import { VideoPlaylist, VideoPlaylistService } from '../../shared-video-playlist' | 3 | import { VideoPlaylist, VideoPlaylistService } from '../../shared-video-playlist' |
4 | import { CustomMarkupComponent } from './shared' | ||
4 | 5 | ||
5 | /* | 6 | /* |
6 | * Markup component that creates a playlist miniature only | 7 | * Markup component that creates a playlist miniature only |
@@ -11,9 +12,11 @@ import { VideoPlaylist, VideoPlaylistService } from '../../shared-video-playlist | |||
11 | templateUrl: 'playlist-miniature-markup.component.html', | 12 | templateUrl: 'playlist-miniature-markup.component.html', |
12 | styleUrls: [ 'playlist-miniature-markup.component.scss' ] | 13 | styleUrls: [ 'playlist-miniature-markup.component.scss' ] |
13 | }) | 14 | }) |
14 | export class PlaylistMiniatureMarkupComponent implements OnInit { | 15 | export class PlaylistMiniatureMarkupComponent implements CustomMarkupComponent, OnInit { |
15 | @Input() uuid: string | 16 | @Input() uuid: string |
16 | 17 | ||
18 | @Output() loaded = new EventEmitter<boolean>() | ||
19 | |||
17 | playlist: VideoPlaylist | 20 | playlist: VideoPlaylist |
18 | 21 | ||
19 | displayOptions: MiniatureDisplayOptions = { | 22 | displayOptions: MiniatureDisplayOptions = { |
@@ -33,6 +36,10 @@ export class PlaylistMiniatureMarkupComponent implements OnInit { | |||
33 | 36 | ||
34 | ngOnInit () { | 37 | ngOnInit () { |
35 | this.playlistService.getVideoPlaylist(this.uuid) | 38 | this.playlistService.getVideoPlaylist(this.uuid) |
36 | .subscribe(playlist => this.playlist = playlist) | 39 | .subscribe({ |
40 | next: playlist => this.playlist = playlist, | ||
41 | |||
42 | complete: () => this.loaded.emit(true) | ||
43 | }) | ||
37 | } | 44 | } |
38 | } | 45 | } |