diff options
Diffstat (limited to 'client/src/app/videos')
5 files changed, 22 insertions, 7 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index 52082944a..e742e1329 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss | |||
@@ -43,12 +43,15 @@ | |||
43 | align-items: center; | 43 | align-items: center; |
44 | 44 | ||
45 | .video-info-name { | 45 | .video-info-name { |
46 | margin-right: 30px; | ||
46 | font-size: 27px; | 47 | font-size: 27px; |
47 | font-weight: $font-semibold; | 48 | font-weight: $font-semibold; |
48 | flex-grow: 1; | 49 | flex-grow: 1; |
49 | } | 50 | } |
50 | 51 | ||
51 | .video-info-actions { | 52 | .video-info-actions { |
53 | min-width: 215px; | ||
54 | |||
52 | .action-button { | 55 | .action-button { |
53 | @include peertube-button; | 56 | @include peertube-button; |
54 | @include grey-button; | 57 | @include grey-button; |
@@ -219,16 +222,12 @@ | |||
219 | } | 222 | } |
220 | 223 | ||
221 | 224 | ||
222 | @media screen and (max-width: 1000px) { | 225 | @media screen and (max-width: 1200px) { |
223 | .other-videos { | 226 | .other-videos { |
224 | display: none; | 227 | display: none; |
225 | } | 228 | } |
226 | } | ||
227 | 229 | ||
228 | @media screen and (max-width: 800px) { | ||
229 | .video-bottom { | 230 | .video-bottom { |
230 | margin: 20px 0 0 0; | ||
231 | |||
232 | .video-info { | 231 | .video-info { |
233 | margin-right: 0; | 232 | margin-right: 0; |
234 | 233 | ||
@@ -250,3 +249,9 @@ | |||
250 | } | 249 | } |
251 | } | 250 | } |
252 | } | 251 | } |
252 | |||
253 | @media screen and (max-width: 800px) { | ||
254 | .video-bottom { | ||
255 | margin: 20px 0 0 0; | ||
256 | } | ||
257 | } | ||
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' |
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts index 6168fac95..3020b8c30 100644 --- a/client/src/app/videos/video-list/video-recently-added.component.ts +++ b/client/src/app/videos/video-list/video-recently-added.component.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { AuthService } from '../../core/auth' | ||
4 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
5 | import { SortField } from '../../shared/video/sort-field.type' | 6 | import { SortField } from '../../shared/video/sort-field.type' |
6 | import { VideoService } from '../../shared/video/video.service' | 7 | import { VideoService } from '../../shared/video/video.service' |
@@ -18,6 +19,7 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On | |||
18 | constructor (protected router: Router, | 19 | constructor (protected router: Router, |
19 | protected route: ActivatedRoute, | 20 | protected route: ActivatedRoute, |
20 | protected notificationsService: NotificationsService, | 21 | protected notificationsService: NotificationsService, |
22 | protected authService: AuthService, | ||
21 | private videoService: VideoService) { | 23 | private videoService: VideoService) { |
22 | super() | 24 | super() |
23 | } | 25 | } |
diff --git a/client/src/app/videos/video-list/video-search.component.ts b/client/src/app/videos/video-list/video-search.component.ts index e874636af..b7556c13e 100644 --- a/client/src/app/videos/video-list/video-search.component.ts +++ b/client/src/app/videos/video-list/video-search.component.ts | |||
@@ -2,6 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { Subscription } from 'rxjs/Subscription' | 4 | import { Subscription } from 'rxjs/Subscription' |
5 | import { AuthService } from '../../core/auth' | ||
5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 6 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
6 | import { VideoService } from '../../shared/video/video.service' | 7 | import { VideoService } from '../../shared/video/video.service' |
7 | 8 | ||
@@ -21,6 +22,7 @@ export class VideoSearchComponent extends AbstractVideoList implements OnInit, O | |||
21 | constructor (protected router: Router, | 22 | constructor (protected router: Router, |
22 | protected route: ActivatedRoute, | 23 | protected route: ActivatedRoute, |
23 | protected notificationsService: NotificationsService, | 24 | protected notificationsService: NotificationsService, |
25 | protected authService: AuthService, | ||
24 | private videoService: VideoService) { | 26 | private videoService: VideoService) { |
25 | super() | 27 | super() |
26 | } | 28 | } |
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index 82567e02d..fc48086d6 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { AuthService } from '../../core/auth' | ||
4 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 5 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
5 | import { SortField } from '../../shared/video/sort-field.type' | 6 | import { SortField } from '../../shared/video/sort-field.type' |
6 | import { VideoService } from '../../shared/video/video.service' | 7 | import { VideoService } from '../../shared/video/video.service' |
@@ -18,6 +19,7 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit | |||
18 | constructor (protected router: Router, | 19 | constructor (protected router: Router, |
19 | protected route: ActivatedRoute, | 20 | protected route: ActivatedRoute, |
20 | protected notificationsService: NotificationsService, | 21 | protected notificationsService: NotificationsService, |
22 | protected authService: AuthService, | ||
21 | private videoService: VideoService) { | 23 | private videoService: VideoService) { |
22 | super() | 24 | super() |
23 | } | 25 | } |