Comply w/ coding style
This commit is contained in:
parent
8248b14555
commit
7de5c9c1d2
|
@ -1,15 +1,15 @@
|
||||||
.landing {
|
.landing {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
padding: 35px 0;
|
padding: 35px 0;
|
||||||
|
width: 100vw;
|
||||||
|
|
||||||
&__body {
|
&__body {
|
||||||
|
color: $landingTextColor;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 75%;
|
|
||||||
max-width: 40em;
|
max-width: 40em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $landingTextColor;
|
width: 75%;
|
||||||
|
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -18,13 +18,12 @@
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
font-size: 1.8em;
|
font-size: 1.8em;
|
||||||
margin-bottom: 0.65em;
|
|
||||||
line-height: em(29px, 21px);
|
line-height: em(29px, 21px);
|
||||||
|
margin-bottom: 0.65em;
|
||||||
|
|
||||||
&_small {
|
&_small {
|
||||||
margin-top: em(21, 18);
|
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
margin-top: em(21, 18);
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
|
||||||
strong {
|
strong {
|
||||||
|
@ -34,16 +33,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&__logo {
|
&__logo {
|
||||||
width: 77px;
|
|
||||||
height: 108px;
|
height: 108px;
|
||||||
|
width: 77px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__button {
|
&__button {
|
||||||
margin: 0 auto;
|
|
||||||
border: 0;
|
border: 0;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
width: 98%;
|
margin: 0 auto;
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
|
width: 98%;
|
||||||
@include border-radius(8px);
|
@include border-radius(8px);
|
||||||
background-color: $landingButtonBgColor;
|
background-color: $landingButtonBgColor;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
@ -51,9 +50,9 @@
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
text-shadow: 0px 1px 2px $landingTextColor;
|
text-shadow: 0px 1px 2px $landingTextColor;
|
||||||
|
|
||||||
// Disable standard button effects
|
// Disable standard button effects.
|
||||||
outline: none;
|
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: $landingButtonBgColor;
|
background-color: $landingButtonBgColor;
|
||||||
|
@ -67,4 +66,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,8 +129,8 @@ $linkFontColor: #489afe;
|
||||||
$linkHoverFontColor: #287ade;
|
$linkHoverFontColor: #287ade;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Landing
|
* Landing
|
||||||
*/
|
*/
|
||||||
$primaryLandingButtonBgColor: #17a0db;
|
|
||||||
$landingButtonBgColor: #ff9a00;
|
$landingButtonBgColor: #ff9a00;
|
||||||
$landingTextColor: #4a4a4a;
|
$landingTextColor: #4a4a4a;
|
||||||
|
$primaryLandingButtonBgColor: #17a0db;
|
||||||
|
|
|
@ -1,5 +1,16 @@
|
||||||
import { Symbol } from '../base/react';
|
import { Symbol } from '../base/react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of this action sets the platform of user agent in order to decide to
|
||||||
|
* show the landing or not.
|
||||||
|
*
|
||||||
|
* {
|
||||||
|
* type: APP_SET_PLATFORM,
|
||||||
|
* platform: string
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
export const APP_SET_PLATFORM = Symbol('APP_SET_PLATFORM');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the actions which signals that a specific App will mount (in the
|
* The type of the actions which signals that a specific App will mount (in the
|
||||||
* terms of React).
|
* terms of React).
|
||||||
|
@ -21,14 +32,3 @@ export const APP_WILL_MOUNT = Symbol('APP_WILL_MOUNT');
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
export const APP_WILL_UNMOUNT = Symbol('APP_WILL_UNMOUNT');
|
export const APP_WILL_UNMOUNT = Symbol('APP_WILL_UNMOUNT');
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of this action sets the platform of user agent
|
|
||||||
* in order to decide to show the landing or not.
|
|
||||||
*
|
|
||||||
* {
|
|
||||||
* type: APP_SET_PLATFORM,
|
|
||||||
* platform: String
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
export const APP_SET_PLATFORM = Symbol('APP_SET_PLATFORM');
|
|
||||||
|
|
|
@ -118,37 +118,6 @@ export function appWillMount(app) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Detects the platform of user agent and
|
|
||||||
* signals that platform detected.
|
|
||||||
*
|
|
||||||
* @returns {Function}
|
|
||||||
*/
|
|
||||||
export function detectPlatform() {
|
|
||||||
return dispatch => {
|
|
||||||
if (detectAndroid()) {
|
|
||||||
dispatch(_setPlatform('android'));
|
|
||||||
} else if (detectIOS()) {
|
|
||||||
dispatch(_setPlatform('ios'));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Signals that user agent platform is mobile and it has
|
|
||||||
* been already detected.
|
|
||||||
*
|
|
||||||
* @param {string} platform - Mobile user agent platform.
|
|
||||||
* @returns {{type, platform: string}}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
export function _setPlatform(platform) {
|
|
||||||
return {
|
|
||||||
type: APP_SET_PLATFORM,
|
|
||||||
platform
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signals that a specific App will unmount (in the terms of React).
|
* Signals that a specific App will unmount (in the terms of React).
|
||||||
*
|
*
|
||||||
|
@ -165,6 +134,21 @@ export function appWillUnmount(app) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detects the platform of user agent and signals that platform detected.
|
||||||
|
*
|
||||||
|
* @returns {Function}
|
||||||
|
*/
|
||||||
|
export function detectPlatform() {
|
||||||
|
return dispatch => {
|
||||||
|
if (detectAndroid()) {
|
||||||
|
dispatch(_setPlatform('android'));
|
||||||
|
} else if (detectIOS()) {
|
||||||
|
dispatch(_setPlatform('ios'));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Navigates to route corresponding to current room name.
|
* Navigates to route corresponding to current room name.
|
||||||
*
|
*
|
||||||
|
@ -179,6 +163,23 @@ function _navigate(state) {
|
||||||
app._navigate(routeToRender);
|
app._navigate(routeToRender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signals that user agent platform is mobile and it has been already detected.
|
||||||
|
*
|
||||||
|
* @param {string} platform - Mobile user agent platform.
|
||||||
|
* @returns {{
|
||||||
|
* type: APP_SET_PLATFORM,
|
||||||
|
* platform: string
|
||||||
|
* }}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
function _setPlatform(platform) {
|
||||||
|
return {
|
||||||
|
type: APP_SET_PLATFORM,
|
||||||
|
platform
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets room and navigates to new route if needed.
|
* Sets room and navigates to new route if needed.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { isRoomValid } from '../base/conference';
|
import { isRoomValid } from '../base/conference';
|
||||||
import { RouteRegistry } from '../base/navigator';
|
import { RouteRegistry } from '../base/navigator';
|
||||||
|
|
||||||
import { Conference } from '../conference';
|
import { Conference } from '../conference';
|
||||||
import { WelcomePage } from '../welcome';
|
import { WelcomePage } from '../welcome';
|
||||||
|
|
||||||
|
@ -86,8 +85,8 @@ export function _getRoomAndDomainFromUrlString(url) {
|
||||||
export function _getRouteToRender(stateOrGetState) {
|
export function _getRouteToRender(stateOrGetState) {
|
||||||
const state
|
const state
|
||||||
= typeof stateOrGetState === 'function'
|
= typeof stateOrGetState === 'function'
|
||||||
? stateOrGetState()
|
? stateOrGetState()
|
||||||
: stateOrGetState;
|
: stateOrGetState;
|
||||||
const room = state['features/base/conference'].room;
|
const room = state['features/base/conference'].room;
|
||||||
const component = isRoomValid(room) ? Conference : WelcomePage;
|
const component = isRoomValid(room) ? Conference : WelcomePage;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { WelcomePage } from '../welcome';
|
||||||
|
|
||||||
const Logger = require('jitsi-meet-logger');
|
const Logger = require('jitsi-meet-logger');
|
||||||
|
|
||||||
export * from './functions.native';
|
export { _getRoomAndDomainFromUrlString } from './functions.native';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines which route is to be rendered in order to depict a specific Redux
|
* Determines which route is to be rendered in order to depict a specific Redux
|
||||||
|
|
|
@ -13,11 +13,5 @@ export function detectAndroid() {
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export function detectIOS() {
|
export function detectIOS() {
|
||||||
if (navigator.userAgent.match(/iPhone/i)
|
return Boolean(navigator.userAgent.match(/iP(ad|hone|od)/i));
|
||||||
|| navigator.userAgent.match(/iPad/i)
|
|
||||||
|| navigator.userAgent.match(/iPod/i)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
|
export * from './detectDevices';
|
||||||
export * from './loadScript';
|
export * from './loadScript';
|
||||||
export * from './roomnameGenerator';
|
export * from './roomnameGenerator';
|
||||||
export * from './detectDevices';
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import HttpConfigFetch from '../../../modules/config/HttpConfigFetch';
|
||||||
import ConferenceUrl from '../../../modules/URL/ConferenceUrl';
|
import ConferenceUrl from '../../../modules/URL/ConferenceUrl';
|
||||||
|
|
||||||
import { RouteRegistry } from '../base/navigator';
|
import { RouteRegistry } from '../base/navigator';
|
||||||
|
|
||||||
import { Conference } from './components';
|
import { Conference } from './components';
|
||||||
|
|
||||||
const logger = require('jitsi-meet-logger').getLogger(__filename);
|
const logger = require('jitsi-meet-logger').getLogger(__filename);
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
import { Symbol } from '../base/react';
|
import { Symbol } from '../base/react';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the actions which signals that a mobile landing is shown.
|
* The type of the Redux action which signals that a mobile landing is shown.
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
* type: LANDING_IS_SHOWN
|
* type: LANDING_IS_SHOWN
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
export const LANDING_IS_SHOWN = Symbol('LANDING_IS_SHOWN');
|
export const LANDING_IS_SHOWN = Symbol('LANDING_IS_SHOWN');
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router';
|
||||||
|
|
||||||
import { landingIsShown } from '../actions';
|
import { landingIsShown } from '../actions';
|
||||||
|
|
||||||
const links = {
|
const LINKS = {
|
||||||
'android': 'https://play.google.com/store/apps/details?id=org.jitsi.meet',
|
'android': 'https://play.google.com/store/apps/details?id=org.jitsi.meet',
|
||||||
'ios': ''
|
'ios': 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,10 +15,14 @@ const links = {
|
||||||
* @class Landing
|
* @class Landing
|
||||||
*/
|
*/
|
||||||
class Landing extends Component {
|
class Landing extends Component {
|
||||||
|
static propTypes = {
|
||||||
|
dispatch: React.PropTypes.func,
|
||||||
|
platform: React.PropTypes.string,
|
||||||
|
room: React.PropTypes.string
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React lifecycle method triggered after
|
* React lifecycle method triggered after component is mounted.
|
||||||
* component is mount.
|
|
||||||
*
|
*
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
@ -25,15 +30,8 @@ class Landing extends Component {
|
||||||
this.props.dispatch(landingIsShown());
|
this.props.dispatch(landingIsShown());
|
||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
|
||||||
dispatch: React.PropTypes.func,
|
|
||||||
platform: React.PropTypes.string,
|
|
||||||
room: React.PropTypes.string
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React lifecycle method triggered before
|
* React lifecycle method triggered before component will mount.
|
||||||
* component will mount.
|
|
||||||
*
|
*
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
@ -72,10 +70,10 @@ class Landing extends Component {
|
||||||
className = 'landing__logo'
|
className = 'landing__logo'
|
||||||
src = '/images/logo-blue.svg' />
|
src = '/images/logo-blue.svg' />
|
||||||
<p className = 'landing__text'>
|
<p className = 'landing__text'>
|
||||||
You need <strong>Meet Jitsi</strong> to
|
You need <strong>Jitsi Meet</strong> to join a
|
||||||
join a conversation on your mobile
|
conversation on your mobile
|
||||||
</p>
|
</p>
|
||||||
<a href = { links[platform] }>
|
<a href = { LINKS[platform] }>
|
||||||
<button
|
<button
|
||||||
className = { primaryButtonClasses }>
|
className = { primaryButtonClasses }>
|
||||||
Download the App
|
Download the App
|
||||||
|
@ -95,11 +93,20 @@ class Landing extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
/**
|
||||||
|
* Maps (parts of) the Redux state to the associated Landing's props.
|
||||||
|
*
|
||||||
|
* @param {Object} state - Redux state.
|
||||||
|
* @returns {{
|
||||||
|
* platform: string,
|
||||||
|
* room: string
|
||||||
|
* }}
|
||||||
|
*/
|
||||||
|
function mapStateToProps(state) {
|
||||||
return {
|
return {
|
||||||
platform: state['features/app'].platform,
|
platform: state['features/app'].platform,
|
||||||
room: state['features/base/conference'].room
|
room: state['features/base/conference'].room
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps)(Landing);
|
export default connect(mapStateToProps)(Landing);
|
||||||
|
|
|
@ -9,9 +9,9 @@ ReducerRegistry.register('features/landing', (state = {}, action) => {
|
||||||
...state,
|
...state,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag that shows that mobile landing shown shown.
|
* Flag that shows that mobile landing is shown.
|
||||||
*
|
*
|
||||||
* @type {App}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
landingIsShown: true
|
landingIsShown: true
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { RouteRegistry } from '../base/navigator';
|
import { RouteRegistry } from '../base/navigator';
|
||||||
|
|
||||||
import { Landing } from './components';
|
import { Landing } from './components';
|
||||||
|
|
||||||
RouteRegistry.register({
|
RouteRegistry.register({
|
||||||
|
|
Loading…
Reference in New Issue