|
|
@@ -7,14 +7,11 @@ import { type Dispatch } from 'redux';
|
|
7
|
7
|
|
|
8
|
8
|
import { openDialog } from '../../../../base/dialog';
|
|
9
|
9
|
import { translate } from '../../../../base/i18n';
|
|
10
|
|
-import {
|
|
11
|
|
- HeaderWithNavigation,
|
|
12
|
|
- LoadingIndicator,
|
|
13
|
|
- SlidingView
|
|
14
|
|
-} from '../../../../base/react';
|
|
|
10
|
+import { JitsiModal, setActiveModalId } from '../../../../base/modal';
|
|
|
11
|
+import { LoadingIndicator } from '../../../../base/react';
|
|
15
|
12
|
import { connect } from '../../../../base/redux';
|
|
16
|
13
|
|
|
17
|
|
-import { hideDialInSummary } from '../../../actions';
|
|
|
14
|
+import { DIAL_IN_SUMMARY_VIEW_ID } from '../../../constants';
|
|
18
|
15
|
import { getDialInfoPageURLForURIString } from '../../../functions';
|
|
19
|
16
|
|
|
20
|
17
|
import DialInSummaryErrorDialog from './DialInSummaryErrorDialog';
|
|
|
@@ -43,7 +40,6 @@ class DialInSummary extends Component<Props> {
|
|
43
|
40
|
constructor(props: Props) {
|
|
44
|
41
|
super(props);
|
|
45
|
42
|
|
|
46
|
|
- this._onCloseView = this._onCloseView.bind(this);
|
|
47
|
43
|
this._onError = this._onError.bind(this);
|
|
48
|
44
|
this._onNavigate = this._onNavigate.bind(this);
|
|
49
|
45
|
this._renderLoading = this._renderLoading.bind(this);
|
|
|
@@ -58,43 +54,23 @@ class DialInSummary extends Component<Props> {
|
|
58
|
54
|
const { _summaryUrl } = this.props;
|
|
59
|
55
|
|
|
60
|
56
|
return (
|
|
61
|
|
- <SlidingView
|
|
62
|
|
- onHide = { this._onCloseView }
|
|
63
|
|
- position = 'bottom'
|
|
64
|
|
- show = { Boolean(_summaryUrl) } >
|
|
65
|
|
- <View style = { styles.webViewWrapper }>
|
|
66
|
|
- <HeaderWithNavigation
|
|
67
|
|
- headerLabelKey = 'info.label'
|
|
68
|
|
- onPressBack = { this._onCloseView } />
|
|
69
|
|
- <WebView
|
|
70
|
|
- onError = { this._onError }
|
|
71
|
|
- onShouldStartLoadWithRequest = { this._onNavigate }
|
|
72
|
|
- renderLoading = { this._renderLoading }
|
|
73
|
|
- source = {{ uri: getDialInfoPageURLForURIString(_summaryUrl) }}
|
|
74
|
|
- startInLoadingState = { true }
|
|
75
|
|
- style = { styles.webView } />
|
|
76
|
|
- </View>
|
|
77
|
|
- </SlidingView>
|
|
|
57
|
+ <JitsiModal
|
|
|
58
|
+ headerProps = {{
|
|
|
59
|
+ headerLabelKey: 'info.label'
|
|
|
60
|
+ }}
|
|
|
61
|
+ modalId = { DIAL_IN_SUMMARY_VIEW_ID }
|
|
|
62
|
+ style = { styles.backDrop } >
|
|
|
63
|
+ <WebView
|
|
|
64
|
+ onError = { this._onError }
|
|
|
65
|
+ onShouldStartLoadWithRequest = { this._onNavigate }
|
|
|
66
|
+ renderLoading = { this._renderLoading }
|
|
|
67
|
+ source = {{ uri: getDialInfoPageURLForURIString(_summaryUrl) }}
|
|
|
68
|
+ startInLoadingState = { true }
|
|
|
69
|
+ style = { styles.webView } />
|
|
|
70
|
+ </JitsiModal>
|
|
78
|
71
|
);
|
|
79
|
72
|
}
|
|
80
|
73
|
|
|
81
|
|
- _onCloseView: () => boolean;
|
|
82
|
|
-
|
|
83
|
|
- /**
|
|
84
|
|
- * Closes the view.
|
|
85
|
|
- *
|
|
86
|
|
- * @returns {boolean}
|
|
87
|
|
- */
|
|
88
|
|
- _onCloseView() {
|
|
89
|
|
- if (this.props._summaryUrl) {
|
|
90
|
|
- this.props.dispatch(hideDialInSummary());
|
|
91
|
|
-
|
|
92
|
|
- return true;
|
|
93
|
|
- }
|
|
94
|
|
-
|
|
95
|
|
- return false;
|
|
96
|
|
- }
|
|
97
|
|
-
|
|
98
|
74
|
_onError: () => void;
|
|
99
|
75
|
|
|
100
|
76
|
/**
|
|
|
@@ -103,7 +79,7 @@ class DialInSummary extends Component<Props> {
|
|
103
|
79
|
* @returns {void}
|
|
104
|
80
|
*/
|
|
105
|
81
|
_onError() {
|
|
106
|
|
- this.props.dispatch(hideDialInSummary());
|
|
|
82
|
+ this.props.dispatch(setActiveModalId());
|
|
107
|
83
|
this.props.dispatch(openDialog(DialInSummaryErrorDialog));
|
|
108
|
84
|
}
|
|
109
|
85
|
|
|
|
@@ -122,7 +98,8 @@ class DialInSummary extends Component<Props> {
|
|
122
|
98
|
|
|
123
|
99
|
if (url.startsWith('tel:')) {
|
|
124
|
100
|
Linking.openURL(url);
|
|
125
|
|
- this.props.dispatch(hideDialInSummary());
|
|
|
101
|
+
|
|
|
102
|
+ this.props.dispatch(setActiveModalId());
|
|
126
|
103
|
}
|
|
127
|
104
|
|
|
128
|
105
|
return url === getDialInfoPageURLForURIString(this.props._summaryUrl);
|
|
|
@@ -156,7 +133,7 @@ class DialInSummary extends Component<Props> {
|
|
156
|
133
|
*/
|
|
157
|
134
|
function _mapStateToProps(state) {
|
|
158
|
135
|
return {
|
|
159
|
|
- _summaryUrl: state['features/invite'].summaryUrl
|
|
|
136
|
+ _summaryUrl: (state['features/base/modal'].modalProps || {}).summaryUrl
|
|
160
|
137
|
};
|
|
161
|
138
|
}
|
|
162
|
139
|
|