mirror of https://github.com/jitsi/jitsi-meet
parent
0e47f72b5f
commit
9fae488070
@ -1,29 +0,0 @@ |
||||
// @flow
|
||||
|
||||
import React from 'react'; |
||||
import WebView from 'react-native-webview'; |
||||
|
||||
import JitsiScreen from './JitsiScreen'; |
||||
|
||||
type Props = { |
||||
|
||||
/** |
||||
* The URL to display. |
||||
*/ |
||||
source: string, |
||||
|
||||
/** |
||||
* The component's external style. |
||||
*/ |
||||
style: Object |
||||
} |
||||
|
||||
const JitsiScreenWebView = ({ source, style }: Props) => ( |
||||
<JitsiScreen |
||||
disableForcedKeyboardDismiss = { true } |
||||
style = { style }> |
||||
<WebView source = {{ uri: source }} /> |
||||
</JitsiScreen> |
||||
); |
||||
|
||||
export default JitsiScreenWebView; |
@ -1,85 +0,0 @@ |
||||
/* eslint-disable lines-around-comment */ |
||||
|
||||
import React, { PureComponent } from 'react'; |
||||
|
||||
import { IReduxState } from '../../../app/types'; |
||||
// @ts-ignore
|
||||
import JitsiScreenWebView from '../../../base/modal/components/JitsiScreenWebView'; |
||||
import { connect } from '../../../base/redux/functions'; |
||||
// @ts-ignore
|
||||
import { renderArrowBackButton } |
||||
// @ts-ignore
|
||||
from '../../../mobile/navigation/components/welcome/functions'; |
||||
|
||||
// @ts-ignore
|
||||
import styles from './styles'; |
||||
|
||||
|
||||
const DEFAULT_HELP_CENTRE_URL = 'https://web-cdn.jitsi.net/faq/meet-faq.html'; |
||||
|
||||
interface IProps { |
||||
|
||||
/** |
||||
* 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<IProps> { |
||||
/** |
||||
* Implements React's {@link Component#componentDidMount()}. Invoked |
||||
* immediately after mounting occurs. |
||||
* |
||||
* @inheritdoc |
||||
* @returns {void} |
||||
*/ |
||||
componentDidMount() { |
||||
const { |
||||
navigation |
||||
} = this.props; |
||||
|
||||
// @ts-ignore
|
||||
navigation.setOptions({ |
||||
headerLeft: () => |
||||
renderArrowBackButton(() => |
||||
// @ts-ignore
|
||||
navigation.goBack()) |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Implements {@code PureComponent#render()}. |
||||
* |
||||
* @inheritdoc |
||||
* @returns {ReactElement} |
||||
*/ |
||||
render() { |
||||
return ( |
||||
<JitsiScreenWebView |
||||
source = { this.props._url } |
||||
style = { styles.screenContainer } /> |
||||
); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Maps part of the Redux state to the props of this component. |
||||
* |
||||
* @param {Object} state - The Redux state. |
||||
* @returns {IProps} |
||||
*/ |
||||
function _mapStateToProps(state: IReduxState) { |
||||
return { |
||||
_url: state['features/base/config'].helpCentreURL || DEFAULT_HELP_CENTRE_URL |
||||
}; |
||||
} |
||||
|
||||
export default connect(_mapStateToProps)(HelpView); |
@ -1,48 +0,0 @@ |
||||
/* eslint-disable lines-around-comment */ |
||||
|
||||
import React, { useEffect } from 'react'; |
||||
|
||||
// @ts-ignore
|
||||
import JitsiScreenWebView from '../../../base/modal/components/JitsiScreenWebView'; |
||||
// @ts-ignore
|
||||
import { renderArrowBackButton } |
||||
// @ts-ignore
|
||||
from '../../../mobile/navigation/components/welcome/functions'; |
||||
|
||||
// @ts-ignore
|
||||
import styles from './styles'; |
||||
|
||||
|
||||
interface IProps { |
||||
|
||||
/** |
||||
* 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 }: IProps) => { |
||||
|
||||
useEffect(() => { |
||||
// @ts-ignore
|
||||
navigation.setOptions({ |
||||
headerLeft: () => |
||||
renderArrowBackButton(() => |
||||
// @ts-ignore
|
||||
navigation.goBack()) |
||||
}); |
||||
}); |
||||
|
||||
return ( |
||||
<JitsiScreenWebView |
||||
source = { PRIVACY_URL } |
||||
style = { styles.screenContainer } /> |
||||
); |
||||
}; |
||||
|
||||
export default PrivacyView; |
@ -1,48 +0,0 @@ |
||||
/* eslint-disable lines-around-comment */ |
||||
|
||||
import React, { useEffect } from 'react'; |
||||
|
||||
// @ts-ignore
|
||||
import JitsiScreenWebView from '../../../base/modal/components/JitsiScreenWebView'; |
||||
// @ts-ignore
|
||||
import { renderArrowBackButton } |
||||
// @ts-ignore
|
||||
from '../../../mobile/navigation/components/welcome/functions'; |
||||
|
||||
// @ts-ignore
|
||||
import styles from './styles'; |
||||
|
||||
|
||||
interface IProps { |
||||
|
||||
/** |
||||
* Default prop for navigating between screen components(React Navigation). |
||||
*/ |
||||
navigation: Object; |
||||
} |
||||
|
||||
/** |
||||
* The URL at which the terms (of service/use) are available to the user. |
||||
*/ |
||||
const TERMS_URL = 'https://jitsi.org/meet/terms'; |
||||
|
||||
const TermsView = ({ navigation }: IProps) => { |
||||
|
||||
useEffect(() => { |
||||
// @ts-ignore
|
||||
navigation.setOptions({ |
||||
headerLeft: () => |
||||
renderArrowBackButton(() => |
||||
// @ts-ignore
|
||||
navigation.goBack()) |
||||
}); |
||||
}); |
||||
|
||||
return ( |
||||
<JitsiScreenWebView |
||||
source = { TERMS_URL } |
||||
style = { styles.screenContainer } /> |
||||
); |
||||
}; |
||||
|
||||
export default TermsView; |
Loading…
Reference in new issue