Pārlūkot izejas kodu

Fixes jsdocs

j8
Lyubo Marinov 8 gadus atpakaļ
vecāks
revīzija
e7fc4739c4

+ 6
- 6
react/features/toolbox/components/AbstractToolbarButton.js Parādīt failu

1
 import React, { Component } from 'react';
1
 import React, { Component } from 'react';
2
 
2
 
3
 /**
3
 /**
4
- * Abstract (base) class for a button in Toolbar.
4
+ * Abstract (base) class for a button in {@link Toolbar}.
5
  *
5
  *
6
  * @abstract
6
  * @abstract
7
  */
7
  */
13
      */
13
      */
14
     static propTypes = {
14
     static propTypes = {
15
         /**
15
         /**
16
-         * The name of the Icon of this AbstractToolbarButton.
16
+         * The name of the Icon of this {@code AbstractToolbarButton}.
17
          */
17
          */
18
         iconName: React.PropTypes.string,
18
         iconName: React.PropTypes.string,
19
 
19
 
20
         /**
20
         /**
21
-         * The style of the Icon of this AbstractToolbarButton.
21
+         * The style of the Icon of this {@code AbstractToolbarButton}.
22
          */
22
          */
23
         iconStyle: React.PropTypes.object,
23
         iconStyle: React.PropTypes.object,
24
 
24
 
28
         onClick: React.PropTypes.func,
28
         onClick: React.PropTypes.func,
29
 
29
 
30
         /**
30
         /**
31
-         * Toolbar button styles.
31
+         * {@code AbstractToolbarButton} styles.
32
          */
32
          */
33
         style:
33
         style:
34
             React.PropTypes.oneOfType([
34
             React.PropTypes.oneOfType([
53
     }
53
     }
54
 
54
 
55
     /**
55
     /**
56
-     * Renders the icon of this Toolbar button.
56
+     * Renders the icon of this {@code AbstractToolbarButton}.
57
      *
57
      *
58
      * @param {string|ReactClass} type - The React Component type of the icon to
58
      * @param {string|ReactClass} type - The React Component type of the icon to
59
      * be rendered.
59
      * be rendered.
60
      * @protected
60
      * @protected
61
-     * @returns {ReactElement} The icon of this Toolbar button.
61
+     * @returns {ReactElement} The icon of this {@code AbstractToolbarButton}.
62
      */
62
      */
63
     _renderIcon(type) {
63
     _renderIcon(type) {
64
         const props = {};
64
         const props = {};

+ 6
- 6
react/features/toolbox/components/ToolbarButton.native.js Parādīt failu

7
 import AbstractToolbarButton from './AbstractToolbarButton';
7
 import AbstractToolbarButton from './AbstractToolbarButton';
8
 
8
 
9
 /**
9
 /**
10
- * Represents a button in Toolbar on React Native.
10
+ * Represents a button in {@link Toolbar} on React Native.
11
  *
11
  *
12
  * @extends AbstractToolbarButton
12
  * @extends AbstractToolbarButton
13
  */
13
  */
14
 class ToolbarButton extends AbstractToolbarButton {
14
 class ToolbarButton extends AbstractToolbarButton {
15
     /**
15
     /**
16
-     * ToolbarButton component's property types.
16
+     * {@code ToolbarButton} component's property types.
17
      *
17
      *
18
      * @static
18
      * @static
19
      */
19
      */
21
         ...AbstractToolbarButton.propTypes,
21
         ...AbstractToolbarButton.propTypes,
22
 
22
 
23
         /**
23
         /**
24
-         * Indicates if this button is disabled or not.
24
+         * Indicates whether this {@code ToolbarButton} is disabled.
25
          */
25
          */
26
         disabled: React.PropTypes.bool
26
         disabled: React.PropTypes.bool
27
     };
27
     };
28
 
28
 
29
     /**
29
     /**
30
-     * Renders the button of this Toolbar button.
30
+     * Renders the button of this {@code ToolbarButton}.
31
      *
31
      *
32
      * @param {Object} children - The children, if any, to be rendered inside
32
      * @param {Object} children - The children, if any, to be rendered inside
33
-     * the button. Presumably, contains the icon of this Toolbar button.
33
+     * the button. Presumably, contains the icon of this {@code ToolbarButton}.
34
      * @protected
34
      * @protected
35
-     * @returns {ReactElement} The button of this Toolbar button.
35
+     * @returns {ReactElement} The button of this {@code ToolbarButton}.
36
      */
36
      */
37
     _renderButton(children) {
37
     _renderButton(children) {
38
         const props = {};
38
         const props = {};

+ 1
- 2
react/features/toolbox/components/Toolbox.native.js Parādīt failu

154
     _renderPrimaryToolbar() {
154
     _renderPrimaryToolbar() {
155
         const audioButtonStyles = this._getMuteButtonStyles(MEDIA_TYPE.AUDIO);
155
         const audioButtonStyles = this._getMuteButtonStyles(MEDIA_TYPE.AUDIO);
156
         const videoButtonStyles = this._getMuteButtonStyles(MEDIA_TYPE.VIDEO);
156
         const videoButtonStyles = this._getMuteButtonStyles(MEDIA_TYPE.VIDEO);
157
-        const { _audioOnly: audioOnly } = this.props;
158
 
157
 
159
         /* eslint-disable react/jsx-handler-names */
158
         /* eslint-disable react/jsx-handler-names */
160
 
159
 
172
                     style = { styles.hangup }
171
                     style = { styles.hangup }
173
                     underlayColor = { ColorPalette.buttonUnderlay } />
172
                     underlayColor = { ColorPalette.buttonUnderlay } />
174
                 <ToolbarButton
173
                 <ToolbarButton
175
-                    disabled = { audioOnly }
174
+                    disabled = { this.props._audioOnly }
176
                     iconName = { videoButtonStyles.iconName }
175
                     iconName = { videoButtonStyles.iconName }
177
                     iconStyle = { videoButtonStyles.iconStyle }
176
                     iconStyle = { videoButtonStyles.iconStyle }
178
                     onClick = { this.props._onToggleVideo }
177
                     onClick = { this.props._onToggleVideo }

+ 8
- 6
react/features/toolbox/functions.native.js Parādīt failu

7
 import { getLocalAudioTrack, getLocalVideoTrack } from '../base/tracks';
7
 import { getLocalAudioTrack, getLocalVideoTrack } from '../base/tracks';
8
 
8
 
9
 /**
9
 /**
10
- * Maps (redux) actions to React component props.
10
+ * Maps redux actions to {@link Toolbox} (React {@code Component}) props.
11
  *
11
  *
12
- * @param {Function} dispatch - Redux action dispatcher.
12
+ * @param {Function} dispatch - The redux {@code dispatch} function.
13
  * @returns {{
13
  * @returns {{
14
  *     _onHangup: Function,
14
  *     _onHangup: Function,
15
  *     _onToggleAudio: Function,
15
  *     _onToggleAudio: Function,
61
 }
61
 }
62
 
62
 
63
 /**
63
 /**
64
- * Maps parts of media state to component props.
64
+ * Maps parts of the redux state to {@link Toolbox} (React {@code Component})
65
+ * props.
65
  *
66
  *
66
- * @param {Object} state - Redux state.
67
+ * @param {Object} state - The redux state of which parts are to be mapped to
68
+ * {@code Toolbox} props.
67
  * @protected
69
  * @protected
68
  * @returns {{
70
  * @returns {{
69
  *     _audioMuted: boolean,
71
  *     _audioMuted: boolean,
80
 
82
 
81
     return {
83
     return {
82
         /**
84
         /**
83
-         * Flag showing that audio is muted.
85
+         * Flag showing whether audio is muted.
84
          *
86
          *
85
          * @protected
87
          * @protected
86
          * @type {boolean}
88
          * @type {boolean}
106
 }
108
 }
107
 
109
 
108
 /**
110
 /**
109
- * Returns the button object corresponding to the given buttonName.
111
+ * Returns the button object corresponding to a specific {@code buttonName}.
110
  *
112
  *
111
  * @param {string} buttonName - The name of the button.
113
  * @param {string} buttonName - The name of the button.
112
  * @param {Object} state - The current state.
114
  * @param {Object} state - The current state.

+ 10
- 12
react/features/welcome/components/AbstractWelcomePage.js Parādīt failu

14
  */
14
  */
15
 export class AbstractWelcomePage extends Component {
15
 export class AbstractWelcomePage extends Component {
16
     /**
16
     /**
17
-     * AbstractWelcomePage component's property types.
17
+     * {@code AbstractWelcomePage} component's property types.
18
      *
18
      *
19
      * @static
19
      * @static
20
      */
20
      */
25
     };
25
     };
26
 
26
 
27
     /**
27
     /**
28
-     * Initializes a new AbstractWelcomePage instance, including the initial
29
-     * state of the room name input.
28
+     * Initializes a new {@code AbstractWelcomePage} instance.
30
      *
29
      *
31
-     * @param {Object} props - Component properties.
30
+     * @param {Object} props - The React {@code Component} props to initialize
31
+     * the new {@code AbstractWelcomePage} instance with.
32
      */
32
      */
33
     constructor(props) {
33
     constructor(props) {
34
         super(props);
34
         super(props);
37
          * Save room name into component's local state.
37
          * Save room name into component's local state.
38
          *
38
          *
39
          * @type {Object}
39
          * @type {Object}
40
-         * @property {number|null} animateTimeoutId - Identificator for
41
-         * letter animation timeout.
40
+         * @property {number|null} animateTimeoutId - Identifier of the letter
41
+         * animation timeout.
42
          * @property {string} generatedRoomname - Automatically generated
42
          * @property {string} generatedRoomname - Automatically generated
43
          * room name.
43
          * room name.
44
          * @property {string} room - Room name.
44
          * @property {string} room - Room name.
45
          * @property {string} roomPlaceholder - Room placeholder
45
          * @property {string} roomPlaceholder - Room placeholder
46
          * that's used as a placeholder for input.
46
          * that's used as a placeholder for input.
47
-         * @property {nubmer|null} updateTimeoutId - Identificator for
48
-         * updating generated room name.
47
+         * @property {nubmer|null} updateTimeoutId - Identifier of the timeout
48
+         * updating the generated room name.
49
          */
49
          */
50
         this.state = {
50
         this.state = {
51
             animateTimeoutId: null,
51
             animateTimeoutId: null,
55
             updateTimeoutId: null
55
             updateTimeoutId: null
56
         };
56
         };
57
 
57
 
58
-        // Bind event handlers so they are only bound once for every instance.
58
+        // Bind event handlers so they are only bound once per instance.
59
         this._animateRoomnameChanging
59
         this._animateRoomnameChanging
60
             = this._animateRoomnameChanging.bind(this);
60
             = this._animateRoomnameChanging.bind(this);
61
         this._onJoin = this._onJoin.bind(this);
61
         this._onJoin = this._onJoin.bind(this);
143
     _onJoin() {
143
     _onJoin() {
144
         const room = this.state.room || this.state.generatedRoomname;
144
         const room = this.state.room || this.state.generatedRoomname;
145
 
145
 
146
-        if (room) {
147
-            this.props.dispatch(appNavigate(room));
148
-        }
146
+        room && this.props.dispatch(appNavigate(room));
149
     }
147
     }
150
 
148
 
151
     /**
149
     /**

Notiek ielāde…
Atcelt
Saglabāt