Enable flow for written code
This commit is contained in:
parent
05b7df26e6
commit
905212b109
|
@ -129,8 +129,13 @@ $linkFontColor: #489afe;
|
||||||
$linkHoverFontColor: #287ade;
|
$linkHoverFontColor: #287ade;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Landing
|
* Unsupported browser
|
||||||
*/
|
*/
|
||||||
$primaryUnsupportedBrowserButtonBgColor: #17a0db;
|
$primaryUnsupportedBrowserButtonBgColor: #17a0db;
|
||||||
$unsupportedBrowserButtonBgColor: #ff9a00;
|
$unsupportedBrowserButtonBgColor: #ff9a00;
|
||||||
$unsupportedBrowserTextColor: #4a4a4a;
|
$unsupportedBrowserTextColor: #4a4a4a;
|
||||||
|
$unsupportedBrowserTextSmallFontSize: 17px;
|
||||||
|
$unsupportedBrowserTitleColor: #fff;
|
||||||
|
$unsupportedBrowserTitleFontSize: 24px;
|
||||||
|
$unsupportedDesktopBrowserTextColor: rgba(255, 255, 255, 0.7);
|
||||||
|
$unsupportedDesktopBrowserTextFontSize: 21px;
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
.no-mobile-app {
|
.no-mobile-app {
|
||||||
margin: 30% auto 0;
|
margin: 30% auto 0;
|
||||||
width: auto;
|
|
||||||
max-width: 25em;
|
max-width: 25em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
width: auto;
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
padding-bottom: em(17, 24);
|
|
||||||
border-bottom: 1px solid $auiBorderColor;
|
border-bottom: 1px solid $auiBorderColor;
|
||||||
|
color: $unsupportedBrowserTitleColor;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
color: #fff;
|
padding-bottom: em(17, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__description {
|
&__description {
|
||||||
margin-top: 1em;
|
font-size: $unsupportedBrowserTextSmallFontSize;
|
||||||
font-size: 17px;
|
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,22 +5,22 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
color: #fff;
|
color: $unsupportedBrowserTitleColor;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 24px;
|
font-size: $unsupportedBrowserTitleFontSize;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__description {
|
&__description {
|
||||||
margin-top: 16px;
|
color: $unsupportedDesktopBrowserTextColor;
|
||||||
color: rgba(255, 255, 255, 0.7);
|
font-size: $unsupportedDesktopBrowserTextFontSize;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 21px;
|
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
&_small {
|
&_small {
|
||||||
@extend .unsupported-desktop-browser__description;
|
@extend .unsupported-desktop-browser__description;
|
||||||
font-size: 16px;
|
font-size: $unsupportedBrowserTextSmallFontSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* global APP, interfaceConfig */
|
/* @flow */
|
||||||
|
|
||||||
import { Platform } from '../react';
|
import { Platform } from '../react';
|
||||||
import {
|
import {
|
||||||
|
@ -8,6 +8,9 @@ import {
|
||||||
UnsupportedMobileBrowser
|
UnsupportedMobileBrowser
|
||||||
} from '../../unsupported-browser';
|
} from '../../unsupported-browser';
|
||||||
|
|
||||||
|
declare var APP: Object;
|
||||||
|
declare var interfaceConfig: Object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of rules defining whether we should intercept component to render
|
* Array of rules defining whether we should intercept component to render
|
||||||
* or not.
|
* or not.
|
||||||
|
@ -56,11 +59,13 @@ const _RULES = [
|
||||||
*
|
*
|
||||||
* @param {Object|Function} stateOrGetState - Either Redux state object or
|
* @param {Object|Function} stateOrGetState - Either Redux state object or
|
||||||
* getState() function.
|
* getState() function.
|
||||||
* @param {ReactElement} currentComponent - Current route component to render.
|
* @param {ReactElement} component - Current route component to render.
|
||||||
* @returns {ReactElement} If any of rules is satisfied returns intercepted
|
* @returns {ReactElement} If any of rules is satisfied returns intercepted
|
||||||
* component.
|
* component.
|
||||||
*/
|
*/
|
||||||
export function interceptComponent(stateOrGetState, currentComponent) {
|
export function interceptComponent(
|
||||||
|
stateOrGetState: Object,
|
||||||
|
component: ReactElement<*>) {
|
||||||
let result;
|
let result;
|
||||||
const state
|
const state
|
||||||
= typeof stateOrGetState === 'function'
|
= typeof stateOrGetState === 'function'
|
||||||
|
@ -74,5 +79,5 @@ export function interceptComponent(stateOrGetState, currentComponent) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result || currentComponent;
|
return result || component;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* global $, APP */
|
/* @flow */
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect as reactReduxConnect } from 'react-redux';
|
import { connect as reactReduxConnect } from 'react-redux';
|
||||||
|
@ -8,6 +8,9 @@ import { Watermarks } from '../../base/react';
|
||||||
import { FeedbackButton } from '../../feedback';
|
import { FeedbackButton } from '../../feedback';
|
||||||
import { OverlayContainer } from '../../overlay';
|
import { OverlayContainer } from '../../overlay';
|
||||||
|
|
||||||
|
declare var $: Function;
|
||||||
|
declare var APP: Object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For legacy reasons, inline style for display none.
|
* For legacy reasons, inline style for display none.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
/* global interfaceConfig */
|
/* @flow */
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
|
declare var interfaceConfig: Object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React component representing no mobile page.
|
* React component representing no mobile app page.
|
||||||
*
|
*
|
||||||
* @class NoMobileApp
|
* @class NoMobileApp
|
||||||
*/
|
*/
|
||||||
|
@ -22,8 +25,8 @@ export default class NoMobileApp extends Component {
|
||||||
Video chat isn't available in the mobile apps
|
Video chat isn't available in the mobile apps
|
||||||
</h2>
|
</h2>
|
||||||
<p className = { `${ns}__description` }>
|
<p className = { `${ns}__description` }>
|
||||||
Please use { interfaceConfig.APP_NAME } on <br />
|
Video chat isn't available on mobile
|
||||||
Desktop top join calls.
|
Desktop to join calls.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* @flow */
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import { CHROME, CHROMIUM, FIREFOX } from './browserLinks';
|
import { CHROME, CHROMIUM, FIREFOX } from './browserLinks';
|
||||||
|
@ -16,6 +18,7 @@ export default class PluginRequiredBrowser extends Component {
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const ns = 'unsupported-desktop-browser';
|
const ns = 'unsupported-desktop-browser';
|
||||||
|
const nsLink = `${ns}__link`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = { ns }>
|
<div className = { ns }>
|
||||||
|
@ -28,13 +31,13 @@ export default class PluginRequiredBrowser extends Component {
|
||||||
however, we strongly recommend that you do that using
|
however, we strongly recommend that you do that using
|
||||||
the
|
the
|
||||||
<a
|
<a
|
||||||
className = { `${ns}__link` }
|
className = { nsLink }
|
||||||
href = { CHROME }>Chrome</a>,
|
href = { CHROME }>Chrome</a>,
|
||||||
<a
|
<a
|
||||||
className = { `${ns}__link` }
|
className = { nsLink }
|
||||||
href = { CHROMIUM }>Chromium</a> or
|
href = { CHROMIUM }>Chromium</a> or
|
||||||
<a
|
<a
|
||||||
className = { `${ns}__link` }
|
className = { nsLink }
|
||||||
href = { FIREFOX }>Firefox</a> browsers.
|
href = { FIREFOX }>Firefox</a> browsers.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* @flow */
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
|
import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
|
||||||
|
@ -8,7 +10,6 @@ import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
|
||||||
* @class UnsupportedDesktopBrowser
|
* @class UnsupportedDesktopBrowser
|
||||||
*/
|
*/
|
||||||
export default class UnsupportedDesktopBrowser extends Component {
|
export default class UnsupportedDesktopBrowser extends Component {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the component.
|
* Renders the component.
|
||||||
*
|
*
|
||||||
|
@ -16,6 +17,7 @@ export default class UnsupportedDesktopBrowser extends Component {
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const ns = 'unsupported-desktop-browser';
|
const ns = 'unsupported-desktop-browser';
|
||||||
|
const nsLink = `${ns}__link`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = { ns }>
|
<div className = { ns }>
|
||||||
|
@ -23,18 +25,18 @@ export default class UnsupportedDesktopBrowser extends Component {
|
||||||
It looks like you're using a browser we don't support.
|
It looks like you're using a browser we don't support.
|
||||||
</h2>
|
</h2>
|
||||||
<p className = { `${ns}__description` }>
|
<p className = { `${ns}__description` }>
|
||||||
Please try again with
|
Please try again with the latest version of
|
||||||
<a
|
<a
|
||||||
className = { `${ns}__link` }
|
className = { nsLink }
|
||||||
href = { CHROME } >Chrome</a>,
|
href = { CHROME } >Chrome</a>,
|
||||||
<a
|
<a
|
||||||
className = { `${ns}__link` }
|
className = { nsLink }
|
||||||
href = { FIREFOX }>Firefox</a>,
|
href = { FIREFOX }>Firefox</a>,
|
||||||
<a
|
<a
|
||||||
className = { `${ns}__link` }
|
className = { nsLink }
|
||||||
href = { SAFARI }>Safari</a> or
|
href = { SAFARI }>Safari</a> or
|
||||||
<a
|
<a
|
||||||
className = { `${ns}__link` }
|
className = { nsLink }
|
||||||
href = { IE }>IE</a>.
|
href = { IE }>IE</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* @flow */
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
@ -20,6 +22,8 @@ const _URLS = {
|
||||||
* @class UnsupportedMobileBrowser
|
* @class UnsupportedMobileBrowser
|
||||||
*/
|
*/
|
||||||
class UnsupportedMobileBrowser extends Component {
|
class UnsupportedMobileBrowser extends Component {
|
||||||
|
state: Object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UnsupportedMobileBrowser component's property types.
|
* UnsupportedMobileBrowser component's property types.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue