]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Move player style in watch component
authorChocobozzz <me@florianbigard.com>
Wed, 14 Apr 2021 08:38:09 +0000 (10:38 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 14 Apr 2021 09:45:14 +0000 (11:45 +0200)
client/angular.json
client/src/app/+videos/+video-watch/player-styles.component.scss [new file with mode: 0644]
client/src/app/+videos/+video-watch/player-styles.component.ts [new file with mode: 0644]
client/src/app/+videos/+video-watch/video-watch.component.html
client/src/app/+videos/+video-watch/video-watch.module.ts
client/src/app/app.component.scss
client/src/sass/application.scss

index b923ba413e8018d31c83242c075abcc3bf83cbfb..0cd827218a1b9c24abe08fcae87f3b34514fa472 100644 (file)
                 {
                   "type": "anyComponentStyle",
                   "maximumWarning": "6kb",
-                  "maximumError": "50kb"
+                  "maximumError": "100kb"
                 }
               ],
               "fileReplacements": [
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 (file)
index 0000000..7f1442a
--- /dev/null
@@ -0,0 +1,4 @@
+@import 'node_modules/video.js/dist/video-js';
+
+$assets-path: '../../assets/';
+@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 (file)
index 0000000..c026309
--- /dev/null
@@ -0,0 +1,14 @@
+import { Component, ViewEncapsulation } from '@angular/core'
+
+/*
+* Allows to lazy load global player styles in the watch component
+*/
+
+@Component({
+  selector: 'my-player-styles',
+  template: '',
+  styleUrls: [ './player-styles.component.scss' ],
+  encapsulation: ViewEncapsulation.None
+})
+export class PlayerStylesComponent {
+}
index 6ede109fd895f733364ba643766b160322ba0aae..eadb2148a16d6b7c8ef912d49210f1babfbce4e4 100644 (file)
   <my-support-modal #supportModal [video]="video"></my-support-modal>
   <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share>
 </ng-container>
+
+<my-player-styles></my-player-styles>
index 3e9f3822e8b80be4c414109f53dd0cf2ffe26c63..29ad92f009058fd7f0a7abd5a14f81e0d51252e3 100644 (file)
@@ -14,6 +14,7 @@ import { VideoCommentService } from '../../shared/shared-video-comment/video-com
 import { VideoCommentAddComponent } from './comment/video-comment-add.component'
 import { VideoCommentComponent } from './comment/video-comment.component'
 import { VideoCommentsComponent } from './comment/video-comments.component'
+import { PlayerStylesComponent } from './player-styles.component'
 import { RecommendationsModule } from './recommendations/recommendations.module'
 import { TimestampRouteTransformerDirective } from './timestamp-route-transformer.directive'
 import { VideoAvatarChannelComponent } from './video-avatar-channel.component'
@@ -50,7 +51,8 @@ import { VideoWatchComponent } from './video-watch.component'
     VideoAvatarChannelComponent,
 
     TimestampRouteTransformerDirective,
-    TimestampRouteTransformerDirective
+
+    PlayerStylesComponent
   ],
 
   exports: [
index 42293e4121b33a11e57646aef48da2c6117b890e..7e9e4a2168e8d7518dd7f917421b5538b7ac17a8 100644 (file)
@@ -3,8 +3,6 @@
 @import '~bootstrap/scss/functions';
 @import '~bootstrap/scss/variables';
 
-$assets-path: '../assets';
-
 .peertube-container {
   padding-bottom: 20px;
 }
@@ -41,9 +39,9 @@ $assets-path: '../assets';
 
       &.icon-menu {
         background-color: pvar(--mainForegroundColor);
-        mask-image: url('#{$assets-path}/images/misc/menu.svg');
+        mask-image: url('../assets/images/misc/menu.svg');
         margin: 0 18px 0 20px;
-        
+
         @media screen and (max-width: $mobile-view) {
           margin: 0 10px;
         }
index c0193814764d60ceb2a88a2af46738d273382902..fa9c0d9924d2ff7edc6580da515d7729f13bec65 100644 (file)
@@ -6,11 +6,6 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
 
 @import '_fonts';
 
-@import '~video.js/dist/video-js.css';
-
-$assets-path: '../../assets/';
-@import './player/index';
-
 @import './bootstrap';
 @import './primeng-custom';
 @import './ng-select.scss';