aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-30 14:58:00 +0200
committerChocobozzz <me@florianbigard.com>2018-08-31 09:19:58 +0200
commit2d3741d6d92e9bd1f41694c7442a6d1da434e1f2 (patch)
tree93a1e609e14bc14ca9e77a6661ddc9c0e461d6f3 /client/src/app/+video-channels
parentd9eaee3939bf2e93e5d775d32bce77842201faba (diff)
downloadPeerTube-2d3741d6d92e9bd1f41694c7442a6d1da434e1f2.tar.gz
PeerTube-2d3741d6d92e9bd1f41694c7442a6d1da434e1f2.tar.zst
PeerTube-2d3741d6d92e9bd1f41694c7442a6d1da434e1f2.zip
Videos overview page: first version
Diffstat (limited to 'client/src/app/+video-channels')
-rw-r--r--client/src/app/+video-channels/video-channels.component.html2
-rw-r--r--client/src/app/+video-channels/video-channels.component.ts6
2 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html
index 1941a2eab..e5a32dc92 100644
--- a/client/src/app/+video-channels/video-channels.component.html
+++ b/client/src/app/+video-channels/video-channels.component.html
@@ -9,7 +9,7 @@
9 <div class="actor-display-name">{{ videoChannel.displayName }}</div> 9 <div class="actor-display-name">{{ videoChannel.displayName }}</div>
10 <div class="actor-name">{{ videoChannel.nameWithHost }}</div> 10 <div class="actor-name">{{ videoChannel.nameWithHost }}</div>
11 11
12 <my-subscribe-button [videoChannel]="videoChannel"></my-subscribe-button> 12 <my-subscribe-button *ngIf="isUserLoggedIn()" [videoChannel]="videoChannel"></my-subscribe-button>
13 </div> 13 </div>
14 <div i18n class="actor-followers">{{ videoChannel.followersCount }} subscribers</div> 14 <div i18n class="actor-followers">{{ videoChannel.followersCount }} subscribers</div>
15 15
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts
index 57c55d286..ee2c86915 100644
--- a/client/src/app/+video-channels/video-channels.component.ts
+++ b/client/src/app/+video-channels/video-channels.component.ts
@@ -5,6 +5,7 @@ import { VideoChannelService } from '@app/shared/video-channel/video-channel.ser
5import { RestExtractor } from '@app/shared' 5import { RestExtractor } from '@app/shared'
6import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators' 6import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators'
7import { Subscription } from 'rxjs' 7import { Subscription } from 'rxjs'
8import { AuthService } from '@app/core'
8 9
9@Component({ 10@Component({
10 templateUrl: './video-channels.component.html', 11 templateUrl: './video-channels.component.html',
@@ -17,6 +18,7 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
17 18
18 constructor ( 19 constructor (
19 private route: ActivatedRoute, 20 private route: ActivatedRoute,
21 private authService: AuthService,
20 private videoChannelService: VideoChannelService, 22 private videoChannelService: VideoChannelService,
21 private restExtractor: RestExtractor 23 private restExtractor: RestExtractor
22 ) { } 24 ) { }
@@ -36,4 +38,8 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
36 ngOnDestroy () { 38 ngOnDestroy () {
37 if (this.routeSub) this.routeSub.unsubscribe() 39 if (this.routeSub) this.routeSub.unsubscribe()
38 } 40 }
41
42 isUserLoggedIn () {
43 return this.authService.isLoggedIn()
44 }
39} 45}