aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/video-watch.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 14:41:59 +0100
committerChocobozzz <me@florianbigard.com>2017-12-12 14:41:59 +0100
commitb2731bff2834fb6aacf166cf435030bf96eb12f3 (patch)
treea519c0669ffc27712fffebc5750df54952a61100 /client/src/app/videos/+video-watch/video-watch.component.ts
parent4a7eeb62f1364678fff28fef4a83a0e9b640017c (diff)
downloadPeerTube-b2731bff2834fb6aacf166cf435030bf96eb12f3.tar.gz
PeerTube-b2731bff2834fb6aacf166cf435030bf96eb12f3.tar.zst
PeerTube-b2731bff2834fb6aacf166cf435030bf96eb12f3.zip
Small style fixes
Diffstat (limited to 'client/src/app/videos/+video-watch/video-watch.component.ts')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index 3825e8449..5e4823c9c 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -60,6 +60,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
60 private markdownService: MarkdownService 60 private markdownService: MarkdownService
61 ) {} 61 ) {}
62 62
63 get user () {
64 return this.authService.getUser()
65 }
66
63 ngOnInit () { 67 ngOnInit () {
64 this.videoService.getVideos({ currentPage: 1, itemsPerPage: 5 }, '-createdAt') 68 this.videoService.getVideos({ currentPage: 1, itemsPerPage: 5 }, '-createdAt')
65 .subscribe( 69 .subscribe(
@@ -204,7 +208,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
204 } 208 }
205 209
206 isVideoBlacklistable () { 210 isVideoBlacklistable () {
207 return this.video.isBlackistableBy(this.authService.getUser()) 211 return this.video.isBlackistableBy(this.user)
208 } 212 }
209 213
210 getAvatarPath () { 214 getAvatarPath () {
@@ -264,7 +268,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
264 this.video = video 268 this.video = video
265 269
266 let observable 270 let observable
267 if (this.video.isVideoNSFWForUser(this.authService.getUser())) { 271 if (this.video.isVideoNSFWForUser(this.user)) {
268 observable = this.confirmService.confirm( 272 observable = this.confirmService.confirm(
269 'This video contains mature or explicit content. Are you sure you want to watch it?', 273 'This video contains mature or explicit content. Are you sure you want to watch it?',
270 'Mature or explicit content' 274 'Mature or explicit content'