Move player style in watch component

pull/3970/head
Chocobozzz 2021-04-14 10:38:09 +02:00
parent 456c9bfddb
commit db5814c047
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
7 changed files with 26 additions and 11 deletions

View File

@ -206,7 +206,7 @@
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "50kb"
"maximumError": "100kb"
}
],
"fileReplacements": [

View File

@ -0,0 +1,4 @@
@import 'node_modules/video.js/dist/video-js';
$assets-path: '../../assets/';
@import '../../../sass/player/index';

View File

@ -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 {
}

View File

@ -319,3 +319,5 @@
<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>

View 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: [

View 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;
}

View 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';