extends Component {
_mounted: ?boolean;
/**
@@ -64,7 +64,7 @@ export class AbstractWelcomePage extends Component {
*
* @inheritdoc
*/
- static getDerivedStateFromProps(props: Props, state: Object) {
+ static getDerivedStateFromProps(props: P, state: Object) {
return {
room: props._room || state.room
};
@@ -99,7 +99,7 @@ export class AbstractWelcomePage extends Component {
* @param {Props} props - The React {@code Component} props to initialize
* the new {@code AbstractWelcomePage} instance with.
*/
- constructor(props: Props) {
+ constructor(props: P) {
super(props);
// Bind event handlers so they are only bound once per instance.
diff --git a/react/features/welcome/components/CustomDrawerContent.js b/react/features/welcome/components/CustomDrawerContent.js
new file mode 100644
index 0000000000..7f637b67e5
--- /dev/null
+++ b/react/features/welcome/components/CustomDrawerContent.js
@@ -0,0 +1,67 @@
+// @flow
+
+import { DrawerItemList } from '@react-navigation/drawer';
+import React from 'react';
+import { ScrollView, Text, View } from 'react-native';
+import { SafeAreaView } from 'react-native-safe-area-context';
+
+import { Avatar } from '../../base/avatar';
+import {
+ getLocalParticipant, getParticipantDisplayName
+} from '../../base/participants';
+import { connect } from '../../base/redux';
+
+import styles, { DRAWER_AVATAR_SIZE } from './styles';
+
+type Props = {
+
+ /**
+ * Local participant name to be displayed.
+ */
+ displayName: string,
+
+ /**
+ * The ID of the local participant.
+ */
+ localParticipantId: string
+};
+
+const CustomDrawerContent = (props: Props) => (
+
+
+
+
+ { props.displayName }
+
+
+
+
+
+
+);
+
+/**
+ * Maps (parts of) the redux state to the React {@code Component} props.
+ *
+ * @param {Object} state - The redux state.
+ * @protected
+ * @returns {Props}
+ */
+function mapStateToProps(state: Object) {
+ const localParticipant = getLocalParticipant(state);
+ const localParticipantId = localParticipant?.id;
+ const displayName = localParticipant && getParticipantDisplayName(state, localParticipantId);
+
+ return {
+ displayName,
+ localParticipantId
+ };
+}
+
+export default connect(mapStateToProps)(CustomDrawerContent);
diff --git a/react/features/welcome/components/RootNavigationContainer.js b/react/features/welcome/components/RootNavigationContainer.js
new file mode 100644
index 0000000000..22f56442d2
--- /dev/null
+++ b/react/features/welcome/components/RootNavigationContainer.js
@@ -0,0 +1,74 @@
+// @flow
+
+import { NavigationContainer } from '@react-navigation/native';
+import { createStackNavigator } from '@react-navigation/stack';
+import React from 'react';
+import { SafeAreaProvider } from 'react-native-safe-area-context';
+
+import { connect } from '../../base/redux';
+import {
+ dialInSummaryScreenOptions,
+ drawerNavigatorScreenOptions,
+ navigationContainerTheme
+} from '../../conference/components/native/ConferenceNavigatorScreenOptions';
+import { screen } from '../../conference/components/native/routes';
+import { DialInSummary } from '../../invite';
+import { isWelcomePageAppEnabled } from '../functions.native';
+
+import BlankPage from './BlankPage';
+import { rootNavigationRef } from './RootNavigationContainerRef';
+import WelcomePageNavigationContainer from './WelcomePageNavigationContainer';
+
+const RootStack = createStackNavigator();
+
+
+type Props = {
+
+ /**
+ * Is welcome page available?
+ */
+ isWelcomePageAvailable: boolean
+}
+
+
+const RootNavigationContainer = ({ isWelcomePageAvailable }: Props) => (
+
+
+
+ {
+ isWelcomePageAvailable
+ ?
+ :
+ }
+
+
+
+
+);
+
+/**
+ * Maps part of the Redux store to the props of this component.
+ *
+ * @param {Object} state - The Redux state.
+ * @returns {Props}
+ */
+function mapStateToProps(state: Object) {
+ return {
+ isWelcomePageAvailable: isWelcomePageAppEnabled(state)
+ };
+}
+
+export default connect(mapStateToProps)(RootNavigationContainer);
+
diff --git a/react/features/welcome/components/RootNavigationContainerRef.js b/react/features/welcome/components/RootNavigationContainerRef.js
new file mode 100644
index 0000000000..f2623af8a4
--- /dev/null
+++ b/react/features/welcome/components/RootNavigationContainerRef.js
@@ -0,0 +1,19 @@
+// @flow
+
+import React from 'react';
+
+// $FlowExpectedError
+export const rootNavigationRef = React.createRef();
+
+/**
+ * User defined navigation action included inside the reference to the container.
+ *
+ * @param {string} name - Destination name of the route that has been defined somewhere.
+ * @param {Object} params - Params to pass to the destination route.
+ * @returns {Function}
+ */
+export function navigate(name: string, params: Object) {
+ // $FlowExpectedError
+ return rootNavigationRef.current?.navigate(name, params);
+}
+
diff --git a/react/features/welcome/components/SideBarItem.js b/react/features/welcome/components/SideBarItem.js
deleted file mode 100644
index f693aeeb2b..0000000000
--- a/react/features/welcome/components/SideBarItem.js
+++ /dev/null
@@ -1,101 +0,0 @@
-// @flow
-
-import React, { Component } from 'react';
-import { Linking, Text, TouchableOpacity, View } from 'react-native';
-
-import { translate } from '../../base/i18n';
-import { Icon } from '../../base/icons';
-
-import styles from './styles';
-
-type Props = {
-
- /**
- * The icon of the item.
- */
- icon: Object,
-
- /**
- * The i18n label of the item.
- */
- label: string,
-
- /**
- * The function to be invoked when the item is pressed
- * if the item is a button.
- */
- onPress: Function,
-
- /**
- * The translate function.
- */
- t: Function,
-
- /**
- * The URL of the link, if this item is a link.
- */
- url: string
-};
-
-/**
- * A component rendering an item in the system sidebar.
- */
-class SideBarItem extends Component {
-
- /**
- * Initializes a new {@code SideBarItem} instance.
- *
- * @inheritdoc
- */
- constructor(props: Props) {
- super(props);
-
- // Bind event handlers so they are only bound once per instance.
- this._onOpenURL = this._onOpenURL.bind(this);
- }
-
- /**
- * Implements React's {@link Component#render()}, renders the sidebar item.
- *
- * @inheritdoc
- * @returns {ReactElement}
- */
- render() {
- const { label, onPress, t } = this.props;
- const onPressCalculated
- = typeof onPress === 'function' ? onPress : this._onOpenURL;
-
- return (
-
-
-
-
- { t(label) }
-
-
-
- );
- }
-
- _onOpenURL: () => void;
-
- /**
- * Opens the URL if one is provided.
- *
- * @private
- * @returns {void}
- */
- _onOpenURL() {
- const { url } = this.props;
-
- if (typeof url === 'string') {
- Linking.openURL(url);
- }
- }
-}
-
-export default translate(SideBarItem);
diff --git a/react/features/welcome/components/WelcomePage.native.js b/react/features/welcome/components/WelcomePage.native.js
index cb2924cceb..887ca7fb36 100644
--- a/react/features/welcome/components/WelcomePage.native.js
+++ b/react/features/welcome/components/WelcomePage.native.js
@@ -1,7 +1,9 @@
+// @flow
+
+import { DrawerActions } from '@react-navigation/native';
import React from 'react';
import {
Animated,
- Keyboard,
SafeAreaView,
TextInput,
TouchableHighlight,
@@ -14,7 +16,8 @@ import { ColorSchemeRegistry } from '../../base/color-scheme';
import { translate } from '../../base/i18n';
import { Icon, IconMenu, IconWarning } from '../../base/icons';
import { MEDIA_TYPE } from '../../base/media';
-import { Header, LoadingIndicator, Text } from '../../base/react';
+import JitsiStatusBar from '../../base/modal/components/JitsiStatusBar';
+import { LoadingIndicator, Text } from '../../base/react';
import { connect } from '../../base/redux';
import { ColorPalette } from '../../base/styles';
import {
@@ -22,41 +25,63 @@ import {
destroyLocalDesktopTrackIfExists,
destroyLocalTracks
} from '../../base/tracks';
-import { HelpView } from '../../help';
-import { DialInSummary } from '../../invite';
-import { SettingsView } from '../../settings/components';
-import { setSideBarVisible } from '../actions';
import {
AbstractWelcomePage,
- _mapStateToProps as _abstractMapStateToProps
+ _mapStateToProps as _abstractMapStateToProps,
+ type Props as AbstractProps
} from './AbstractWelcomePage';
import LocalVideoTrackUnderlay from './LocalVideoTrackUnderlay';
import VideoSwitch from './VideoSwitch';
import WelcomePageLists from './WelcomePageLists';
-import WelcomePageSideBar from './WelcomePageSideBar';
import styles, { PLACEHOLDER_TEXT_COLOR } from './styles';
+
+type Props = AbstractProps & {
+
+ /**
+ * The color schemed style of the Header component.
+ */
+ _headerStyles: Object,
+
+ /**
+ * Default prop for navigating between screen components(React Navigation).
+ */
+ navigation: Object,
+
+ /**
+ * Default prop for navigating between screen components(React Navigation).
+ */
+ route: Object,
+
+ /**
+ * The translate function.
+ */
+ t: Function
+};
+
/**
* The native container rendering the welcome page.
*
* @augments AbstractWelcomePage
*/
-class WelcomePage extends AbstractWelcomePage {
+class WelcomePage extends AbstractWelcomePage<*> {
/**
* Constructor of the Component.
*
* @inheritdoc
*/
- constructor(props) {
+ constructor(props: Props) {
super(props);
+ // $FlowExpectedError
this.state._fieldFocused = false;
+
+ // $FlowExpectedError
this.state.hintBoxAnimation = new Animated.Value(0);
// Bind event handlers so they are only bound once per instance.
this._onFieldFocusChange = this._onFieldFocusChange.bind(this);
- this._onShowSideBar = this._onShowSideBar.bind(this);
this._renderHintBox = this._renderHintBox.bind(this);
// Specially bind functions to avoid function definition on render.
@@ -64,6 +89,16 @@ class WelcomePage extends AbstractWelcomePage {
this._onFieldFocus = this._onFieldFocusChange.bind(this, true);
}
+ _onFieldBlur: () => void;
+
+ _onFieldFocus: () => void;
+
+ _onJoin: () => void;
+
+ _onRoomChange: (string) => void;
+
+ _updateRoomname: () => void;
+
/**
* Implements React's {@link Component#componentDidMount()}. Invoked
* immediately after mounting occurs. Creates a local video track if none
@@ -77,7 +112,29 @@ class WelcomePage extends AbstractWelcomePage {
this._updateRoomname();
- const { dispatch } = this.props;
+ const {
+ _headerStyles,
+ dispatch,
+ navigation
+ } = this.props;
+
+ navigation.setOptions({
+ headerLeft: () => (
+
+ navigation.dispatch(DrawerActions.openDrawer()) }
+ style = { styles.drawerNavigationIcon }>
+
+
+ ),
+ // eslint-disable-next-line react/no-multi-comp
+ headerRight: () =>
+
+ });
if (this.props._settings.startAudioOnly) {
dispatch(destroyLocalTracks());
@@ -153,11 +210,14 @@ class WelcomePage extends AbstractWelcomePage {
styles.messageContainer,
styles.hintContainer,
{
+ // $FlowExpectedError
opacity: this.state.hintBoxAnimation
}
];
}
+ _onFieldFocusChange: (boolean) => void;
+
/**
* Callback for when the room field's focus changes so the hint box
* must be rendered or removed.
@@ -169,6 +229,7 @@ class WelcomePage extends AbstractWelcomePage {
_onFieldFocusChange(focused) {
if (focused) {
// Stop placeholder animation.
+ // $FlowExpectedError
this._clearTimeouts();
this.setState({
_fieldFocused: true,
@@ -180,29 +241,28 @@ class WelcomePage extends AbstractWelcomePage {
}
Animated.timing(
+
+ // $FlowExpectedError
this.state.hintBoxAnimation,
+
+ // $FlowExpectedError
{
duration: 300,
toValue: focused ? 1 : 0
})
.start(animationState =>
+
+ // $FlowExpectedError
animationState.finished
- && !focused
+
+ // $FlowExpectedError
+ && !focused
&& this.setState({
_fieldFocused: false
}));
}
- /**
- * Toggles the side bar.
- *
- * @private
- * @returns {void}
- */
- _onShowSideBar() {
- Keyboard.dismiss();
- this.props.dispatch(setSideBarVisible(true));
- }
+ _renderHintBox: () => React$Element;
/**
* Renders the hint box if necessary.
@@ -211,9 +271,10 @@ class WelcomePage extends AbstractWelcomePage {
* @returns {React$Node}
*/
_renderHintBox() {
- if (this.state._fieldFocused) {
- const { t } = this.props;
+ const { t } = this.props;
+ // $FlowExpectedError
+ if (this.state._fieldFocused) {
return (
@@ -283,51 +344,48 @@ class WelcomePage extends AbstractWelcomePage {
const { _headerStyles, t } = this.props;
return (
-
-
-
-
-
-
- { t('welcomepage.roomname') }
-
-
- {
- this._renderInsecureRoomNameWarning()
- }
- {
- this._renderHintBox()
- }
-
-
-
-
-
- { this._renderWelcomePageModals() }
-
+ <>
+
+
+
+
+
+
+ { t('welcomepage.roomname') }
+
+ {/* // $FlowExpectedError*/}
+
+ {
+
+ // $FlowExpectedError
+ this._renderInsecureRoomNameWarning()
+ }
+ {
+ this._renderHintBox()
+ }
+
+
+ {/* $FlowExpectedError*/}
+
+
+
+ >
);
}
@@ -347,19 +405,6 @@ class WelcomePage extends AbstractWelcomePage {
);
}
-
- /**
- * Renders JitsiModals that are supposed to be on the welcome page.
- *
- * @returns {Array}
- */
- _renderWelcomePageModals() {
- return [
- ,
- ,
-
- ];
- }
}
/**
diff --git a/react/features/welcome/components/WelcomePageNavigationContainer.js b/react/features/welcome/components/WelcomePageNavigationContainer.js
new file mode 100644
index 0000000000..ba8b516f1e
--- /dev/null
+++ b/react/features/welcome/components/WelcomePageNavigationContainer.js
@@ -0,0 +1,73 @@
+// @flow
+
+import { createDrawerNavigator } from '@react-navigation/drawer';
+import React from 'react';
+import { useTranslation } from 'react-i18next';
+
+import {
+ helpScreenOptions,
+ settingsScreenOptions,
+ termsAndPrivacyScreenOptions,
+ welcomeScreenOptions
+} from '../../conference/components/native/ConferenceNavigatorScreenOptions';
+import { screen } from '../../conference/components/native/routes';
+import HelpView from '../components/help/components/HelpView';
+import PrivacyView from '../components/privacy/components/PrivacyView';
+import SettingsView from '../components/settings/components/SettingsView';
+import TermsView from '../components/terms/components/TermsView';
+
+import CustomDrawerContent from './CustomDrawerContent';
+import WelcomePage from './WelcomePage.native';
+import { drawerContentOptions } from './constants';
+import styles from './styles';
+
+const DrawerStack = createDrawerNavigator();
+
+
+const WelcomePageNavigationContainer = () => {
+ const { t } = useTranslation();
+
+ return (
+ }
+ drawerContentOptions = { drawerContentOptions }
+ drawerStyle = { styles.drawerStyle }>
+
+
+
+
+
+
+ );
+};
+
+export default WelcomePageNavigationContainer;
+
diff --git a/react/features/welcome/components/WelcomePageSideBar.native.js b/react/features/welcome/components/WelcomePageSideBar.native.js
deleted file mode 100644
index 26f5ed348b..0000000000
--- a/react/features/welcome/components/WelcomePageSideBar.native.js
+++ /dev/null
@@ -1,182 +0,0 @@
-// @flow
-
-import React, { Component } from 'react';
-import { SafeAreaView, ScrollView, Text } from 'react-native';
-
-import { Avatar } from '../../base/avatar';
-import { IconInfo, IconSettings, IconHelp } from '../../base/icons';
-import { setActiveModalId } from '../../base/modal';
-import {
- getLocalParticipant,
- getParticipantDisplayName
-} from '../../base/participants';
-import {
- Header,
- SlidingView
-} from '../../base/react';
-import { connect } from '../../base/redux';
-import { HELP_VIEW_MODAL_ID } from '../../help';
-import { SETTINGS_VIEW_ID } from '../../settings/constants';
-import { setSideBarVisible } from '../actions';
-
-import SideBarItem from './SideBarItem';
-import styles, { SIDEBAR_AVATAR_SIZE } from './styles';
-
-/**
- * The URL at which the privacy policy is available to the user.
- */
-const PRIVACY_URL = 'https://jitsi.org/meet/privacy';
-
-/**
- * The URL at which the terms (of service/use) are available to the user.
- */
-const TERMS_URL = 'https://jitsi.org/meet/terms';
-
-type Props = {
-
- /**
- * Redux dispatch action.
- */
- dispatch: Function,
-
- /**
- * Display name of the local participant.
- */
- _displayName: ?string,
-
- /**
- * ID of the local participant.
- */
- _localParticipantId: ?string,
-
- /**
- * Sets the side bar visible or hidden.
- */
- _visible: boolean
-};
-
-/**
- * A component rendering a welcome page sidebar.
- */
-class WelcomePageSideBar extends Component {
- /**
- * Constructs a new SideBar instance.
- *
- * @inheritdoc
- */
- constructor(props: Props) {
- super(props);
-
- // Bind event handlers so they are only bound once per instance.
- this._onHideSideBar = this._onHideSideBar.bind(this);
- this._onOpenHelpPage = this._onOpenHelpPage.bind(this);
- this._onOpenSettings = this._onOpenSettings.bind(this);
- }
-
- /**
- * Implements React's {@link Component#render()}, renders the sidebar.
- *
- * @inheritdoc
- * @returns {ReactElement}
- */
- render() {
- return (
-
-
-
-
- { this.props._displayName }
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-
- _onHideSideBar: () => void;
-
- /**
- * Invoked when the sidebar has closed itself (e.g. Overlay pressed).
- *
- * @private
- * @returns {void}
- */
- _onHideSideBar() {
- this.props.dispatch(setSideBarVisible(false));
- }
-
- _onOpenHelpPage: () => void;
-
- /**
- * Shows the {@link HelpView}.
- *
- * @returns {void}
- */
- _onOpenHelpPage() {
- const { dispatch } = this.props;
-
- dispatch(setSideBarVisible(false));
- dispatch(setActiveModalId(HELP_VIEW_MODAL_ID));
- }
-
- _onOpenSettings: () => void;
-
- /**
- * Shows the {@link SettingsView}.
- *
- * @private
- * @returns {void}
- */
- _onOpenSettings() {
- const { dispatch } = this.props;
-
- dispatch(setSideBarVisible(false));
- dispatch(setActiveModalId(SETTINGS_VIEW_ID));
- }
-}
-
-/**
- * Maps (parts of) the redux state to the React {@code Component} props.
- *
- * @param {Object} state - The redux state.
- * @protected
- * @returns {Props}
- */
-function _mapStateToProps(state: Object) {
- const _localParticipant = getLocalParticipant(state);
- const _localParticipantId = _localParticipant?.id;
- const _displayName = _localParticipant && getParticipantDisplayName(state, _localParticipantId);
-
- return {
- _displayName,
- _localParticipantId,
- _visible: state['features/welcome'].sideBarVisible
- };
-}
-
-export default connect(_mapStateToProps)(WelcomePageSideBar);
diff --git a/react/features/welcome/components/constants.js b/react/features/welcome/components/constants.js
new file mode 100644
index 0000000000..6b9bf353a2
--- /dev/null
+++ b/react/features/welcome/components/constants.js
@@ -0,0 +1,12 @@
+// @flow
+
+import BaseTheme from '../../base/ui/components/BaseTheme';
+
+
+export const drawerContentOptions = {
+ activeBackgroundColor: BaseTheme.palette.ui12,
+ activeTintColor: BaseTheme.palette.screen01Header,
+ labelStyle: {
+ marginLeft: BaseTheme.spacing[2]
+ }
+};
diff --git a/react/features/welcome/components/help/components/HelpView.js b/react/features/welcome/components/help/components/HelpView.js
new file mode 100644
index 0000000000..4c30116cfe
--- /dev/null
+++ b/react/features/welcome/components/help/components/HelpView.js
@@ -0,0 +1,83 @@
+// @flow
+
+import React, { PureComponent } from 'react';
+
+import JitsiScreenWebView from '../../../../base/modal/components/JitsiScreenWebView';
+import JitsiStatusBar from '../../../../base/modal/components/JitsiStatusBar';
+import { connect } from '../../../../base/redux';
+import { screen } from '../../../../conference/components/native/routes';
+import { renderArrowBackButton } from '../../../../welcome/functions.native';
+
+
+import styles from './styles';
+
+
+const DEFAULT_HELP_CENTRE_URL = 'https://web-cdn.jitsi.net/faq/meet-faq.html';
+
+type Props = {
+
+ /**
+ * The URL to display in the Help Centre.
+ */
+ _url: string,
+
+ /**
+ * Default prop for navigating between screen components(React Navigation).
+ */
+ navigation: Object
+}
+
+/**
+ * Implements a page that renders the help content for the app.
+ */
+class HelpView extends PureComponent {
+ /**
+ * Implements React's {@link Component#componentDidMount()}. Invoked
+ * immediately after mounting occurs.
+ *
+ * @inheritdoc
+ * @returns {void}
+ */
+ componentDidMount() {
+ const {
+ navigation
+ } = this.props;
+
+ navigation.setOptions({
+ headerLeft: () =>
+ renderArrowBackButton(() =>
+ navigation.jumpTo(screen.welcome.main))
+ });
+ }
+
+ /**
+ * Implements {@code PureComponent#render()}.
+ *
+ * @inheritdoc
+ * @returns {ReactElement}
+ */
+ render() {
+ return (
+ <>
+
+
+ >
+ );
+ }
+}
+
+/**
+ * Maps part of the Redux state to the props of this component.
+ *
+ * @param {Object} state - The Redux state.
+ * @returns {Props}
+ */
+function _mapStateToProps(state) {
+ return {
+ _url: state['features/base/config'].helpCentreURL || DEFAULT_HELP_CENTRE_URL
+ };
+}
+
+export default connect(_mapStateToProps)(HelpView);
diff --git a/react/features/welcome/components/help/components/styles.js b/react/features/welcome/components/help/components/styles.js
new file mode 100644
index 0000000000..b5e764d3e6
--- /dev/null
+++ b/react/features/welcome/components/help/components/styles.js
@@ -0,0 +1,12 @@
+/**
+ * The styles of the native components of the feature {@code settings}.
+ */
+export default {
+
+ /**
+ * Style for screen container.
+ */
+ helpViewContainer: {
+ flex: 1
+ }
+};
diff --git a/react/features/welcome/components/privacy/components/PrivacyView.js b/react/features/welcome/components/privacy/components/PrivacyView.js
new file mode 100644
index 0000000000..44c300cae7
--- /dev/null
+++ b/react/features/welcome/components/privacy/components/PrivacyView.js
@@ -0,0 +1,46 @@
+// @flow
+
+import React, { useEffect } from 'react';
+
+import JitsiScreenWebView from '../../../../base/modal/components/JitsiScreenWebView';
+import JitsiStatusBar from '../../../../base/modal/components/JitsiStatusBar';
+import { screen } from '../../../../conference/components/native/routes';
+import { renderArrowBackButton } from '../../../../welcome/functions.native';
+
+import styles from './styles';
+
+
+type Props = {
+
+ /**
+ * Default prop for navigating between screen components(React Navigation).
+ */
+ navigation: Object
+}
+
+/**
+ * The URL at which the privacy policy is available to the user.
+ */
+const PRIVACY_URL = 'https://jitsi.org/meet/privacy';
+
+const PrivacyView = ({ navigation }: Props) => {
+
+ useEffect(() => {
+ navigation.setOptions({
+ headerLeft: () =>
+ renderArrowBackButton(() =>
+ navigation.jumpTo(screen.welcome.main))
+ });
+ });
+
+ return (
+ <>
+
+
+ >
+ );
+};
+
+export default PrivacyView;
diff --git a/react/features/welcome/components/privacy/components/styles.js b/react/features/welcome/components/privacy/components/styles.js
new file mode 100644
index 0000000000..87cfee4547
--- /dev/null
+++ b/react/features/welcome/components/privacy/components/styles.js
@@ -0,0 +1,12 @@
+/**
+ * The styles of the native components of the feature {@code privacy}.
+ */
+export default {
+
+ /**
+ * Style for screen container.
+ */
+ privacyViewContainer: {
+ flex: 1
+ }
+};
diff --git a/react/features/settings/components/native/FormRow.js b/react/features/welcome/components/settings/components/FormRow.js
similarity index 98%
rename from react/features/settings/components/native/FormRow.js
rename to react/features/welcome/components/settings/components/FormRow.js
index a91c4d5d5f..5a2c89c050 100644
--- a/react/features/settings/components/native/FormRow.js
+++ b/react/features/welcome/components/settings/components/FormRow.js
@@ -3,7 +3,7 @@
import React, { Component } from 'react';
import { Text, View } from 'react-native';
-import { translate } from '../../../base/i18n';
+import { translate } from '../../../../base/i18n';
import styles, { ANDROID_UNDERLINE_COLOR, PLACEHOLDER_COLOR } from './styles';
diff --git a/react/features/settings/components/native/FormSectionAccordion.js b/react/features/welcome/components/settings/components/FormSectionAccordion.js
similarity index 93%
rename from react/features/settings/components/native/FormSectionAccordion.js
rename to react/features/welcome/components/settings/components/FormSectionAccordion.js
index 7997196c5a..d0b23c5bef 100644
--- a/react/features/settings/components/native/FormSectionAccordion.js
+++ b/react/features/welcome/components/settings/components/FormSectionAccordion.js
@@ -3,8 +3,8 @@
import React, { useCallback, useState } from 'react';
import { List } from 'react-native-paper';
-import { translate } from '../../../base/i18n';
-import { Icon, IconArrowDown, IconArrowUp } from '../../../base/icons';
+import { translate } from '../../../../base/i18n';
+import { Icon, IconArrowDown, IconArrowUp } from '../../../../base/icons';
import styles from './styles';
diff --git a/react/features/settings/components/native/SettingsView.js b/react/features/welcome/components/settings/components/SettingsView.js
similarity index 90%
rename from react/features/settings/components/native/SettingsView.js
rename to react/features/welcome/components/settings/components/SettingsView.js
index 2fa7b39531..f6e6619cbb 100644
--- a/react/features/settings/components/native/SettingsView.js
+++ b/react/features/welcome/components/settings/components/SettingsView.js
@@ -1,19 +1,25 @@
// @flow
import React from 'react';
-import { Alert, NativeModules, ScrollView, Text } from 'react-native';
+import {
+ Alert,
+ NativeModules,
+ ScrollView,
+ Text
+} from 'react-native';
import { Divider, Switch, TextInput, withTheme } from 'react-native-paper';
-import { translate } from '../../../base/i18n';
-import { JitsiModal } from '../../../base/modal';
-import { connect } from '../../../base/redux';
-import { SETTINGS_VIEW_ID } from '../../constants';
-import { normalizeUserInputURL, isServerURLChangeEnabled } from '../../functions';
+import { translate } from '../../../../base/i18n';
+import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
+import { connect } from '../../../../base/redux';
+import { screen } from '../../../../conference/components/native/routes';
import {
AbstractSettingsView,
_mapStateToProps as _abstractMapStateToProps,
type Props as AbstractProps
-} from '../AbstractSettingsView';
+} from '../../../../settings/components/AbstractSettingsView';
+import { normalizeUserInputURL, isServerURLChangeEnabled } from '../../../../settings/functions';
+import { renderArrowBackButton } from '../../../../welcome/functions.native';
import FormRow from './FormRow';
import FormSectionAccordion from './FormSectionAccordion';
@@ -80,6 +86,11 @@ type Props = AbstractProps & {
*/
_serverURLChangeEnabled: boolean,
+ /**
+ * Default prop for navigating between screen components(React Navigation).
+ */
+ navigation: Object,
+
/**
* Theme used for styles.
*/
@@ -133,6 +144,25 @@ class SettingsView extends AbstractSettingsView {
this._showURLAlert = this._showURLAlert.bind(this);
}
+ /**
+ * Implements React's {@link Component#componentDidMount()}. Invoked
+ * immediately after mounting occurs.
+ *
+ * @inheritdoc
+ * @returns {void}
+ */
+ componentDidMount() {
+ const {
+ navigation
+ } = this.props;
+
+ navigation.setOptions({
+ headerLeft: () =>
+ renderArrowBackButton(() =>
+ navigation.jumpTo(screen.welcome.main))
+ });
+ }
+
/**
* Implements React's {@link Component#render()}, renders the settings page.
*
@@ -153,12 +183,8 @@ class SettingsView extends AbstractSettingsView {
const { palette } = this.props.theme;
return (
-
+
{
textContentType = { 'name' } // iOS only
theme = {{
colors: {
- primary: palette.action01Active,
+ primary: palette.screen01Header,
underlineColor: 'transparent'
}
}}
@@ -194,7 +220,7 @@ class SettingsView extends AbstractSettingsView {
textContentType = { 'emailAddress' } // iOS only
theme = {{
colors: {
- primary: palette.action01Active,
+ primary: palette.screen01Header,
underlineColor: 'transparent'
}
}}
@@ -219,7 +245,7 @@ class SettingsView extends AbstractSettingsView {
textContentType = { 'URL' } // iOS only
theme = {{
colors: {
- primary: palette.action01Active,
+ primary: palette.screen01Header,
underlineColor: 'transparent'
}
}}
@@ -230,7 +256,7 @@ class SettingsView extends AbstractSettingsView {
@@ -238,7 +264,7 @@ class SettingsView extends AbstractSettingsView {
@@ -262,7 +288,7 @@ class SettingsView extends AbstractSettingsView {
@@ -271,7 +297,7 @@ class SettingsView extends AbstractSettingsView {
@@ -282,13 +308,13 @@ class SettingsView extends AbstractSettingsView {
)}
-
+