소스 검색

fix(quality-slider): prevent resizing by making p2p warning hidden (#1890)

* fix(quality-slider): prevent resizing by making p2p warning hidden

Instead of removing and appending the p2p warning, make it always
appended but toggle visibility so it always takes up space. This
should prevent resizing when the warning appears. Margin and
padding were adjusted to account for the empty space displayed
by a hidden p2p warning.

* let vertical size change
master
virtuacoplenny 8 년 전
부모
커밋
3e3577766d
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 5
    0
      css/modals/video-quality/_video-quality.scss
  2. 4
    1
      react/features/video-quality/components/VideoQualityDialog.web.js

+ 5
- 0
css/modals/video-quality/_video-quality.scss 파일 보기

1
 .video-quality-dialog {
1
 .video-quality-dialog {
2
     color: $modalTextColor;
2
     color: $modalTextColor;
3
 
3
 
4
+    .hide-warning {
5
+        height: 0;
6
+        visibility: hidden;
7
+    }
8
+
4
     .video-quality-dialog-title {
9
     .video-quality-dialog-title {
5
         margin-bottom: 10px;
10
         margin-bottom: 10px;
6
     }
11
     }

+ 4
- 1
react/features/video-quality/components/VideoQualityDialog.web.js 파일 보기

115
     render() {
115
     render() {
116
         const { _audioOnly, _p2p, t } = this.props;
116
         const { _audioOnly, _p2p, t } = this.props;
117
         const activeSliderOption = this._mapCurrentQualityToSliderValue();
117
         const activeSliderOption = this._mapCurrentQualityToSliderValue();
118
+        const showP2PWarning = _p2p && !_audioOnly;
118
 
119
 
119
         return (
120
         return (
120
             <div className = 'video-quality-dialog'>
121
             <div className = 'video-quality-dialog'>
121
                 <h3 className = 'video-quality-dialog-title'>
122
                 <h3 className = 'video-quality-dialog-title'>
122
                     { t('videoStatus.callQuality') }
123
                     { t('videoStatus.callQuality') }
123
                 </h3>
124
                 </h3>
124
-                { !_audioOnly && _p2p ? this._renderP2PMessage() : null }
125
+                <div className = { showP2PWarning ? '' : 'hide-warning' }>
126
+                    { this._renderP2PMessage() }
127
+                </div>
125
                 <div className = 'video-quality-dialog-contents'>
128
                 <div className = 'video-quality-dialog-contents'>
126
                     <div className = 'video-quality-dialog-slider-container'>
129
                     <div className = 'video-quality-dialog-slider-container'>
127
                         { /* FIXME: onChange and onMouseUp are both used for
130
                         { /* FIXME: onChange and onMouseUp are both used for

Loading…
취소
저장