Kaynağa Gözat

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 7 yıl önce
ebeveyn
işleme
3e3577766d

+ 5
- 0
css/modals/video-quality/_video-quality.scss Dosyayı Görüntüle

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

+ 4
- 1
react/features/video-quality/components/VideoQualityDialog.web.js Dosyayı Görüntüle

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

Loading…
İptal
Kaydet