aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-14 10:38:09 +0200
committerChocobozzz <me@florianbigard.com>2021-04-14 11:45:14 +0200
commitdb5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c (patch)
tree06d02916518e091f36d486f0f57e3a963ca7fa9e /client/src
parent456c9bfddbccbbb376f6756312a49b4183cefb90 (diff)
downloadPeerTube-db5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c.tar.gz
PeerTube-db5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c.tar.zst
PeerTube-db5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c.zip
Move player style in watch component
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+videos/+video-watch/player-styles.component.scss4
-rw-r--r--client/src/app/+videos/+video-watch/player-styles.component.ts14
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.html2
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.module.ts4
-rw-r--r--client/src/app/app.component.scss6
-rw-r--r--client/src/sass/application.scss5
6 files changed, 25 insertions, 10 deletions
diff --git a/client/src/app/+videos/+video-watch/player-styles.component.scss b/client/src/app/+videos/+video-watch/player-styles.component.scss
new file mode 100644
index 000000000..7f1442a59
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/player-styles.component.scss
@@ -0,0 +1,4 @@
1@import 'node_modules/video.js/dist/video-js';
2
3$assets-path: '../../assets/';
4@import '../../../sass/player/index';
diff --git a/client/src/app/+videos/+video-watch/player-styles.component.ts b/client/src/app/+videos/+video-watch/player-styles.component.ts
new file mode 100644
index 000000000..c02630979
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/player-styles.component.ts
@@ -0,0 +1,14 @@
1import { Component, ViewEncapsulation } from '@angular/core'
2
3/*
4* Allows to lazy load global player styles in the watch component
5*/
6
7@Component({
8 selector: 'my-player-styles',
9 template: '',
10 styleUrls: [ './player-styles.component.scss' ],
11 encapsulation: ViewEncapsulation.None
12})
13export class PlayerStylesComponent {
14}
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html
index 6ede109fd..eadb2148a 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.html
+++ b/client/src/app/+videos/+video-watch/video-watch.component.html
@@ -319,3 +319,5 @@
319 <my-support-modal #supportModal [video]="video"></my-support-modal> 319 <my-support-modal #supportModal [video]="video"></my-support-modal>
320 <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share> 320 <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share>
321</ng-container> 321</ng-container>
322
323<my-player-styles></my-player-styles>
diff --git a/client/src/app/+videos/+video-watch/video-watch.module.ts b/client/src/app/+videos/+video-watch/video-watch.module.ts
index 3e9f3822e..29ad92f00 100644
--- a/client/src/app/+videos/+video-watch/video-watch.module.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.module.ts
@@ -14,6 +14,7 @@ import { VideoCommentService } from '../../shared/shared-video-comment/video-com
14import { VideoCommentAddComponent } from './comment/video-comment-add.component' 14import { VideoCommentAddComponent } from './comment/video-comment-add.component'
15import { VideoCommentComponent } from './comment/video-comment.component' 15import { VideoCommentComponent } from './comment/video-comment.component'
16import { VideoCommentsComponent } from './comment/video-comments.component' 16import { VideoCommentsComponent } from './comment/video-comments.component'
17import { PlayerStylesComponent } from './player-styles.component'
17import { RecommendationsModule } from './recommendations/recommendations.module' 18import { RecommendationsModule } from './recommendations/recommendations.module'
18import { TimestampRouteTransformerDirective } from './timestamp-route-transformer.directive' 19import { TimestampRouteTransformerDirective } from './timestamp-route-transformer.directive'
19import { VideoAvatarChannelComponent } from './video-avatar-channel.component' 20import { VideoAvatarChannelComponent } from './video-avatar-channel.component'
@@ -50,7 +51,8 @@ import { VideoWatchComponent } from './video-watch.component'
50 VideoAvatarChannelComponent, 51 VideoAvatarChannelComponent,
51 52
52 TimestampRouteTransformerDirective, 53 TimestampRouteTransformerDirective,
53 TimestampRouteTransformerDirective 54
55 PlayerStylesComponent
54 ], 56 ],
55 57
56 exports: [ 58 exports: [
diff --git a/client/src/app/app.component.scss b/client/src/app/app.component.scss
index 42293e412..7e9e4a216 100644
--- a/client/src/app/app.component.scss
+++ b/client/src/app/app.component.scss
@@ -3,8 +3,6 @@
3@import '~bootstrap/scss/functions'; 3@import '~bootstrap/scss/functions';
4@import '~bootstrap/scss/variables'; 4@import '~bootstrap/scss/variables';
5 5
6$assets-path: '../assets';
7
8.peertube-container { 6.peertube-container {
9 padding-bottom: 20px; 7 padding-bottom: 20px;
10} 8}
@@ -41,9 +39,9 @@ $assets-path: '../assets';
41 39
42 &.icon-menu { 40 &.icon-menu {
43 background-color: pvar(--mainForegroundColor); 41 background-color: pvar(--mainForegroundColor);
44 mask-image: url('#{$assets-path}/images/misc/menu.svg'); 42 mask-image: url('../assets/images/misc/menu.svg');
45 margin: 0 18px 0 20px; 43 margin: 0 18px 0 20px;
46 44
47 @media screen and (max-width: $mobile-view) { 45 @media screen and (max-width: $mobile-view) {
48 margin: 0 10px; 46 margin: 0 10px;
49 } 47 }
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss
index c01938147..fa9c0d992 100644
--- a/client/src/sass/application.scss
+++ b/client/src/sass/application.scss
@@ -6,11 +6,6 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
6 6
7@import '_fonts'; 7@import '_fonts';
8 8
9@import '~video.js/dist/video-js.css';
10
11$assets-path: '../../assets/';
12@import './player/index';
13
14@import './bootstrap'; 9@import './bootstrap';
15@import './primeng-custom'; 10@import './primeng-custom';
16@import './ng-select.scss'; 11@import './ng-select.scss';