diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index 7e0e9a25f..d71054c9f 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -2,6 +2,5 @@
diff --git a/lang/main.json b/lang/main.json
index 3e840984d..6870d1617 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -47,13 +47,15 @@
},
"welcomepage":{
"appDescription": "Go ahead, video chat with the whole team. In fact, invite everyone you know. __app__ is a fully encrypted, 100% open source video conferencing solution that you can use all day, every day, for free — with no account needed.",
+ "audioOnlyLabel": "Voice",
"go": "GO",
"join": "JOIN",
"privacy": "Privacy",
"roomname": "Enter room name",
"sendFeedback": "Send feedback",
"terms": "Terms",
- "title": "More secure, more flexible, and completely free video conferencing"
+ "title": "More secure, more flexible, and completely free video conferencing",
+ "videoEnabledLabel": "Video"
},
"startupoverlay": {
"policyText": " ",
@@ -500,7 +502,7 @@
"title": "Call info",
"tooltip": "Get access info about the meeting"
},
- "profileModal": {
+ "settingsScreen": {
"alertOk": "OK",
"alertTitle": "Warning",
"alertURLText": "The entered server URL is invalid",
diff --git a/react/features/app-settings/actionTypes.js b/react/features/app-settings/actionTypes.js
index 08f2ce70c..36c7e0b12 100644
--- a/react/features/app-settings/actionTypes.js
+++ b/react/features/app-settings/actionTypes.js
@@ -1,6 +1,6 @@
/**
* The type of (redux) action which signals the request
- * to hide the app settings modal.
+ * to hide the app settings screen.
*
* {
* type: HIDE_APP_SETTINGS
@@ -10,7 +10,7 @@ export const HIDE_APP_SETTINGS = Symbol('HIDE_APP_SETTINGS');
/**
* The type of (redux) action which signals the request
- * to show the app settings modal where available.
+ * to show the app settings screen where available.
*
* {
* type: SHOW_APP_SETTINGS
diff --git a/react/features/app-settings/actions.js b/react/features/app-settings/actions.js
index a18cc2a77..f446570ec 100644
--- a/react/features/app-settings/actions.js
+++ b/react/features/app-settings/actions.js
@@ -3,7 +3,7 @@
import { HIDE_APP_SETTINGS, SHOW_APP_SETTINGS } from './actionTypes';
/**
- * Redux-signals the request to hide the app settings modal.
+ * Redux-signals the request to hide the app settings screen.
*
* @returns {{
* type: HIDE_APP_SETTINGS
@@ -16,7 +16,7 @@ export function hideAppSettings() {
}
/**
- * Redux-signals the request to open the app settings modal.
+ * Redux-signals the request to open the app settings screen.
*
* @returns {{
* type: SHOW_APP_SETTINGS
diff --git a/react/features/app-settings/components/AbstractAppSettings.js b/react/features/app-settings/components/AbstractAppSettings.js
index 38e64810d..70e0147ee 100644
--- a/react/features/app-settings/components/AbstractAppSettings.js
+++ b/react/features/app-settings/components/AbstractAppSettings.js
@@ -9,11 +9,6 @@ import { getProfile, updateProfile } from '../../base/profile';
*/
type Props = {
- /**
- * The current aspect ratio of the screen.
- */
- _aspectRatio: Symbol,
-
/**
* The current profile object.
*/
@@ -25,7 +20,7 @@ type Props = {
_serverURL: string,
/**
- * The visibility prop of the settings modal.
+ * The visibility prop of the settings screen.
*/
_visible: boolean,
@@ -173,7 +168,6 @@ export function _mapStateToProps(state: Object) {
const _profile = getProfile(state);
return {
- _aspectRatio: state['features/base/responsive-ui'].aspectRatio,
_profile,
_serverURL,
_visible: state['features/app-settings'].visible
diff --git a/react/features/app-settings/components/AppSettings.native.js b/react/features/app-settings/components/AppSettings.native.js
index db3393871..86040846a 100644
--- a/react/features/app-settings/components/AppSettings.native.js
+++ b/react/features/app-settings/components/AppSettings.native.js
@@ -4,6 +4,7 @@ import React from 'react';
import {
Alert,
Modal,
+ SafeAreaView,
ScrollView,
Switch,
Text,
@@ -13,16 +14,15 @@ import {
import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
-import { getSafetyOffset, isIPad } from '../../base/react';
-import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui';
+import { Header } from '../../base/react';
+import { PlatformElements } from '../../base/styles';
-import { _mapStateToProps, AbstractAppSettings } from './AbstractAppSettings';
import { hideAppSettings } from '../actions';
-import BackButton from './BackButton.native';
-import FormRow from './FormRow.native';
-import FormSectionHeader from './FormSectionHeader.native';
import { normalizeUserInputURL } from '../functions';
-import styles, { HEADER_PADDING } from './styles';
+
+import { BackButton, FormRow, FormSectionHeader } from './_';
+import { _mapStateToProps, AbstractAppSettings } from './AbstractAppSettings';
+import styles from './styles';
/**
* The native container rendering the app settings page.
@@ -40,7 +40,6 @@ class AppSettings extends AbstractAppSettings {
constructor(props) {
super(props);
- this._getSafetyPadding = this._getSafetyPadding.bind(this);
this._onBlurServerURL = this._onBlurServerURL.bind(this);
this._onRequestClose = this._onRequestClose.bind(this);
this._setURLFieldReference = this._setURLFieldReference.bind(this);
@@ -56,110 +55,91 @@ class AppSettings extends AbstractAppSettings {
render() {
const { _profile, t } = this.props;
- // FIXME: presentationStyle is added to workaround orientation issue on
- // iOS
-
return (
-
-
-
- { t('profileModal.header') }
-
+
+
+
+
+ { t('settingsScreen.header') }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
);
}
- _getSafetyPadding: () => Object;
-
- /**
- * Calculates header safety padding for mobile devices. See comment in
- * functions.js.
- *
- * @private
- * @returns {Object}
- */
- _getSafetyPadding() {
- if (isIPad() || this.props._aspectRatio === ASPECT_RATIO_NARROW) {
- const safeOffset = Math.max(getSafetyOffset(), HEADER_PADDING);
-
- return {
- paddingTop: safeOffset
- };
- }
-
- return undefined;
- }
-
_onBlurServerURL: () => void;
/**
@@ -183,8 +163,6 @@ class AppSettings extends AbstractAppSettings {
_onStartVideoMutedChange: (boolean) => void;
- _onRequestClose: () => void;
-
/**
* Processes the server URL. It normalizes it and an error alert is
* displayed in case it's incorrect.
@@ -208,6 +186,8 @@ class AppSettings extends AbstractAppSettings {
}
}
+ _onRequestClose: () => void;
+
/**
* Handles the back button.
* Also invokes normalizeUserInputURL to validate the URL entered
@@ -243,12 +223,12 @@ class AppSettings extends AbstractAppSettings {
const { t } = this.props;
Alert.alert(
- t('profileModal.alertTitle'),
- t('profileModal.alertURLText'),
+ t('settingsScreen.alertTitle'),
+ t('settingsScreen.alertURLText'),
[
{
onPress: () => this._urlField.focus(),
- text: t('profileModal.alertOk')
+ text: t('settingsScreen.alertOk')
}
]
);
diff --git a/react/features/app-settings/components/FormSectionHeader.native.js b/react/features/app-settings/components/FormSectionHeader.native.js
deleted file mode 100644
index e4756f617..000000000
--- a/react/features/app-settings/components/FormSectionHeader.native.js
+++ /dev/null
@@ -1,117 +0,0 @@
-// @flow
-
-import React, { Component } from 'react';
-import { Text, View } from 'react-native';
-import { connect } from 'react-redux';
-
-import { translate } from '../../base/i18n';
-import { getSafetyOffset } from '../../base/react';
-import { ASPECT_RATIO_WIDE } from '../../base/responsive-ui';
-
-import styles, { CONTAINER_PADDING } from './styles';
-
-/**
- * The type of the React {@code Component} props of {@link FormSectionHeader}
- */
-type Props = {
-
- /**
- * The current aspect ratio of the screen.
- */
- _aspectRatio: Symbol,
-
- /**
- * The i18n key of the text label of the section.
- */
- i18nLabel: string,
-
- /**
- * An external style object passed to the component.
- */
- style: Object,
-
- /**
- * Invoked to obtain translated strings.
- */
- t: Function
-}
-
-/**
- * Implements a React {@code Component} which renders a section header on a
- * form. This calculates the available safe view as well.
- */
-class FormSectionHeader extends Component {
- /**
- * Initializes a new {@code FormSectionHeader} instance.
- *
- * @param {Object} props - Component properties.
- */
- constructor(props) {
- super(props);
-
- this._getSafetyMargin = this._getSafetyMargin.bind(this);
- }
-
- /**
- * Implements React's {@link Component#render()}.
- *
- * @inheritdoc
- * @override
- * @returns {ReactElement}
- */
- render() {
- const { t } = this.props;
-
- return (
-
-
- { t(this.props.i18nLabel) }
-
-
- );
- }
-
- _getSafetyMargin: () => Object;
-
- /**
- * Calculates the safety margin for this header. See comment in
- * functions.js.
- *
- * @private
- * @returns {Object}
- */
- _getSafetyMargin() {
- if (this.props._aspectRatio === ASPECT_RATIO_WIDE) {
- const safeOffset
- = Math.max(getSafetyOffset() - CONTAINER_PADDING, 0);
-
- return {
- marginLeft: safeOffset,
- marginRight: safeOffset
- };
- }
-
- return undefined;
- }
-}
-
-/**
- * Maps (parts of) the redux state to the React {@code Component} props of
- * {@code FormSectionHeader}.
- *
- * @param {Object} state - The redux state.
- * @protected
- * @returns {Object}
- */
-export function _mapStateToProps(state: Object) {
- return {
- _aspectRatio: state['features/base/responsive-ui'].aspectRatio
- };
-}
-
-export default translate(connect(_mapStateToProps)(FormSectionHeader));
diff --git a/react/features/app-settings/components/_.native.js b/react/features/app-settings/components/_.native.js
new file mode 100644
index 000000000..738c4d2b8
--- /dev/null
+++ b/react/features/app-settings/components/_.native.js
@@ -0,0 +1 @@
+export * from './native';
diff --git a/react/features/base/react/functions.web.js b/react/features/app-settings/components/_.web.js
similarity index 100%
rename from react/features/base/react/functions.web.js
rename to react/features/app-settings/components/_.web.js
diff --git a/react/features/app-settings/components/BackButton.native.js b/react/features/app-settings/components/native/BackButton.js
similarity index 84%
rename from react/features/app-settings/components/BackButton.native.js
rename to react/features/app-settings/components/native/BackButton.js
index 717ef99cb..e1889a45a 100644
--- a/react/features/app-settings/components/BackButton.native.js
+++ b/react/features/app-settings/components/native/BackButton.js
@@ -3,9 +3,8 @@
import React, { Component } from 'react';
import { TouchableOpacity } from 'react-native';
-import { Icon } from '../../base/font-icons';
-
-import styles from './styles';
+import { Icon } from '../../../base/font-icons';
+import { PlatformElements } from '../../../base/styles';
/**
* The type of the React {@code Component} props of {@link BackButton}
@@ -20,7 +19,7 @@ type Props = {
/**
* An external style object passed to the component.
*/
- style: Object
+ style?: Object
};
/**
@@ -41,7 +40,7 @@ export default class BackButton extends Component {
diff --git a/react/features/app-settings/components/FormRow.native.js b/react/features/app-settings/components/native/FormRow.js
similarity index 71%
rename from react/features/app-settings/components/FormRow.native.js
rename to react/features/app-settings/components/native/FormRow.js
index ffd2f35aa..461a71647 100644
--- a/react/features/app-settings/components/FormRow.native.js
+++ b/react/features/app-settings/components/native/FormRow.js
@@ -2,24 +2,16 @@
import React, { Component } from 'react';
import { Text, View } from 'react-native';
-import { connect } from 'react-redux';
-import { translate } from '../../base/i18n';
-import { getSafetyOffset } from '../../base/react';
-import { ASPECT_RATIO_WIDE } from '../../base/responsive-ui';
+import { translate } from '../../../base/i18n';
-import styles, { ANDROID_UNDERLINE_COLOR, CONTAINER_PADDING } from './styles';
+import styles, { ANDROID_UNDERLINE_COLOR } from './styles';
/**
* The type of the React {@code Component} props of {@link FormRow}
*/
type Props = {
- /**
- * The current aspect ratio of the screen.
- */
- _aspectRatio: Symbol,
-
/**
*
*/
@@ -80,7 +72,10 @@ class FormRow extends Component {
-
+
{ t(this.props.i18nLabel) }
@@ -122,8 +117,7 @@ class FormRow extends Component {
_getRowStyle: () => Array