Bladeren bron

Enable flow for written code

j8
Ilya Daynatovich 8 jaren geleden
bovenliggende
commit
905212b109

+ 6
- 1
css/_variables.scss Bestand weergeven

129
 $linkHoverFontColor: #287ade;
129
 $linkHoverFontColor: #287ade;
130
 
130
 
131
 /**
131
 /**
132
- * Landing
132
+ * Unsupported browser
133
  */
133
  */
134
 $primaryUnsupportedBrowserButtonBgColor: #17a0db;
134
 $primaryUnsupportedBrowserButtonBgColor: #17a0db;
135
 $unsupportedBrowserButtonBgColor: #ff9a00;
135
 $unsupportedBrowserButtonBgColor: #ff9a00;
136
 $unsupportedBrowserTextColor: #4a4a4a;
136
 $unsupportedBrowserTextColor: #4a4a4a;
137
+$unsupportedBrowserTextSmallFontSize: 17px;
138
+$unsupportedBrowserTitleColor: #fff;
139
+$unsupportedBrowserTitleFontSize: 24px;
140
+$unsupportedDesktopBrowserTextColor: rgba(255, 255, 255, 0.7);
141
+$unsupportedDesktopBrowserTextFontSize: 21px;

+ 1
- 1
css/unsupported-browser/_main.scss Bestand weergeven

1
 @import 'no-mobile-app';
1
 @import 'no-mobile-app';
2
 @import 'unsupported-desktop-browser';
2
 @import 'unsupported-desktop-browser';
3
-@import 'unsupported-mobile-browser';
3
+@import 'unsupported-mobile-browser';

+ 6
- 6
css/unsupported-browser/_no-mobile-app.scss Bestand weergeven

1
 .no-mobile-app {
1
 .no-mobile-app {
2
     margin: 30% auto 0;
2
     margin: 30% auto 0;
3
-    width: auto;
4
     max-width: 25em;
3
     max-width: 25em;
5
     text-align: center;
4
     text-align: center;
5
+    width: auto;
6
 
6
 
7
     &__title {
7
     &__title {
8
-        padding-bottom: em(17, 24);
9
         border-bottom: 1px solid $auiBorderColor;
8
         border-bottom: 1px solid $auiBorderColor;
9
+        color: $unsupportedBrowserTitleColor;
10
         font-weight: 400;
10
         font-weight: 400;
11
         letter-spacing: 0.5px;
11
         letter-spacing: 0.5px;
12
-        color: #fff;
12
+        padding-bottom: em(17, 24);
13
     }
13
     }
14
 
14
 
15
     &__description {
15
     &__description {
16
-        margin-top: 1em;
17
-        font-size: 17px;
16
+        font-size: $unsupportedBrowserTextSmallFontSize;
18
         font-weight: 300;
17
         font-weight: 300;
19
         letter-spacing: 1px;
18
         letter-spacing: 1px;
19
+        margin-top: 1em;
20
     }
20
     }
21
-}
21
+}

+ 6
- 6
css/unsupported-browser/_unsupported-desktop-browser.scss Bestand weergeven

5
     text-align: center;
5
     text-align: center;
6
 
6
 
7
     &__title {
7
     &__title {
8
-        color: #fff;
8
+        color: $unsupportedBrowserTitleColor;
9
         font-weight: 300;
9
         font-weight: 300;
10
-        font-size: 24px;
10
+        font-size: $unsupportedBrowserTitleFontSize;
11
         letter-spacing: 1px;
11
         letter-spacing: 1px;
12
     }
12
     }
13
 
13
 
14
     &__description {
14
     &__description {
15
-        margin-top: 16px;
16
-        color: rgba(255, 255, 255, 0.7);
15
+        color: $unsupportedDesktopBrowserTextColor;
16
+        font-size: $unsupportedDesktopBrowserTextFontSize;
17
         font-weight: 300;
17
         font-weight: 300;
18
-        font-size: 21px;
19
         letter-spacing: 1px;
18
         letter-spacing: 1px;
19
+        margin-top: 16px;
20
 
20
 
21
         &_small {
21
         &_small {
22
             @extend .unsupported-desktop-browser__description;
22
             @extend .unsupported-desktop-browser__description;
23
-            font-size: 16px;
23
+            font-size: $unsupportedBrowserTextSmallFontSize;
24
         }
24
         }
25
     }
25
     }
26
 
26
 

+ 9
- 4
react/features/base/util/interceptComponent.js Bestand weergeven

1
-/* global APP, interfaceConfig */
1
+/* @flow */
2
 
2
 
3
 import { Platform } from '../react';
3
 import { Platform } from '../react';
4
 import {
4
 import {
8
     UnsupportedMobileBrowser
8
     UnsupportedMobileBrowser
9
 } from '../../unsupported-browser';
9
 } from '../../unsupported-browser';
10
 
10
 
11
+declare var APP: Object;
12
+declare var interfaceConfig: Object;
13
+
11
 /**
14
 /**
12
  * Array of rules defining whether we should intercept component to render
15
  * Array of rules defining whether we should intercept component to render
13
  * or not.
16
  * or not.
56
  *
59
  *
57
  * @param {Object|Function} stateOrGetState - Either Redux state object or
60
  * @param {Object|Function} stateOrGetState - Either Redux state object or
58
  * getState() function.
61
  * getState() function.
59
- * @param {ReactElement} currentComponent - Current route component to render.
62
+ * @param {ReactElement} component - Current route component to render.
60
  * @returns {ReactElement} If any of rules is satisfied returns intercepted
63
  * @returns {ReactElement} If any of rules is satisfied returns intercepted
61
  * component.
64
  * component.
62
  */
65
  */
63
-export function interceptComponent(stateOrGetState, currentComponent) {
66
+export function interceptComponent(
67
+        stateOrGetState: Object,
68
+        component: ReactElement<*>) {
64
     let result;
69
     let result;
65
     const state
70
     const state
66
         = typeof stateOrGetState === 'function'
71
         = typeof stateOrGetState === 'function'
74
         }
79
         }
75
     }
80
     }
76
 
81
 
77
-    return result || currentComponent;
82
+    return result || component;
78
 }
83
 }

+ 4
- 1
react/features/conference/components/Conference.web.js Bestand weergeven

1
-/* global $, APP */
1
+/* @flow */
2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 import { connect as reactReduxConnect } from 'react-redux';
4
 import { connect as reactReduxConnect } from 'react-redux';
8
 import { FeedbackButton } from '../../feedback';
8
 import { FeedbackButton } from '../../feedback';
9
 import { OverlayContainer } from '../../overlay';
9
 import { OverlayContainer } from '../../overlay';
10
 
10
 
11
+declare var $: Function;
12
+declare var APP: Object;
13
+
11
 /**
14
 /**
12
  * For legacy reasons, inline style for display none.
15
  * For legacy reasons, inline style for display none.
13
  *
16
  *

+ 7
- 4
react/features/unsupported-browser/components/NoMobileApp.js Bestand weergeven

1
-/* global interfaceConfig */
1
+/* @flow */
2
+
2
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
3
 
4
 
5
+declare var interfaceConfig: Object;
6
+
4
 /**
7
 /**
5
- * React component representing no mobile page.
8
+ * React component representing no mobile app page.
6
  *
9
  *
7
  * @class NoMobileApp
10
  * @class NoMobileApp
8
  */
11
  */
22
                     Video chat isn't available in the mobile apps
25
                     Video chat isn't available in the mobile apps
23
                 </h2>
26
                 </h2>
24
                 <p className = { `${ns}__description` }>
27
                 <p className = { `${ns}__description` }>
25
-                    Please use { interfaceConfig.APP_NAME } on <br />
26
-                    Desktop top join calls.
28
+                    Video chat isn't available on mobile
29
+                    Desktop to join calls.
27
                 </p>
30
                 </p>
28
             </div>
31
             </div>
29
         );
32
         );

+ 6
- 3
react/features/unsupported-browser/components/PluginRequiredBrowser.js Bestand weergeven

1
+/*  @flow */
2
+
1
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
2
 
4
 
3
 import { CHROME, CHROMIUM, FIREFOX } from './browserLinks';
5
 import { CHROME, CHROMIUM, FIREFOX } from './browserLinks';
16
      */
18
      */
17
     render() {
19
     render() {
18
         const ns = 'unsupported-desktop-browser';
20
         const ns = 'unsupported-desktop-browser';
21
+        const nsLink = `${ns}__link`;
19
 
22
 
20
         return (
23
         return (
21
             <div className = { ns }>
24
             <div className = { ns }>
28
                     however, we strongly recommend that you do that using
31
                     however, we strongly recommend that you do that using
29
                     the&nbsp;
32
                     the&nbsp;
30
                     <a
33
                     <a
31
-                        className = { `${ns}__link` }
34
+                        className = { nsLink }
32
                         href = { CHROME }>Chrome</a>,&nbsp;
35
                         href = { CHROME }>Chrome</a>,&nbsp;
33
                     <a
36
                     <a
34
-                        className = { `${ns}__link` }
37
+                        className = { nsLink }
35
                         href = { CHROMIUM }>Chromium</a> or&nbsp;
38
                         href = { CHROMIUM }>Chromium</a> or&nbsp;
36
                     <a
39
                     <a
37
-                        className = { `${ns}__link` }
40
+                        className = { nsLink }
38
                         href = { FIREFOX }>Firefox</a> browsers.
41
                         href = { FIREFOX }>Firefox</a> browsers.
39
                 </p>
42
                 </p>
40
             </div>
43
             </div>

+ 8
- 6
react/features/unsupported-browser/components/UnsupportedDesktopBrowser.js Bestand weergeven

1
+/* @flow */
2
+
1
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
2
 
4
 
3
 import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
5
 import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
8
  * @class UnsupportedDesktopBrowser
10
  * @class UnsupportedDesktopBrowser
9
  */
11
  */
10
 export default class UnsupportedDesktopBrowser extends Component {
12
 export default class UnsupportedDesktopBrowser extends Component {
11
-
12
     /**
13
     /**
13
      * Renders the component.
14
      * Renders the component.
14
      *
15
      *
16
      */
17
      */
17
     render() {
18
     render() {
18
         const ns = 'unsupported-desktop-browser';
19
         const ns = 'unsupported-desktop-browser';
20
+        const nsLink = `${ns}__link`;
19
 
21
 
20
         return (
22
         return (
21
             <div className = { ns }>
23
             <div className = { ns }>
23
                     It looks like you're using a browser we don't support.
25
                     It looks like you're using a browser we don't support.
24
                 </h2>
26
                 </h2>
25
                 <p className = { `${ns}__description` }>
27
                 <p className = { `${ns}__description` }>
26
-                    Please try again with&nbsp;
28
+                    Please try again with the latest version of&nbsp;
27
                     <a
29
                     <a
28
-                        className = { `${ns}__link` }
30
+                        className = { nsLink }
29
                         href = { CHROME } >Chrome</a>,&nbsp;
31
                         href = { CHROME } >Chrome</a>,&nbsp;
30
                     <a
32
                     <a
31
-                        className = { `${ns}__link` }
33
+                        className = { nsLink }
32
                         href = { FIREFOX }>Firefox</a>,&nbsp;
34
                         href = { FIREFOX }>Firefox</a>,&nbsp;
33
                     <a
35
                     <a
34
-                        className = { `${ns}__link` }
36
+                        className = { nsLink }
35
                         href = { SAFARI }>Safari</a> or&nbsp;
37
                         href = { SAFARI }>Safari</a> or&nbsp;
36
                     <a
38
                     <a
37
-                        className = { `${ns}__link` }
39
+                        className = { nsLink }
38
                         href = { IE }>IE</a>.
40
                         href = { IE }>IE</a>.
39
                 </p>
41
                 </p>
40
             </div>
42
             </div>

+ 4
- 0
react/features/unsupported-browser/components/UnsupportedMobileBrowser.js Bestand weergeven

1
+/* @flow */
2
+
1
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
2
 import { connect } from 'react-redux';
4
 import { connect } from 'react-redux';
3
 
5
 
20
  * @class UnsupportedMobileBrowser
22
  * @class UnsupportedMobileBrowser
21
  */
23
  */
22
 class UnsupportedMobileBrowser extends Component {
24
 class UnsupportedMobileBrowser extends Component {
25
+    state: Object;
26
+
23
     /**
27
     /**
24
      * UnsupportedMobileBrowser component's property types.
28
      * UnsupportedMobileBrowser component's property types.
25
      *
29
      *

Laden…
Annuleren
Opslaan