瀏覽代碼

feat(dialog) start recording/live stream screens, new AlertDialog

master
Calin Chitu 3 年之前
父節點
當前提交
8a6b6f2942
共有 22 個文件被更改,包括 389 次插入339 次删除
  1. 1
    0
      lang/main.json
  2. 26
    11
      react/features/base/dialog/components/native/AlertDialog.js
  3. 0
    99
      react/features/base/dialog/components/native/BaseDialog.js
  4. 0
    97
      react/features/base/dialog/components/native/BaseSubmitDialog.js
  5. 1
    2
      react/features/base/dialog/components/native/ConfirmDialog.js
  6. 0
    29
      react/features/base/dialog/components/native/CustomSubmitDialog.js
  7. 0
    1
      react/features/base/dialog/components/native/index.js
  8. 0
    29
      react/features/base/dialog/components/native/styles.js
  9. 17
    0
      react/features/mobile/navigation/components/conference/components/ConferenceNavigationContainer.js
  10. 2
    0
      react/features/mobile/navigation/routes.js
  11. 14
    0
      react/features/mobile/navigation/screenOptions.js
  12. 17
    13
      react/features/recording/components/LiveStream/AbstractLiveStreamButton.js
  13. 34
    2
      react/features/recording/components/LiveStream/native/LiveStreamButton.js
  14. 52
    19
      react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js
  15. 17
    3
      react/features/recording/components/LiveStream/native/styles.js
  16. 29
    1
      react/features/recording/components/LiveStream/web/LiveStreamButton.js
  17. 12
    6
      react/features/recording/components/Recording/AbstractRecordButton.js
  18. 1
    1
      react/features/recording/components/Recording/AbstractStartRecordingDialog.js
  19. 34
    2
      react/features/recording/components/Recording/native/RecordButton.js
  20. 76
    16
      react/features/recording/components/Recording/native/StartRecordingDialog.js
  21. 30
    7
      react/features/recording/components/Recording/styles.native.js
  22. 26
    1
      react/features/recording/components/Recording/web/RecordButton.js

+ 1
- 0
lang/main.json 查看文件

367
         "shareYourScreenDisabled": "Screen sharing disabled.",
367
         "shareYourScreenDisabled": "Screen sharing disabled.",
368
         "sharedVideoDialogError": "Error: Invalid URL",
368
         "sharedVideoDialogError": "Error: Invalid URL",
369
         "sharedVideoLinkPlaceholder": "YouTube link or direct video link",
369
         "sharedVideoLinkPlaceholder": "YouTube link or direct video link",
370
+        "start": "Start ",
370
         "startLiveStreaming": "Start live stream",
371
         "startLiveStreaming": "Start live stream",
371
         "startRecording": "Start recording",
372
         "startRecording": "Start recording",
372
         "startRemoteControlErrorMessage": "An error occurred while trying to start the remote control session!",
373
         "startRemoteControlErrorMessage": "An error occurred while trying to start the remote control session!",

+ 26
- 11
react/features/base/dialog/components/native/AlertDialog.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
-import { Text } from 'react-native';
4
+import { View } from 'react-native';
5
+import Dialog from 'react-native-dialog';
5
 
6
 
6
 import { translate } from '../../../i18n';
7
 import { translate } from '../../../i18n';
7
 import { connect } from '../../../redux';
8
 import { connect } from '../../../redux';
8
 import { _abstractMapStateToProps } from '../../functions';
9
 import { _abstractMapStateToProps } from '../../functions';
10
+import AbstractDialog, { type Props as AbstractProps } from '../AbstractDialog';
9
 import { renderHTML } from '../functions.native';
11
 import { renderHTML } from '../functions.native';
10
 
12
 
11
-import { type Props as AbstractProps } from './BaseDialog';
12
-import BaseSubmitDialog from './BaseSubmitDialog';
13
 
13
 
14
 type Props = AbstractProps & {
14
 type Props = AbstractProps & {
15
 
15
 
21
      * {@code translate(string, Object)} for more details.
21
      * {@code translate(string, Object)} for more details.
22
      */
22
      */
23
     contentKey: string | { key: string, params: Object},
23
     contentKey: string | { key: string, params: Object},
24
+
25
+    /**
26
+     * Translation function.
27
+     */
28
+    t: Function
24
 };
29
 };
25
 
30
 
26
 /**
31
 /**
27
- * Implements an alert dialog, to simply show an error or a message, then disappear on dismiss.
32
+ * Implements an alert dialog, to simply show an error or a message,
33
+ * then disappear on dismiss.
28
  */
34
  */
29
-class AlertDialog extends BaseSubmitDialog<Props, *> {
35
+class AlertDialog extends AbstractDialog<Props> {
30
     /**
36
     /**
31
-     * Implements {@code BaseSubmitDialog._renderSubmittable}.
37
+     * Implements React's {@link Component#render}.
32
      *
38
      *
33
      * @inheritdoc
39
      * @inheritdoc
34
      */
40
      */
35
-    _renderSubmittable() {
36
-        const { _dialogStyles, contentKey, t } = this.props;
41
+    render() {
42
+        const { contentKey, t } = this.props;
37
         const content
43
         const content
38
             = typeof contentKey === 'string'
44
             = typeof contentKey === 'string'
39
                 ? t(contentKey)
45
                 ? t(contentKey)
40
                 : renderHTML(t(contentKey.key, contentKey.params));
46
                 : renderHTML(t(contentKey.key, contentKey.params));
41
 
47
 
42
         return (
48
         return (
43
-            <Text style = { _dialogStyles.text }>
44
-                { content }
45
-            </Text>
49
+            <View>
50
+                <Dialog.Container visible = { true }>
51
+                    <Dialog.Description>
52
+                        { content }
53
+                    </Dialog.Description>
54
+                    <Dialog.Button
55
+                        label = { t('dialog.Ok') }
56
+                        onPress = { this._onSubmit } />
57
+                </Dialog.Container>
58
+            </View>
46
         );
59
         );
47
     }
60
     }
61
+
62
+    _onSubmit: () => boolean;
48
 }
63
 }
49
 
64
 
50
 export default translate(connect(_abstractMapStateToProps)(AlertDialog));
65
 export default translate(connect(_abstractMapStateToProps)(AlertDialog));

+ 0
- 99
react/features/base/dialog/components/native/BaseDialog.js 查看文件

1
-// @flow
2
-
3
-import React from 'react';
4
-import {
5
-    KeyboardAvoidingView,
6
-    Text,
7
-    TouchableOpacity,
8
-    TouchableWithoutFeedback,
9
-    View
10
-} from 'react-native';
11
-
12
-import { Icon, IconClose } from '../../../icons';
13
-import { StyleType } from '../../../styles';
14
-import AbstractDialog, {
15
-    type Props as AbstractProps,
16
-    type State
17
-} from '../AbstractDialog';
18
-
19
-import { brandedDialog as styles } from './styles';
20
-
21
-export type Props = AbstractProps & {
22
-
23
-    /**
24
-     * The color-schemed stylesheet of the feature.
25
-     */
26
-    _dialogStyles: StyleType,
27
-
28
-    t: Function
29
-}
30
-
31
-/**
32
- * Component to render a custom dialog.
33
- */
34
-class BaseDialog<P: Props, S: State> extends AbstractDialog<P, S> {
35
-    /**
36
-     * Initializes a new {@code FeedbackDialog} instance.
37
-     *
38
-     * @inheritdoc
39
-     */
40
-    constructor(props: P) {
41
-        super(props);
42
-
43
-        this._onSubmit = this._onSubmit.bind(this);
44
-    }
45
-
46
-    /**
47
-     * Implements React's {@link Component#render()}.
48
-     *
49
-     * @inheritdoc
50
-     * @returns {ReactElement}
51
-     */
52
-    render() {
53
-        const { _dialogStyles, style, t, titleKey } = this.props;
54
-
55
-        return (
56
-            <TouchableWithoutFeedback>
57
-                <KeyboardAvoidingView
58
-                    behavior = 'height'
59
-                    style = { [
60
-                        styles.overlay
61
-                    ] }>
62
-                    <View
63
-                        pointerEvents = 'box-none'
64
-                        style = { [
65
-                            _dialogStyles.dialog,
66
-                            style
67
-                        ] }>
68
-                        <View style = { styles.headerWrapper }>
69
-                            <Text style = { styles.dialogTitle }>
70
-                                { titleKey ? t(titleKey) : ' ' }
71
-                            </Text>
72
-                            <TouchableOpacity
73
-                                onPress = { this._onCancel }
74
-                                style = { styles.closeWrapper }>
75
-                                <Icon
76
-                                    src = { IconClose }
77
-                                    style = { _dialogStyles.closeStyle } />
78
-                            </TouchableOpacity>
79
-                        </View>
80
-                        { this._renderContent() }
81
-                    </View>
82
-                </KeyboardAvoidingView>
83
-            </TouchableWithoutFeedback>
84
-        );
85
-    }
86
-
87
-    _onCancel: () => void;
88
-
89
-    _onSubmit: ?string => boolean;
90
-
91
-    /**
92
-     * Renders the content of the dialog.
93
-     *
94
-     * @returns {ReactElement}
95
-     */
96
-    _renderContent: () => Object;
97
-}
98
-
99
-export default BaseDialog;

+ 0
- 97
react/features/base/dialog/components/native/BaseSubmitDialog.js 查看文件

1
-// @flow
2
-
3
-import React from 'react';
4
-import { View, Text, TouchableOpacity } from 'react-native';
5
-
6
-import { StyleType } from '../../../styles';
7
-
8
-import BaseDialog, { type Props as BaseProps } from './BaseDialog';
9
-import {
10
-    brandedDialog
11
-} from './styles';
12
-
13
-type Props = BaseProps & {
14
-
15
-    /**
16
-     * The color-schemed stylesheet of the feature.
17
-     */
18
-    _dialogStyles: StyleType,
19
-
20
-    t: Function
21
-}
22
-
23
-/**
24
- * Abstract dialog to submit something. E.g. A confirmation or a form.
25
- */
26
-class BaseSubmitDialog<P: Props, S: *> extends BaseDialog<P, S> {
27
-    /**
28
-     * Returns the title key of the submit button.
29
-     *
30
-     * NOTE: Please do not change this, this should be consistent across the
31
-     * application. This method is here to be able to be overridden ONLY by the
32
-     * {@code ConfirmDialog}.
33
-     *
34
-     * @returns {string}
35
-     */
36
-    _getSubmitButtonKey() {
37
-        return this.props.okKey || 'dialog.Ok';
38
-    }
39
-
40
-    /**
41
-     * Renders additional buttons, if any - may be overwritten by children.
42
-     *
43
-     * @returns {?ReactElement}
44
-     */
45
-    _renderAdditionalButtons() {
46
-        return null;
47
-    }
48
-
49
-    /**
50
-     * Implements {@code BaseDialog._renderContent}.
51
-     *
52
-     * @inheritdoc
53
-     */
54
-    _renderContent() {
55
-        const { _dialogStyles, t } = this.props;
56
-        const additionalButtons = this._renderAdditionalButtons();
57
-
58
-        return (
59
-            <View>
60
-                <View style = { brandedDialog.mainWrapper }>
61
-                    { this._renderSubmittable() }
62
-                </View>
63
-                <View style = { brandedDialog.buttonWrapper }>
64
-                    { additionalButtons }
65
-                    <TouchableOpacity
66
-                        disabled = { this.props.okDisabled }
67
-                        onPress = { this._onSubmit }
68
-                        style = { [
69
-                            _dialogStyles.button,
70
-                            additionalButtons
71
-                                ? null : brandedDialog.buttonFarLeft,
72
-                            brandedDialog.buttonFarRight
73
-                        ] }>
74
-                        <Text style = { _dialogStyles.buttonLabel }>
75
-                            { t(this._getSubmitButtonKey()) }
76
-                        </Text>
77
-                    </TouchableOpacity>
78
-                </View>
79
-            </View>
80
-        );
81
-    }
82
-
83
-    _onCancel: () => void;
84
-
85
-    _onSubmit: () => boolean;
86
-
87
-    /** .
88
-     * Renders the actual content of the dialog defining what is about to be
89
-     * submitted. E.g. A simple confirmation (text, properly wrapped) or a
90
-     * complex form.
91
-     *
92
-     * @returns {Object}
93
-     */
94
-    _renderSubmittable: () => Object;
95
-}
96
-
97
-export default BaseSubmitDialog;

+ 1
- 2
react/features/base/dialog/components/native/ConfirmDialog.js 查看文件

135
 
135
 
136
         return (
136
         return (
137
             <View>
137
             <View>
138
-                <Dialog.Container
139
-                    visible = { true }>
138
+                <Dialog.Container visible = { true }>
140
                     {
139
                     {
141
                         title && <Dialog.Title>
140
                         title && <Dialog.Title>
142
                             { t(title) }
141
                             { t(title) }

+ 0
- 29
react/features/base/dialog/components/native/CustomSubmitDialog.js 查看文件

1
-// @flow
2
-
3
-import { translate } from '../../../i18n';
4
-import { connect } from '../../../redux';
5
-import { _abstractMapStateToProps } from '../../functions';
6
-
7
-import { type Props as BaseProps } from './BaseDialog';
8
-import BaseSubmitDialog from './BaseSubmitDialog';
9
-
10
-type Props = BaseProps & {
11
-    t: Function
12
-}
13
-
14
-/**
15
- * Implements a submit dialog component that can have free content.
16
- */
17
-class CustomSubmitDialog extends BaseSubmitDialog<Props, *> {
18
-    /**
19
-     * Implements {@code BaseSubmitDialog._renderSubmittable}.
20
-     *
21
-     * @inheritdoc
22
-     */
23
-    _renderSubmittable() {
24
-        return this.props.children;
25
-    }
26
-}
27
-
28
-export default translate(
29
-    connect(_abstractMapStateToProps)(CustomSubmitDialog));

+ 0
- 1
react/features/base/dialog/components/native/index.js 查看文件

5
 export { default as DialogContainer } from './DialogContainer';
5
 export { default as DialogContainer } from './DialogContainer';
6
 export { default as AlertDialog } from './AlertDialog';
6
 export { default as AlertDialog } from './AlertDialog';
7
 export { default as InputDialog } from './InputDialog';
7
 export { default as InputDialog } from './InputDialog';
8
-export { default as CustomSubmitDialog } from './CustomSubmitDialog';
9
 
8
 
10
 // NOTE: Some dialogs reuse the style of these base classes for consistency
9
 // NOTE: Some dialogs reuse the style of these base classes for consistency
11
 // and as we're in a /native namespace, it's safe to export the styles.
10
 // and as we're in a /native namespace, it's safe to export the styles.

+ 0
- 29
react/features/base/dialog/components/native/styles.js 查看文件

55
 };
55
 };
56
 
56
 
57
 export default {
57
 export default {
58
-
59
     dialogButton: {
58
     dialogButton: {
60
         ...BaseTheme.typography.labelButton
59
         ...BaseTheme.typography.labelButton
61
     },
60
     },
76
         fontWeight: 'bold'
75
         fontWeight: 'bold'
77
     },
76
     },
78
 
77
 
79
-    buttonFarLeft: {
80
-        borderBottomLeftRadius: BORDER_RADIUS
81
-    },
82
-
83
     buttonFarRight: {
78
     buttonFarRight: {
84
         borderBottomRightRadius: BORDER_RADIUS
79
         borderBottomRightRadius: BORDER_RADIUS
85
     },
80
     },
90
         flexDirection: 'row'
85
         flexDirection: 'row'
91
     },
86
     },
92
 
87
 
93
-    closeWrapper: {
94
-        padding: BoxModel.padding
95
-    },
96
-
97
-    dialogTitle: {
98
-        fontWeight: 'bold',
99
-        paddingLeft: BoxModel.padding * 2
100
-    },
101
-
102
-    headerWrapper: {
103
-        alignItems: 'center',
104
-        flexDirection: 'row',
105
-        justifyContent: 'space-between'
106
-    },
107
-
108
     mainWrapper: {
88
     mainWrapper: {
109
         alignSelf: 'stretch',
89
         alignSelf: 'stretch',
110
         padding: BoxModel.padding * 2,
90
         padding: BoxModel.padding * 2,
114
         paddingBottom: BoxModel.padding * 3
94
         paddingBottom: BoxModel.padding * 3
115
     },
95
     },
116
 
96
 
117
-    overlay: {
118
-        ...StyleSheet.absoluteFillObject,
119
-        alignItems: 'center',
120
-        backgroundColor: 'rgba(127, 127, 127, 0.6)',
121
-        flexDirection: 'row',
122
-        justifyContent: 'center',
123
-        padding: 30
124
-    },
125
-
126
     overlayTouchable: {
97
     overlayTouchable: {
127
         ...StyleSheet.absoluteFillObject
98
         ...StyleSheet.absoluteFillObject
128
     }
99
     }

+ 17
- 0
react/features/mobile/navigation/components/conference/components/ConferenceNavigationContainer.js 查看文件

15
     from '../../../../../invite/components/add-people-dialog/native/AddPeopleDialog';
15
     from '../../../../../invite/components/add-people-dialog/native/AddPeopleDialog';
16
 import LobbyScreen from '../../../../../lobby/components/native/LobbyScreen';
16
 import LobbyScreen from '../../../../../lobby/components/native/LobbyScreen';
17
 import { ParticipantsPane } from '../../../../../participants-pane/components/native';
17
 import { ParticipantsPane } from '../../../../../participants-pane/components/native';
18
+import { StartLiveStreamDialog } from '../../../../../recording';
19
+import { StartRecordingDialog }
20
+    from '../../../../../recording/components/Recording/native';
18
 import SecurityDialog
21
 import SecurityDialog
19
     from '../../../../../security/components/security-dialog/native/SecurityDialog';
22
     from '../../../../../security/components/security-dialog/native/SecurityDialog';
20
 import SpeakerStats
23
 import SpeakerStats
24
     chatScreenOptions,
27
     chatScreenOptions,
25
     conferenceScreenOptions,
28
     conferenceScreenOptions,
26
     inviteScreenOptions,
29
     inviteScreenOptions,
30
+    liveStreamScreenOptions,
27
     lobbyScreenOptions,
31
     lobbyScreenOptions,
28
     navigationContainerTheme,
32
     navigationContainerTheme,
29
     participantsScreenOptions,
33
     participantsScreenOptions,
34
+    recordingScreenOptions,
30
     securityScreenOptions,
35
     securityScreenOptions,
31
     sharedDocumentScreenOptions,
36
     sharedDocumentScreenOptions,
32
     speakerStatsScreenOptions
37
     speakerStatsScreenOptions
93
                             ...securityScreenOptions,
98
                             ...securityScreenOptions,
94
                             title: t('security.header')
99
                             title: t('security.header')
95
                         }} />
100
                         }} />
101
+                    <ConferenceStack.Screen
102
+                        component = { StartRecordingDialog }
103
+                        name = { screen.conference.recording }
104
+                        options = {{
105
+                            ...recordingScreenOptions
106
+                        }} />
107
+                    <ConferenceStack.Screen
108
+                        component = { StartLiveStreamDialog }
109
+                        name = { screen.conference.liveStream }
110
+                        options = {{
111
+                            ...liveStreamScreenOptions
112
+                        }} />
96
                     <ConferenceStack.Screen
113
                     <ConferenceStack.Screen
97
                         component = { SpeakerStats }
114
                         component = { SpeakerStats }
98
                         name = { screen.conference.speakerStats }
115
                         name = { screen.conference.speakerStats }

+ 2
- 0
react/features/mobile/navigation/routes.js 查看文件

24
             }
24
             }
25
         },
25
         },
26
         security: 'Security Options',
26
         security: 'Security Options',
27
+        recording: 'Recording',
28
+        liveStream: 'Live stream',
27
         speakerStats: 'Speaker Stats',
29
         speakerStats: 'Speaker Stats',
28
         participants: 'Participants',
30
         participants: 'Participants',
29
         invite: 'Invite',
31
         invite: 'Invite',

+ 14
- 0
react/features/mobile/navigation/screenOptions.js 查看文件

245
     ...presentationScreenOptions
245
     ...presentationScreenOptions
246
 };
246
 };
247
 
247
 
248
+/**
249
+ * Screen options for recording modal.
250
+ */
251
+export const recordingScreenOptions = {
252
+    ...presentationScreenOptions
253
+};
254
+
255
+/**
256
+ * Screen options for live stream modal.
257
+ */
258
+export const liveStreamScreenOptions = {
259
+    ...presentationScreenOptions
260
+};
261
+
248
 /**
262
 /**
249
  * Screen options for shared document.
263
  * Screen options for shared document.
250
  */
264
  */

+ 17
- 13
react/features/recording/components/LiveStream/AbstractLiveStreamButton.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { openDialog } from '../../../base/dialog';
4
 import { IconLiveStreaming } from '../../../base/icons';
3
 import { IconLiveStreaming } from '../../../base/icons';
5
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
4
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
6
 import {
5
 import {
13
 import { FEATURES } from '../../../jaas/constants';
12
 import { FEATURES } from '../../../jaas/constants';
14
 import { getActiveSession } from '../../functions';
13
 import { getActiveSession } from '../../functions';
15
 
14
 
16
-import {
17
-    StartLiveStreamDialog,
18
-    StopLiveStreamDialog
19
-} from './_';
20
 
15
 
21
 /**
16
 /**
22
  * The type of the React {@code Component} props of
17
  * The type of the React {@code Component} props of
25
 export type Props = AbstractButtonProps & {
20
 export type Props = AbstractButtonProps & {
26
 
21
 
27
     /**
22
     /**
28
-     * True if there is a running active live stream, false otherwise.
23
+     * True if the button needs to be disabled.
29
      */
24
      */
30
-    _isLiveStreamRunning: boolean,
25
+    _disabled: Boolean,
31
 
26
 
32
     /**
27
     /**
33
-     * True if the button needs to be disabled.
28
+     * True if there is a running active live stream, false otherwise.
34
      */
29
      */
35
-    _disabled: Boolean,
30
+    _isLiveStreamRunning: boolean,
36
 
31
 
37
     /**
32
     /**
38
      * The tooltip to display when hovering over the button.
33
      * The tooltip to display when hovering over the button.
69
         return this.props._tooltip || '';
64
         return this.props._tooltip || '';
70
     }
65
     }
71
 
66
 
67
+    /**
68
+     * Helper function to be implemented by subclasses, which should be used
69
+     * to handle the live stream button being clicked / pressed.
70
+     *
71
+     * @protected
72
+     * @returns {void}
73
+     */
74
+    _onHandleClick() {
75
+        // To be implemented by subclass.
76
+    }
77
+
72
     /**
78
     /**
73
      * Handles clicking / pressing the button.
79
      * Handles clicking / pressing the button.
74
      *
80
      *
77
      * @returns {void}
83
      * @returns {void}
78
      */
84
      */
79
     async _handleClick() {
85
     async _handleClick() {
80
-        const { _isLiveStreamRunning, dispatch } = this.props;
86
+        const { dispatch } = this.props;
81
 
87
 
82
         const dialogShown = await dispatch(maybeShowPremiumFeatureDialog(FEATURES.RECORDING));
88
         const dialogShown = await dispatch(maybeShowPremiumFeatureDialog(FEATURES.RECORDING));
83
 
89
 
84
         if (!dialogShown) {
90
         if (!dialogShown) {
85
-            dispatch(openDialog(
86
-                _isLiveStreamRunning ? StopLiveStreamDialog : StartLiveStreamDialog
87
-            ));
91
+            this._onHandleClick();
88
         }
92
         }
89
     }
93
     }
90
 
94
 

+ 34
- 2
react/features/recording/components/LiveStream/native/LiveStreamButton.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
+import { openDialog } from '../../../../base/dialog';
3
 import { LIVE_STREAMING_ENABLED, getFeatureFlag } from '../../../../base/flags';
4
 import { LIVE_STREAMING_ENABLED, getFeatureFlag } from '../../../../base/flags';
4
 import { translate } from '../../../../base/i18n';
5
 import { translate } from '../../../../base/i18n';
5
 import { connect } from '../../../../base/redux';
6
 import { connect } from '../../../../base/redux';
6
-import AbstractLiveStreamButton, { _mapStateToProps as _abstractMapStateToProps } from '../AbstractLiveStreamButton';
7
+import { navigate }
8
+    from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
9
+import { screen } from '../../../../mobile/navigation/routes';
10
+import AbstractLiveStreamButton,
11
+{ _mapStateToProps as _abstractMapStateToProps } from '../AbstractLiveStreamButton';
12
+import type { Props } from '../AbstractStartLiveStreamDialog';
13
+
14
+import { StopLiveStreamDialog } from './index';
15
+
16
+
17
+/**
18
+ * Button for opening the live stream settings screen.
19
+ */
20
+class LiveStreamButton extends AbstractLiveStreamButton<Props> {
21
+
22
+    /**
23
+     * Handles clicking / pressing the button.
24
+     *
25
+     * @override
26
+     * @protected
27
+     * @returns {void}
28
+     */
29
+    _onHandleClick() {
30
+        const { _isLiveStreamRunning, dispatch } = this.props;
31
+
32
+        if (_isLiveStreamRunning) {
33
+            dispatch(openDialog(StopLiveStreamDialog));
34
+        } else {
35
+            navigate(screen.conference.liveStream);
36
+        }
37
+    }
38
+}
7
 
39
 
8
 /**
40
 /**
9
  * Maps (parts of) the redux state to the associated props for this component.
41
  * Maps (parts of) the redux state to the associated props for this component.
24
     };
56
     };
25
 }
57
 }
26
 
58
 
27
-export default translate(connect(mapStateToProps)(AbstractLiveStreamButton));
59
+export default translate(connect(mapStateToProps)(LiveStreamButton));

+ 52
- 19
react/features/recording/components/LiveStream/native/StartLiveStreamDialog.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
-import { View } from 'react-native';
4
+import { Text, TouchableRipple } from 'react-native-paper';
5
 
5
 
6
-import { CustomSubmitDialog } from '../../../../base/dialog';
7
 import { translate } from '../../../../base/i18n';
6
 import { translate } from '../../../../base/i18n';
7
+import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
8
 import { connect } from '../../../../base/redux';
8
 import { connect } from '../../../../base/redux';
9
+import BaseTheme from '../../../../base/ui/components/BaseTheme';
9
 import { googleApi } from '../../../../google-api';
10
 import { googleApi } from '../../../../google-api';
11
+import { goBack }
12
+    from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
10
 import { setLiveStreamKey } from '../../../actions';
13
 import { setLiveStreamKey } from '../../../actions';
11
 import AbstractStartLiveStreamDialog,
14
 import AbstractStartLiveStreamDialog,
12
 { _mapStateToProps, type Props } from '../AbstractStartLiveStreamDialog';
15
 { _mapStateToProps, type Props } from '../AbstractStartLiveStreamDialog';
30
         super(props);
33
         super(props);
31
 
34
 
32
         // Bind event handlers so they are only bound once per instance.
35
         // Bind event handlers so they are only bound once per instance.
36
+        this._onOkPress = this._onOkPress.bind(this);
33
         this._onStreamKeyChangeNative
37
         this._onStreamKeyChangeNative
34
             = this._onStreamKeyChangeNative.bind(this);
38
             = this._onStreamKeyChangeNative.bind(this);
35
         this._onStreamKeyPick = this._onStreamKeyPick.bind(this);
39
         this._onStreamKeyPick = this._onStreamKeyPick.bind(this);
36
         this._onUserChanged = this._onUserChanged.bind(this);
40
         this._onUserChanged = this._onUserChanged.bind(this);
37
     }
41
     }
38
 
42
 
43
+    /**
44
+     * Implements React's {@link Component#componentDidMount()}. Invoked
45
+     * immediately after this component is mounted.
46
+     *
47
+     * @inheritdoc
48
+     * @returns {void}
49
+     */
50
+    componentDidMount() {
51
+        const { navigation, t } = this.props;
52
+
53
+        navigation.setOptions({
54
+            headerRight: () => (
55
+                <TouchableRipple
56
+                    onPress = { this._onOkPress }
57
+                    rippleColor = { BaseTheme.palette.screen01Header } >
58
+                    <Text style = { styles.startLiveStreamLabel }>
59
+                        { t('dialog.start') }
60
+                    </Text>
61
+                </TouchableRipple>
62
+            )
63
+        });
64
+    }
65
+
66
+    _onOkPress: () => void;
67
+
68
+    /**
69
+     * Starts live stream session and goes back to the previous screen.
70
+     *
71
+     * @returns {void}
72
+     */
73
+    _onOkPress() {
74
+        this._onSubmit() && goBack();
75
+    }
76
+
39
     /**
77
     /**
40
      * Implements {@code Component}'s render.
78
      * Implements {@code Component}'s render.
41
      *
79
      *
43
      */
81
      */
44
     render() {
82
     render() {
45
         return (
83
         return (
46
-            <CustomSubmitDialog
47
-                okKey = 'dialog.startLiveStreaming'
48
-                onCancel = { this._onCancel }
49
-                onSubmit = { this._onSubmit } >
50
-                <View style = { styles.startDialogWrapper }>
51
-                    <GoogleSigninForm
52
-                        onUserChanged = { this._onUserChanged } />
53
-                    <StreamKeyPicker
54
-                        broadcasts = { this.state.broadcasts }
55
-                        onChange = { this._onStreamKeyPick } />
56
-                    <StreamKeyForm
57
-                        onChange = { this._onStreamKeyChangeNative }
58
-                        value = {
59
-                            this.state.streamKey || this.props._streamKey
60
-                        } />
61
-                </View>
62
-            </CustomSubmitDialog>
84
+            <JitsiScreen style = { styles.startLiveStreamContainer }>
85
+                <GoogleSigninForm
86
+                    onUserChanged = { this._onUserChanged } />
87
+                <StreamKeyPicker
88
+                    broadcasts = { this.state.broadcasts }
89
+                    onChange = { this._onStreamKeyPick } />
90
+                <StreamKeyForm
91
+                    onChange = { this._onStreamKeyChangeNative }
92
+                    value = {
93
+                        this.state.streamKey || this.props._streamKey
94
+                    } />
95
+            </JitsiScreen>
63
         );
96
         );
64
     }
97
     }
65
 
98
 

+ 17
- 3
react/features/recording/components/LiveStream/native/styles.js 查看文件

5
     ColorPalette,
5
     ColorPalette,
6
     createStyleSheet
6
     createStyleSheet
7
 } from '../../../../base/styles';
7
 } from '../../../../base/styles';
8
+import BaseTheme from '../../../../base/ui/components/BaseTheme';
8
 
9
 
9
 /**
10
 /**
10
  * Opacity of the TouchableHighlight.
11
  * Opacity of the TouchableHighlight.
57
     },
58
     },
58
 
59
 
59
     /**
60
     /**
60
-     * Wrapper for the StartLiveStreamDialog form.
61
+     * Label for the button that starts live stream.
61
      */
62
      */
62
-    startDialogWrapper: {
63
-        flexDirection: 'column'
63
+    startLiveStreamLabel: {
64
+        color: BaseTheme.palette.text01,
65
+        marginRight: 12
66
+    },
67
+
68
+    /**
69
+     * Container for the live stream screen.
70
+     */
71
+    startLiveStreamContainer: {
72
+        display: 'flex',
73
+        flex: 1,
74
+        flexDirection: 'column',
75
+        justifyContent: 'center',
76
+        marginHorizontal: BaseTheme.spacing[2],
77
+        marginTop: BaseTheme.spacing[3]
64
     },
78
     },
65
 
79
 
66
     /**
80
     /**

+ 29
- 1
react/features/recording/components/LiveStream/web/LiveStreamButton.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
 import { getToolbarButtons } from '../../../../base/config';
3
 import { getToolbarButtons } from '../../../../base/config';
4
+import { openDialog } from '../../../../base/dialog';
4
 import { translate } from '../../../../base/i18n';
5
 import { translate } from '../../../../base/i18n';
5
 import { connect } from '../../../../base/redux';
6
 import { connect } from '../../../../base/redux';
6
 import AbstractLiveStreamButton, {
7
 import AbstractLiveStreamButton, {
8
     type Props
9
     type Props
9
 } from '../AbstractLiveStreamButton';
10
 } from '../AbstractLiveStreamButton';
10
 
11
 
12
+import {
13
+    StartLiveStreamDialog,
14
+    StopLiveStreamDialog
15
+} from './index';
16
+
17
+
18
+/**
19
+ * Button for opening the live stream settings dialog.
20
+ */
21
+class LiveStreamButton extends AbstractLiveStreamButton<Props> {
22
+
23
+    /**
24
+     * Handles clicking / pressing the button.
25
+     *
26
+     * @override
27
+     * @protected
28
+     * @returns {void}
29
+     */
30
+    _onHandleClick() {
31
+        const { _isLiveStreamRunning, dispatch } = this.props;
32
+
33
+        dispatch(openDialog(
34
+            _isLiveStreamRunning ? StopLiveStreamDialog : StartLiveStreamDialog
35
+        ));
36
+    }
37
+}
38
+
11
 /**
39
 /**
12
  * Maps (parts of) the redux state to the associated props for the
40
  * Maps (parts of) the redux state to the associated props for the
13
  * {@code LiveStreamButton} component.
41
  * {@code LiveStreamButton} component.
37
     };
65
     };
38
 }
66
 }
39
 
67
 
40
-export default translate(connect(_mapStateToProps)(AbstractLiveStreamButton));
68
+export default translate(connect(_mapStateToProps)(LiveStreamButton));

+ 12
- 6
react/features/recording/components/Recording/AbstractRecordButton.js 查看文件

4
     createToolbarEvent,
4
     createToolbarEvent,
5
     sendAnalytics
5
     sendAnalytics
6
 } from '../../../analytics';
6
 } from '../../../analytics';
7
-import { openDialog } from '../../../base/dialog';
8
 import { IconToggleRecording } from '../../../base/icons';
7
 import { IconToggleRecording } from '../../../base/icons';
9
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
8
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
10
 import {
9
 import {
17
 import { FEATURES } from '../../../jaas/constants';
16
 import { FEATURES } from '../../../jaas/constants';
18
 import { getActiveSession } from '../../functions';
17
 import { getActiveSession } from '../../functions';
19
 
18
 
20
-import { StartRecordingDialog, StopRecordingDialog } from './_';
21
 
19
 
22
 /**
20
 /**
23
  * The type of the React {@code Component} props of
21
  * The type of the React {@code Component} props of
70
         return this.props._tooltip || '';
68
         return this.props._tooltip || '';
71
     }
69
     }
72
 
70
 
71
+    /**
72
+     * Helper function to be implemented by subclasses, which should be used
73
+     * to handle the start recoding button being clicked / pressed.
74
+     *
75
+     * @protected
76
+     * @returns {void}
77
+     */
78
+    _onHandleClick() {
79
+        // To be implemented by subclass.
80
+    }
81
+
73
     /**
82
     /**
74
      * Handles clicking / pressing the button.
83
      * Handles clicking / pressing the button.
75
      *
84
      *
86
                 'is_recording': _isRecordingRunning,
95
                 'is_recording': _isRecordingRunning,
87
                 type: JitsiRecordingConstants.mode.FILE
96
                 type: JitsiRecordingConstants.mode.FILE
88
             }));
97
             }));
89
-
90
         const dialogShown = await dispatch(maybeShowPremiumFeatureDialog(FEATURES.RECORDING));
98
         const dialogShown = await dispatch(maybeShowPremiumFeatureDialog(FEATURES.RECORDING));
91
 
99
 
92
         if (!dialogShown) {
100
         if (!dialogShown) {
93
-            dispatch(openDialog(
94
-                _isRecordingRunning ? StopRecordingDialog : StartRecordingDialog
95
-            ));
101
+            this._onHandleClick();
96
         }
102
         }
97
     }
103
     }
98
 
104
 

+ 1
- 1
react/features/recording/components/Recording/AbstractStartRecordingDialog.js 查看文件

18
 import { setSelectedRecordingService } from '../../actions';
18
 import { setSelectedRecordingService } from '../../actions';
19
 import { RECORDING_TYPES } from '../../constants';
19
 import { RECORDING_TYPES } from '../../constants';
20
 
20
 
21
-type Props = {
21
+export type Props = {
22
 
22
 
23
     /**
23
     /**
24
      * Requests subtitles when recording is turned on.
24
      * Requests subtitles when recording is turned on.

+ 34
- 2
react/features/recording/components/Recording/native/RecordButton.js 查看文件

2
 
2
 
3
 import { Platform } from 'react-native';
3
 import { Platform } from 'react-native';
4
 
4
 
5
+import { openDialog } from '../../../../base/dialog';
5
 import { IOS_RECORDING_ENABLED, RECORDING_ENABLED, getFeatureFlag } from '../../../../base/flags';
6
 import { IOS_RECORDING_ENABLED, RECORDING_ENABLED, getFeatureFlag } from '../../../../base/flags';
6
 import { translate } from '../../../../base/i18n';
7
 import { translate } from '../../../../base/i18n';
7
 import { connect } from '../../../../base/redux';
8
 import { connect } from '../../../../base/redux';
8
-import AbstractRecordButton, { _mapStateToProps as _abstractMapStateToProps } from '../AbstractRecordButton';
9
+import { navigate }
10
+    from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
11
+import { screen } from '../../../../mobile/navigation/routes';
12
+import type { Props } from '../../LiveStream/AbstractStartLiveStreamDialog';
13
+import AbstractRecordButton,
14
+{ _mapStateToProps as _abstractMapStateToProps } from '../AbstractRecordButton';
15
+
16
+import { StopRecordingDialog } from './index';
17
+
18
+
19
+/**
20
+ * Button for opening a screen where a recording session can be started.
21
+ */
22
+class RecordButton extends AbstractRecordButton<Props> {
23
+
24
+    /**
25
+     * Handles clicking / pressing the button.
26
+     *
27
+     * @override
28
+     * @protected
29
+     * @returns {void}
30
+     */
31
+    _onHandleClick() {
32
+        const { _isRecordingRunning, dispatch } = this.props;
33
+
34
+        if (_isRecordingRunning) {
35
+            dispatch(openDialog(StopRecordingDialog));
36
+        } else {
37
+            navigate(screen.conference.recording);
38
+        }
39
+    }
40
+}
9
 
41
 
10
 /**
42
 /**
11
  * Maps (parts of) the redux state to the associated props for this component.
43
  * Maps (parts of) the redux state to the associated props for this component.
27
     };
59
     };
28
 }
60
 }
29
 
61
 
30
-export default translate(connect(mapStateToProps)(AbstractRecordButton));
62
+export default translate(connect(mapStateToProps)(RecordButton));

+ 76
- 16
react/features/recording/components/Recording/native/StartRecordingDialog.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
+import { Text, TouchableRipple } from 'react-native-paper';
4
 
5
 
5
-import { CustomSubmitDialog } from '../../../../base/dialog';
6
 import { translate } from '../../../../base/i18n';
6
 import { translate } from '../../../../base/i18n';
7
+import JitsiScreen from '../../../../base/modal/components/JitsiScreen';
7
 import { connect } from '../../../../base/redux';
8
 import { connect } from '../../../../base/redux';
9
+import BaseTheme from '../../../../base/ui/components/BaseTheme';
10
+import { goBack } from
11
+    '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
8
 import AbstractStartRecordingDialog, {
12
 import AbstractStartRecordingDialog, {
13
+    type Props,
9
     mapStateToProps
14
     mapStateToProps
10
 } from '../AbstractStartRecordingDialog';
15
 } from '../AbstractStartRecordingDialog';
11
 import StartRecordingDialogContent from '../StartRecordingDialogContent';
16
 import StartRecordingDialogContent from '../StartRecordingDialogContent';
17
+import styles from '../styles.native';
12
 
18
 
13
 /**
19
 /**
14
  * React Component for getting confirmation to start a file recording session in
20
  * React Component for getting confirmation to start a file recording session in
16
  *
22
  *
17
  * @augments Component
23
  * @augments Component
18
  */
24
  */
19
-class StartRecordingDialog extends AbstractStartRecordingDialog {
25
+class StartRecordingDialog extends AbstractStartRecordingDialog<Props> {
26
+
27
+    /**
28
+     * Constructor of the component.
29
+     *
30
+     * @inheritdoc
31
+     */
32
+    constructor(props: Props) {
33
+        super(props);
34
+
35
+        this._onOkPress = this._onOkPress.bind(this);
36
+    }
37
+
38
+    /**
39
+     * Implements React's {@link Component#componentDidMount()}. Invoked
40
+     * immediately after this component is mounted.
41
+     *
42
+     * @inheritdoc
43
+     * @returns {void}
44
+     */
45
+    componentDidMount() {
46
+        const {
47
+            _fileRecordingsServiceEnabled,
48
+            _isDropboxEnabled,
49
+            navigation,
50
+            t
51
+        } = this.props;
52
+
53
+        const {
54
+            isTokenValid,
55
+            isValidating
56
+        } = this.state;
57
+
58
+        // disable ok button id recording service is shown only, when
59
+        // validating dropbox token, if that is not enabled we either always
60
+        // show the ok button or if just dropbox is enabled ok is available
61
+        // when there is token
62
+        const isOkDisabled
63
+            = _fileRecordingsServiceEnabled ? isValidating
64
+                : _isDropboxEnabled ? !isTokenValid : false;
65
+
66
+        navigation.setOptions({
67
+            headerRight: () => (
68
+                <TouchableRipple
69
+                    disabled = { isOkDisabled }
70
+                    onPress = { this._onOkPress }
71
+                    rippleColor = { BaseTheme.palette.screen01Header } >
72
+                    <Text style = { styles.startRecordingLabel }>
73
+                        { t('dialog.start') }
74
+                    </Text>
75
+                </TouchableRipple>
76
+            )
77
+        });
78
+    }
79
+
80
+    _onOkPress: () => void;
81
+
82
+    /**
83
+     * Starts recording session and goes back to the previous screen.
84
+     *
85
+     * @returns {void}
86
+     */
87
+    _onOkPress() {
88
+        this._onSubmit() && goBack();
89
+    }
90
+
20
     /**
91
     /**
21
      * Implements React's {@link Component#render()}.
92
      * Implements React's {@link Component#render()}.
22
      *
93
      *
33
         } = this.state;
104
         } = this.state;
34
         const {
105
         const {
35
             _fileRecordingsServiceEnabled,
106
             _fileRecordingsServiceEnabled,
36
-            _fileRecordingsServiceSharingEnabled,
37
-            _isDropboxEnabled
107
+            _fileRecordingsServiceSharingEnabled
38
         } = this.props;
108
         } = this.props;
39
 
109
 
40
-        // disable ok button id recording service is shown only, when
41
-        // validating dropbox token, if that is not enabled we either always
42
-        // show the ok button or if just dropbox is enabled ok is available
43
-        // when there is token
44
-        const isOkDisabled
45
-            = _fileRecordingsServiceEnabled ? isValidating
46
-                : _isDropboxEnabled ? !isTokenValid : false;
47
-
48
         return (
110
         return (
49
-            <CustomSubmitDialog
50
-                okDisabled = { isOkDisabled }
51
-                onSubmit = { this._onSubmit } >
111
+            <JitsiScreen style = { styles.startRecodingContainer }>
52
                 <StartRecordingDialogContent
112
                 <StartRecordingDialogContent
53
                     fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }
113
                     fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }
54
                     fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }
114
                     fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }
61
                     sharingSetting = { sharingEnabled }
121
                     sharingSetting = { sharingEnabled }
62
                     spaceLeft = { spaceLeft }
122
                     spaceLeft = { spaceLeft }
63
                     userName = { userName } />
123
                     userName = { userName } />
64
-            </CustomSubmitDialog>
124
+            </JitsiScreen>
65
         );
125
         );
66
     }
126
     }
67
 
127
 

+ 30
- 7
react/features/recording/components/Recording/styles.native.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
 import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
3
 import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
4
-import { BoxModel, ColorPalette } from '../../../base/styles';
4
+import { BoxModel } from '../../../base/styles';
5
+import BaseTheme from '../../../base/ui/components/BaseTheme';
5
 
6
 
6
 export const DROPBOX_LOGO = require('../../../../../images/dropboxLogo_square.png');
7
 export const DROPBOX_LOGO = require('../../../../../images/dropboxLogo_square.png');
7
 export const ICON_CLOUD = require('../../../../../images/icon-cloud.png');
8
 export const ICON_CLOUD = require('../../../../../images/icon-cloud.png');
11
 // the special case(s) of the recording feature below.
12
 // the special case(s) of the recording feature below.
12
 const _PADDING = BoxModel.padding * 1.5;
13
 const _PADDING = BoxModel.padding * 1.5;
13
 
14
 
15
+export default {
16
+    /**
17
+     * Container for the StartRecordingDialog screen.
18
+     */
19
+    startRecodingContainer: {
20
+        display: 'flex',
21
+        flex: 1,
22
+        flexDirection: 'column',
23
+        justifyContent: 'center',
24
+        marginHorizontal: BaseTheme.spacing[2],
25
+        marginTop: BaseTheme.spacing[3]
26
+    },
27
+
28
+    /**
29
+     * Label for the start recording button.
30
+     */
31
+    startRecordingLabel: {
32
+        color: BaseTheme.palette.text01,
33
+        marginRight: 12
34
+    }
35
+};
36
+
14
 /**
37
 /**
15
  * Color schemed styles for the @{code StartRecordingDialogContent} component.
38
  * Color schemed styles for the @{code StartRecordingDialogContent} component.
16
  */
39
  */
39
     },
62
     },
40
 
63
 
41
     recordingIcon: {
64
     recordingIcon: {
42
-        width: 24,
43
-        height: 24
65
+        width: BaseTheme.spacing[4],
66
+        height: BaseTheme.spacing[4]
44
     },
67
     },
45
 
68
 
46
     signButton: {
69
     signButton: {
47
-        backgroundColor: ColorPalette.blue,
48
-        color: ColorPalette.white,
70
+        backgroundColor: BaseTheme.palette.screen01Header,
71
+        color: BaseTheme.palette.ui12,
49
         fontSize: 16,
72
         fontSize: 16,
50
-        borderRadius: 5,
73
+        borderRadius: BaseTheme.shape.borderRadius,
51
         padding: BoxModel.padding * 0.5
74
         padding: BoxModel.padding * 0.5
52
     },
75
     },
53
 
76
 
54
     switch: {
77
     switch: {
55
-        color: ColorPalette.white
78
+        color: BaseTheme.palette.ui12
56
     },
79
     },
57
 
80
 
58
     title: {
81
     title: {

+ 26
- 1
react/features/recording/components/Recording/web/RecordButton.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
 import { getToolbarButtons } from '../../../../base/config';
3
 import { getToolbarButtons } from '../../../../base/config';
4
+import { openDialog } from '../../../../base/dialog';
4
 import { translate } from '../../../../base/i18n';
5
 import { translate } from '../../../../base/i18n';
5
 import { connect } from '../../../../base/redux';
6
 import { connect } from '../../../../base/redux';
6
 import AbstractRecordButton, {
7
 import AbstractRecordButton, {
8
     type Props
9
     type Props
9
 } from '../AbstractRecordButton';
10
 } from '../AbstractRecordButton';
10
 
11
 
12
+import { StartRecordingDialog, StopRecordingDialog } from './index';
13
+
14
+
15
+/**
16
+ * Button for opening a dialog where a recording session can be started.
17
+ */
18
+class RecordingButton extends AbstractRecordButton<Props> {
19
+
20
+    /**
21
+     * Handles clicking / pressing the button.
22
+     *
23
+     * @override
24
+     * @protected
25
+     * @returns {void}
26
+     */
27
+    _onHandleClick() {
28
+        const { _isRecordingRunning, dispatch } = this.props;
29
+
30
+        dispatch(openDialog(
31
+            _isRecordingRunning ? StopRecordingDialog : StartRecordingDialog
32
+        ));
33
+    }
34
+}
35
+
11
 /**
36
 /**
12
  * Maps (parts of) the redux state to the associated props for the
37
  * Maps (parts of) the redux state to the associated props for the
13
  * {@code RecordButton} component.
38
  * {@code RecordButton} component.
37
     };
62
     };
38
 }
63
 }
39
 
64
 
40
-export default translate(connect(_mapStateToProps)(AbstractRecordButton));
65
+export default translate(connect(_mapStateToProps)(RecordingButton));

Loading…
取消
儲存