소스 검색

ref(filmstrip): apply filmstrip class to Conference root (#3294)

* ref(filmstrip): apply filmstrip class to Conference root

Instead of apply the layout class to the body, it can be
applied to Conference. This will allow easier switching
between tile filmstrip and horizontal/vertical filmstrip.

* squash: fix typo filstrip
master
virtuacoplenny 7 년 전
부모
커밋
39f1958300
No account linked to committer's email address
3개의 변경된 파일24개의 추가작업 그리고 6개의 파일을 삭제
  1. 1
    1
      css/filmstrip/_vertical_filmstrip.scss
  2. 0
    5
      modules/UI/UI.js
  3. 23
    0
      react/features/conference/components/Conference.web.js

+ 1
- 1
css/filmstrip/_vertical_filmstrip.scss 파일 보기

@@ -127,7 +127,7 @@
127 127
 /**
128 128
  * Override other styles to support vertical filmstrip mode.
129 129
  */
130
-.vertical-filmstrip.filmstrip-only {
130
+.filmstrip-only .vertical-filmstrip {
131 131
     .filmstrip {
132 132
         flex-direction: row-reverse;
133 133
     }

+ 0
- 5
modules/UI/UI.js 파일 보기

@@ -320,11 +320,6 @@ UI.start = function() {
320 320
         SidePanels.init(eventEmitter);
321 321
     }
322 322
 
323
-    const filmstripTypeClassname = interfaceConfig.VERTICAL_FILMSTRIP
324
-        ? 'vertical-filmstrip' : 'horizontal-filmstrip';
325
-
326
-    $('body').addClass(filmstripTypeClassname);
327
-
328 323
     document.title = interfaceConfig.APP_NAME;
329 324
 };
330 325
 

+ 23
- 0
react/features/conference/components/Conference.web.js 파일 보기

@@ -42,6 +42,18 @@ const FULL_SCREEN_EVENTS = [
42 42
     'fullscreenchange'
43 43
 ];
44 44
 
45
+/**
46
+ * The CSS class to apply to the root element of the conference so CSS can
47
+ * modify the app layout.
48
+ *
49
+ * @private
50
+ * @type {Object}
51
+ */
52
+const LAYOUT_CLASSES = {
53
+    HORIZONTAL_FILMSTRIP: 'horizontal-filmstrip',
54
+    VERTICAL_FILMSTRIP: 'vertical-filmstrip'
55
+};
56
+
45 57
 /**
46 58
  * The type of the React {@code Component} props of {@link Conference}.
47 59
  */
@@ -52,6 +64,12 @@ type Props = {
52 64
      */
53 65
     _iAmRecorder: boolean,
54 66
 
67
+    /**
68
+     * The CSS class to apply to the root of {@link Conference} to modify the
69
+     * application layout.
70
+     */
71
+    _layoutModeClassName: string,
72
+
55 73
     /**
56 74
      * Conference room name.
57 75
      */
@@ -162,6 +180,7 @@ class Conference extends Component<Props> {
162 180
 
163 181
         return (
164 182
             <div
183
+                className = { this.props._layoutModeClassName }
165 184
                 id = 'videoconference_page'
166 185
                 onMouseMove = { this._onShowToolbar }>
167 186
                 <Notice />
@@ -253,6 +272,10 @@ function _mapStateToProps(state) {
253 272
          */
254 273
         _iAmRecorder: iAmRecorder,
255 274
 
275
+        _layoutModeClassName: interfaceConfig.VERTICAL_FILMSTRIP
276
+            ? LAYOUT_CLASSES.VERTICAL_FILMSTRIP
277
+            : LAYOUT_CLASSES.HORIZONTAL_FILMSTRIP,
278
+
256 279
         /**
257 280
          * Conference room name.
258 281
          */

Loading…
취소
저장