Просмотр исходного кода

Rename style component; Use of status codes instead of flags in conference init

master
Ilya Daynatovich 8 лет назад
Родитель
Сommit
a8877d82b6

+ 1
- 1
react/features/base/connection/actions.web.js Просмотреть файл

@@ -95,7 +95,7 @@ export function connect() {
95 95
                         // Setting plugin required flag to false because
96 96
                         // it's already been installed.
97 97
                         dispatch(setUnsupportedBrowser({
98
-                            isPluginRequired: false
98
+                            name: 'OK'
99 99
                         }));
100 100
                         dispatch(appNavigate(room));
101 101
                     });

+ 5
- 9
react/features/base/util/interceptComponent.js Просмотреть файл

@@ -10,6 +10,7 @@ import {
10 10
 
11 11
 declare var APP: Object;
12 12
 declare var interfaceConfig: Object;
13
+declare var JitsiMeetJS: Object;
13 14
 
14 15
 /**
15 16
  * Array of rules defining whether we should intercept component to render
@@ -43,18 +44,13 @@ const _RULES = [
43 44
         }
44 45
     },
45 46
     state => {
46
-        const {
47
-            isOldBrowser,
48
-            isPluginRequired
49
-        } = state['features/unsupported-browser'];
47
+        switch (state['features/unsupported-browser'].name) {
48
+        case 'WEBRTC_NOT_READY':
49
+            return PluginRequiredBrowser;
50 50
 
51
-        if (isOldBrowser) {
51
+        case 'WEBRTC_NOT_SUPPORTED':
52 52
             return UnsupportedDesktopBrowser;
53 53
         }
54
-
55
-        if (isPluginRequired) {
56
-            return PluginRequiredBrowser;
57
-        }
58 54
     }
59 55
 ];
60 56
 

+ 2
- 0
react/features/conference/components/Conference.web.js Просмотреть файл

@@ -7,6 +7,7 @@ import { connect, disconnect } from '../../base/connection';
7 7
 import { Watermarks } from '../../base/react';
8 8
 import { FeedbackButton } from '../../feedback';
9 9
 import { OverlayContainer } from '../../overlay';
10
+import { HideNotificationBarStyle } from '../../unsupported-browser';
10 11
 
11 12
 declare var $: Function;
12 13
 declare var APP: Object;
@@ -174,6 +175,7 @@ class Conference extends Component {
174 175
                 </div>
175 176
 
176 177
                 <OverlayContainer />
178
+                <HideNotificationBarStyle />
177 179
             </div>
178 180
         );
179 181
     }

react/features/unsupported-browser/components/UnsupportedMobileBrowserStyle.js → react/features/unsupported-browser/components/HideNotificationBarStyle.js Просмотреть файл

@@ -7,7 +7,7 @@ import React, { Component } from 'react';
7 7
  * @private
8 8
  * @returns {ReactElement}
9 9
  */
10
-export default class UnsupportedMobileBrowserStyle extends Component {
10
+export default class HideNotificationBarStyles extends Component {
11 11
 
12 12
     /**
13 13
      * Implements React's {@link Component#render()}.

+ 2
- 2
react/features/unsupported-browser/components/NoMobileApp.js Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 
3 3
 import React, { Component } from 'react';
4 4
 
5
-import UnsupportedMobileBrowserStyle from './UnsupportedMobileBrowserStyle';
5
+import HideNotificationBarStyle from './HideNotificationBarStyle';
6 6
 
7 7
 declare var interfaceConfig: Object;
8 8
 
@@ -30,7 +30,7 @@ export default class NoMobileApp extends Component {
30 30
                     Please use {interfaceConfig.APP_NAME} on
31 31
                     Desktop to join calls.
32 32
                 </p>
33
-                <UnsupportedMobileBrowserStyle />
33
+                <HideNotificationBarStyle />
34 34
             </div>
35 35
         );
36 36
     }

+ 3
- 0
react/features/unsupported-browser/components/UnsupportedDesktopBrowser.js Просмотреть файл

@@ -5,6 +5,7 @@ import React, { Component } from 'react';
5 5
 import { Platform } from '../../base/react';
6 6
 
7 7
 import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
8
+import HideNotificationBarStyle from './HideNotificationBarStyle';
8 9
 
9 10
 /**
10 11
  * Describes styles namespace for this component.
@@ -41,6 +42,8 @@ export default class UnsupportedDesktopBrowser extends Component {
41 42
                     { this._showSafariLinkIfRequired() }
42 43
                     { this._showIELinkIfRequired() }.
43 44
                 </p>
45
+
46
+                <HideNotificationBarStyle />
44 47
             </div>
45 48
         );
46 49
     }

+ 3
- 2
react/features/unsupported-browser/components/UnsupportedMobileBrowser.js Просмотреть файл

@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
5 5
 
6 6
 import { Platform } from '../../base/react';
7 7
 
8
-import UnsupportedMobileBrowserStyle from './UnsupportedMobileBrowserStyle';
8
+import HideNotificationBarStyle from './HideNotificationBarStyle';
9 9
 
10 10
 /**
11 11
  * The map of platforms to URLs at which the mobile app for the associated
@@ -103,7 +103,8 @@ class UnsupportedMobileBrowser extends Component {
103 103
                         </button>
104 104
                     </a>
105 105
                 </div>
106
-                <UnsupportedMobileBrowserStyle />
106
+
107
+                <HideNotificationBarStyle />
107 108
             </div>
108 109
         );
109 110
     }

+ 2
- 0
react/features/unsupported-browser/components/index.js Просмотреть файл

@@ -1,3 +1,5 @@
1
+export { default as HideNotificationBarStyle }
2
+    from './HideNotificationBarStyle';
1 3
 export { default as NoMobileApp } from './NoMobileApp';
2 4
 export { default as PluginRequiredBrowser } from './PluginRequiredBrowser';
3 5
 export { default as UnsupportedDesktopBrowser }

Загрузка…
Отмена
Сохранить