Pārlūkot izejas kodu

Keep buttons in their associated features

Contributing all buttons in one place goes against the designs that we
set out at the beginning of the project's rewrite and that multiple of
us have been following since then.
master
Lyubo Marinov 7 gadus atpakaļ
vecāks
revīzija
3aff4967f1
60 mainītis faili ar 174 papildinājumiem un 308 dzēšanām
  1. 2
    5
      react/features/always-on-top/AudioMuteButton.js
  2. 2
    5
      react/features/always-on-top/HangupButton.js
  3. 2
    5
      react/features/always-on-top/VideoMuteButton.js
  4. 3
    3
      react/features/base/toolbox/components/AbstractAudioMuteButton.js
  5. 2
    2
      react/features/base/toolbox/components/AbstractButton.js
  6. 3
    3
      react/features/base/toolbox/components/AbstractHangupButton.js
  7. 0
    0
      react/features/base/toolbox/components/AbstractToolboxItem.js
  8. 3
    3
      react/features/base/toolbox/components/AbstractVideoMuteButton.js
  9. 1
    1
      react/features/base/toolbox/components/ToolboxItem.native.js
  10. 0
    0
      react/features/base/toolbox/components/ToolboxItem.web.js
  11. 7
    0
      react/features/base/toolbox/components/index.js
  12. 3
    0
      react/features/base/toolbox/index.js
  13. 0
    2
      react/features/filmstrip/components/index.js
  14. 1
    1
      react/features/filmstrip/components/native/AudioMutedIndicator.js
  15. 1
    1
      react/features/filmstrip/components/native/DominantSpeakerIndicator.js
  16. 2
    2
      react/features/filmstrip/components/native/Filmstrip.js
  17. 2
    2
      react/features/filmstrip/components/native/LocalThumbnail.js
  18. 1
    1
      react/features/filmstrip/components/native/ModeratorIndicator.js
  19. 11
    13
      react/features/filmstrip/components/native/Thumbnail.js
  20. 1
    1
      react/features/filmstrip/components/native/VideoMutedIndicator.js
  21. 1
    4
      react/features/filmstrip/components/native/index.js
  22. 6
    7
      react/features/filmstrip/components/native/styles.js
  23. 3
    3
      react/features/filmstrip/components/web/Filmstrip.js
  24. 2
    2
      react/features/filmstrip/components/web/Toolbar.js
  25. 1
    0
      react/features/filmstrip/components/web/index.js
  26. 6
    9
      react/features/invite/components/InviteButton.native.js
  27. 0
    0
      react/features/invite/components/InviteButton.web.js
  28. 2
    1
      react/features/invite/components/index.js
  29. 5
    6
      react/features/mobile/audio-mode/components/AudioRouteButton.js
  30. 1
    3
      react/features/mobile/audio-mode/components/index.js
  31. 5
    5
      react/features/mobile/picture-in-picture/components/PictureInPictureButton.js
  32. 1
    0
      react/features/mobile/picture-in-picture/components/index.js
  33. 1
    0
      react/features/mobile/picture-in-picture/index.js
  34. 5
    5
      react/features/room-lock/components/RoomLockButton.js
  35. 1
    0
      react/features/room-lock/components/index.js
  36. 7
    8
      react/features/settings/components/web/SettingsButton.js
  37. 1
    0
      react/features/settings/components/web/index.js
  38. 6
    10
      react/features/toolbox/components/AudioMuteButton.js
  39. 6
    7
      react/features/toolbox/components/HangupButton.js
  40. 0
    57
      react/features/toolbox/components/Notice.js
  41. 6
    7
      react/features/toolbox/components/VideoMuteButton.js
  42. 0
    0
      react/features/toolbox/components/_.native.js
  43. 0
    0
      react/features/toolbox/components/_.web.js
  44. 0
    5
      react/features/toolbox/components/buttons/index.js
  45. 0
    50
      react/features/toolbox/components/buttons/native/ShareRoomButton.js
  46. 0
    6
      react/features/toolbox/components/buttons/native/index.js
  47. 0
    1
      react/features/toolbox/components/buttons/web/index.js
  48. 6
    3
      react/features/toolbox/components/index.js
  49. 5
    6
      react/features/toolbox/components/native/AudioOnlyButton.js
  50. 6
    7
      react/features/toolbox/components/native/ToggleCameraButton.js
  51. 2
    2
      react/features/toolbox/components/native/ToolbarButton.js
  52. 13
    16
      react/features/toolbox/components/native/Toolbox.js
  53. 2
    0
      react/features/toolbox/components/native/index.js
  54. 1
    1
      react/features/toolbox/components/native/styles.js
  55. 2
    2
      react/features/toolbox/components/web/OverflowMenuButton.js
  56. 0
    0
      react/features/toolbox/components/web/OverflowMenuItem.js
  57. 1
    1
      react/features/toolbox/components/web/OverflowMenuProfileItem.js
  58. 1
    1
      react/features/toolbox/components/web/ToolbarButton.js
  59. 20
    23
      react/features/toolbox/components/web/Toolbox.js
  60. 2
    0
      react/features/toolbox/components/web/index.js

+ 2
- 5
react/features/always-on-top/AudioMuteButton.js Parādīt failu

@@ -1,10 +1,7 @@
1 1
 // @flow
2 2
 
3
-// XXX Import the button directly in order to avoid bringing in other components
4
-// that use lib-jitsi-meet, which always-on-top does not import.
5
-import AbstractAudioMuteButton
6
-    from '../toolbox/components/buttons/AbstractAudioMuteButton';
7
-import type { Props } from '../toolbox/components/buttons/AbstractButton';
3
+import { AbstractAudioMuteButton } from '../base/toolbox';
4
+import type { AbstractButtonProps as Props } from '../base/toolbox';
8 5
 
9 6
 const { api } = window.alwaysOnTop;
10 7
 

+ 2
- 5
react/features/always-on-top/HangupButton.js Parādīt failu

@@ -1,10 +1,7 @@
1 1
 // @flow
2 2
 
3
-// XXX Import the button directly in order to avoid bringing in other components
4
-// that use lib-jitsi-meet, which always-on-top does not import.
5
-import AbstractHangupButton
6
-    from '../toolbox/components/buttons/AbstractHangupButton';
7
-import type { Props } from '../toolbox/components/buttons/AbstractButton';
3
+import { AbstractHangupButton } from '../base/toolbox';
4
+import type { AbstractButtonProps as Props } from '../base/toolbox';
8 5
 
9 6
 const { api } = window.alwaysOnTop;
10 7
 

+ 2
- 5
react/features/always-on-top/VideoMuteButton.js Parādīt failu

@@ -1,10 +1,7 @@
1 1
 // @flow
2 2
 
3
-// XXX Import the button directly in order to avoid bringing in other components
4
-// that use lib-jitsi-meet, which always-on-top does not import.
5
-import AbstractVideoMuteButton
6
-    from '../toolbox/components/buttons/AbstractVideoMuteButton';
7
-import type { Props } from '../toolbox/components/buttons/AbstractButton';
3
+import { AbstractVideoMuteButton } from '../base/toolbox';
4
+import type { AbstractButtonProps as Props } from '../base/toolbox';
8 5
 
9 6
 const { api } = window.alwaysOnTop;
10 7
 

react/features/toolbox/components/buttons/AbstractAudioMuteButton.js → react/features/base/toolbox/components/AbstractAudioMuteButton.js Parādīt failu

@@ -6,7 +6,9 @@ import type { Props } from './AbstractButton';
6 6
 /**
7 7
  * An abstract implementation of a button for toggling audio mute.
8 8
  */
9
-class AbstractAudioMuteButton<P: Props, S: *> extends AbstractButton<P, S> {
9
+export default class AbstractAudioMuteButton<P: Props, S: *>
10
+    extends AbstractButton<P, S> {
11
+
10 12
     accessibilityLabel = 'Audio mute';
11 13
     iconName = 'icon-microphone';
12 14
     toggledIconName = 'icon-mic-disabled toggled';
@@ -58,5 +60,3 @@ class AbstractAudioMuteButton<P: Props, S: *> extends AbstractButton<P, S> {
58 60
         // To be implemented by subclass.
59 61
     }
60 62
 }
61
-
62
-export default AbstractAudioMuteButton;

react/features/toolbox/components/buttons/AbstractButton.js → react/features/base/toolbox/components/AbstractButton.js Parādīt failu

@@ -2,8 +2,8 @@
2 2
 
3 3
 import React, { Component } from 'react';
4 4
 
5
-import ToolboxItem from '../ToolboxItem';
6
-import type { Styles } from '../AbstractToolboxItem';
5
+import type { Styles } from './AbstractToolboxItem';
6
+import ToolboxItem from './ToolboxItem';
7 7
 
8 8
 export type Props = {
9 9
 

react/features/toolbox/components/buttons/AbstractHangupButton.js → react/features/base/toolbox/components/AbstractHangupButton.js Parādīt failu

@@ -6,7 +6,9 @@ import type { Props } from './AbstractButton';
6 6
 /**
7 7
  * An abstract implementation of a button for disconnecting a conference.
8 8
  */
9
-class AbstractHangupButton<P : Props, S: *> extends AbstractButton<P, S> {
9
+export default class AbstractHangupButton<P : Props, S: *>
10
+    extends AbstractButton<P, S> {
11
+
10 12
     accessibilityLabel = 'Hangup';
11 13
     iconName = 'icon-hangup';
12 14
 
@@ -31,5 +33,3 @@ class AbstractHangupButton<P : Props, S: *> extends AbstractButton<P, S> {
31 33
         // To be implemented by subclass.
32 34
     }
33 35
 }
34
-
35
-export default AbstractHangupButton;

react/features/toolbox/components/AbstractToolboxItem.js → react/features/base/toolbox/components/AbstractToolboxItem.js Parādīt failu


react/features/toolbox/components/buttons/AbstractVideoMuteButton.js → react/features/base/toolbox/components/AbstractVideoMuteButton.js Parādīt failu

@@ -6,7 +6,9 @@ import type { Props } from './AbstractButton';
6 6
 /**
7 7
  * An abstract implementation of a button for toggling video mute.
8 8
  */
9
-class AbstractVideoMuteButton<P : Props, S : *> extends AbstractButton<P, S> {
9
+export default class AbstractVideoMuteButton<P : Props, S : *>
10
+    extends AbstractButton<P, S> {
11
+
10 12
     accessibilityLabel = 'Video mute';
11 13
     iconName = 'icon-camera';
12 14
     toggledIconName = 'icon-camera-disabled toggled';
@@ -57,5 +59,3 @@ class AbstractVideoMuteButton<P : Props, S : *> extends AbstractButton<P, S> {
57 59
         // To be implemented by subclass.
58 60
     }
59 61
 }
60
-
61
-export default AbstractVideoMuteButton;

react/features/toolbox/components/ToolboxItem.native.js → react/features/base/toolbox/components/ToolboxItem.native.js Parādīt failu

@@ -3,7 +3,7 @@
3 3
 import React from 'react';
4 4
 import { TouchableHighlight } from 'react-native';
5 5
 
6
-import { Icon } from '../../base/font-icons';
6
+import { Icon } from '../../../base/font-icons';
7 7
 
8 8
 import AbstractToolboxItem from './AbstractToolboxItem';
9 9
 import type { Props } from './AbstractToolboxItem';

react/features/toolbox/components/ToolboxItem.web.js → react/features/base/toolbox/components/ToolboxItem.web.js Parādīt failu


+ 7
- 0
react/features/base/toolbox/components/index.js Parādīt failu

@@ -0,0 +1,7 @@
1
+// @flow
2
+
3
+export { default as AbstractButton } from './AbstractButton';
4
+export type { Props as AbstractButtonProps } from './AbstractButton';
5
+export { default as AbstractAudioMuteButton } from './AbstractAudioMuteButton';
6
+export { default as AbstractHangupButton } from './AbstractHangupButton';
7
+export { default as AbstractVideoMuteButton } from './AbstractVideoMuteButton';

+ 3
- 0
react/features/base/toolbox/index.js Parādīt failu

@@ -0,0 +1,3 @@
1
+// @flow
2
+
3
+export * from './components';

+ 0
- 2
react/features/filmstrip/components/index.js Parādīt failu

@@ -1,3 +1 @@
1 1
 export * from './_';
2
-
3
-export { default as Filmstrip } from './Filmstrip';

+ 1
- 1
react/features/filmstrip/components/native/AudioMutedIndicator.js Parādīt failu

@@ -7,7 +7,7 @@ import styles from './styles';
7 7
 /**
8 8
  * Thumbnail badge for displaying the audio mute status of a participant.
9 9
  */
10
-export class AudioMutedIndicator extends Component {
10
+export default class AudioMutedIndicator extends Component {
11 11
     /**
12 12
      * Implements React's {@link Component#render()}.
13 13
      *

+ 1
- 1
react/features/filmstrip/components/native/DominantSpeakerIndicator.js Parādīt failu

@@ -8,7 +8,7 @@ import styles from './styles';
8 8
  * Thumbnail badge showing that the participant is the dominant speaker in
9 9
  * the conference.
10 10
  */
11
-export class DominantSpeakerIndicator extends Component {
11
+export default class DominantSpeakerIndicator extends Component {
12 12
     /**
13 13
      * Implements React's {@link Component#render()}.
14 14
      *

react/features/filmstrip/components/Filmstrip.native.js → react/features/filmstrip/components/native/Filmstrip.js Parādīt failu

@@ -4,11 +4,11 @@ import React, { Component } from 'react';
4 4
 import { ScrollView } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7
-import { Container } from '../../base/react';
7
+import { Container } from '../../../base/react';
8 8
 import {
9 9
     isNarrowAspectRatio,
10 10
     makeAspectRatioAware
11
-} from '../../base/responsive-ui';
11
+} from '../../../base/responsive-ui';
12 12
 
13 13
 import LocalThumbnail from './LocalThumbnail';
14 14
 import styles from './styles';

react/features/filmstrip/components/LocalThumbnail.js → react/features/filmstrip/components/native/LocalThumbnail.js Parādīt failu

@@ -4,9 +4,9 @@ import React, { Component } from 'react';
4 4
 import { View } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7
-import { getLocalParticipant } from '../../base/participants';
7
+import { getLocalParticipant } from '../../../base/participants';
8 8
 
9
-import styles from './styles';
9
+import styles from '../styles';
10 10
 import Thumbnail from './Thumbnail';
11 11
 
12 12
 type Props = {

+ 1
- 1
react/features/filmstrip/components/native/ModeratorIndicator.js Parādīt failu

@@ -6,7 +6,7 @@ import styles from './styles';
6 6
 /**
7 7
  * Thumbnail badge showing that the participant is a conference moderator.
8 8
  */
9
-export class ModeratorIndicator extends Component {
9
+export default class ModeratorIndicator extends Component {
10 10
     /**
11 11
      * Implements React's {@link Component#render()}.
12 12
      *

react/features/filmstrip/components/Thumbnail.js → react/features/filmstrip/components/native/Thumbnail.js Parādīt failu

@@ -2,23 +2,21 @@ import PropTypes from 'prop-types';
2 2
 import React, { Component } from 'react';
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { Audio, MEDIA_TYPE } from '../../base/media';
5
+import { Audio, MEDIA_TYPE } from '../../../base/media';
6 6
 import {
7 7
     PARTICIPANT_ROLE,
8 8
     ParticipantView,
9 9
     pinParticipant
10
-} from '../../base/participants';
11
-import { Container } from '../../base/react';
12
-import { getTrackByMediaTypeAndParticipant } from '../../base/tracks';
13
-
14
-import {
15
-    AudioMutedIndicator,
16
-    DominantSpeakerIndicator,
17
-    ModeratorIndicator,
18
-    styles,
19
-    VideoMutedIndicator
20
-} from './_';
21
-import { AVATAR_SIZE } from './styles';
10
+} from '../../../base/participants';
11
+import { Container } from '../../../base/react';
12
+import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks';
13
+
14
+import AudioMutedIndicator from './AudioMutedIndicator';
15
+import DominantSpeakerIndicator from './DominantSpeakerIndicator';
16
+import ModeratorIndicator from './ModeratorIndicator';
17
+import { AVATAR_SIZE } from '../styles';
18
+import styles from './styles';
19
+import VideoMutedIndicator from './VideoMutedIndicator';
22 20
 
23 21
 /**
24 22
  * React component for video thumbnail.

+ 1
- 1
react/features/filmstrip/components/native/VideoMutedIndicator.js Parādīt failu

@@ -7,7 +7,7 @@ import styles from './styles';
7 7
 /**
8 8
  * Thumbnail badge for displaying the video mute status of a participant.
9 9
  */
10
-export class VideoMutedIndicator extends Component {
10
+export default class VideoMutedIndicator extends Component {
11 11
     /**
12 12
      * Implements React's {@link Component#render()}.
13 13
      *

+ 1
- 4
react/features/filmstrip/components/native/index.js Parādīt failu

@@ -1,5 +1,2 @@
1
-export * from './AudioMutedIndicator';
2
-export * from './DominantSpeakerIndicator';
3
-export * from './ModeratorIndicator';
1
+export { default as Filmstrip } from './Filmstrip';
4 2
 export { default as styles } from './styles';
5
-export * from './VideoMutedIndicator';

+ 6
- 7
react/features/filmstrip/components/native/styles.js Parādīt failu

@@ -18,12 +18,6 @@ const indicator = {
18 18
  * The styles of the feature filmstrip.
19 19
  */
20 20
 export default createStyleSheet(platformIndependentStyles, {
21
-
22
-    /**
23
-     * Audio muted indicator style.
24
-     */
25
-    thumbnailIndicator: indicator,
26
-
27 21
     dominantSpeakerIndicator: {
28 22
         fontSize: 12
29 23
     },
@@ -47,5 +41,10 @@ export default createStyleSheet(platformIndependentStyles, {
47 41
     thumbnail: {
48 42
         height: 80,
49 43
         width: 80
50
-    }
44
+    },
45
+
46
+    /**
47
+     * Audio muted indicator style.
48
+     */
49
+    thumbnailIndicator: indicator
51 50
 });

react/features/filmstrip/components/Filmstrip.web.js → react/features/filmstrip/components/web/Filmstrip.js Parādīt failu

@@ -5,10 +5,10 @@ import PropTypes from 'prop-types';
5 5
 import React, { Component } from 'react';
6 6
 import { connect } from 'react-redux';
7 7
 
8
-import { dockToolbox } from '../../toolbox';
8
+import { dockToolbox } from '../../../toolbox';
9 9
 
10
-import { setFilmstripHovered } from '../actions';
11
-import { shouldRemoteVideosBeVisible } from '../functions';
10
+import { setFilmstripHovered } from '../../actions';
11
+import { shouldRemoteVideosBeVisible } from '../../functions';
12 12
 import Toolbar from './Toolbar';
13 13
 
14 14
 declare var interfaceConfig: Object;

react/features/filmstrip/components/Toolbar.web.js → react/features/filmstrip/components/web/Toolbar.js Parādīt failu

@@ -3,12 +3,12 @@
3 3
 import React, { Component } from 'react';
4 4
 import { connect } from 'react-redux';
5 5
 
6
+import { SettingsButton } from '../../../settings';
6 7
 import {
7 8
     AudioMuteButton,
8 9
     HangupButton,
9
-    SettingsButton,
10 10
     VideoMuteButton
11
-} from '../../toolbox';
11
+} from '../../../toolbox';
12 12
 
13 13
 declare var interfaceConfig: Object;
14 14
 

+ 1
- 0
react/features/filmstrip/components/web/index.js Parādīt failu

@@ -1,6 +1,7 @@
1 1
 export { default as AudioMutedIndicator } from './AudioMutedIndicator';
2 2
 export { default as DominantSpeakerIndicator }
3 3
     from './DominantSpeakerIndicator';
4
+export { default as Filmstrip } from './Filmstrip';
4 5
 export { default as ModeratorIndicator } from './ModeratorIndicator';
5 6
 export { default as RaisedHandIndicator } from './RaisedHandIndicator';
6 7
 export { default as VideoMutedIndicator } from './VideoMutedIndicator';

react/features/toolbox/components/buttons/native/InviteButton.js → react/features/invite/components/InviteButton.native.js Parādīt failu

@@ -2,15 +2,12 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import {
6
-    beginAddPeople,
7
-    isAddPeopleEnabled,
8
-    isDialOutEnabled
9
-} from '../../../../invite';
10
-import { beginShareRoom } from '../../../../share-room';
11
-
12
-import AbstractButton from '../AbstractButton';
13
-import type { Props as AbstractButtonProps } from '../AbstractButton';
5
+import { AbstractButton } from '../../base/toolbox';
6
+import type { AbstractButtonProps } from '../../base/toolbox';
7
+import { beginShareRoom } from '../../share-room';
8
+
9
+import { beginAddPeople } from '../actions';
10
+import { isAddPeopleEnabled, isDialOutEnabled } from '../functions';
14 11
 
15 12
 type Props = AbstractButtonProps & {
16 13
 

react/features/toolbox/components/OverflowMenuProfileItem.native.js → react/features/invite/components/InviteButton.web.js Parādīt failu


+ 2
- 1
react/features/invite/components/index.js Parādīt failu

@@ -1,3 +1,4 @@
1 1
 export { default as AddPeopleDialog } from './AddPeopleDialog';
2
-export { default as InfoDialogButton } from './InfoDialogButton';
3 2
 export { DialInSummary } from './dial-in-summary';
3
+export { default as InfoDialogButton } from './InfoDialogButton';
4
+export { default as InviteButton } from './InviteButton';

react/features/toolbox/components/buttons/native/AudioRouteButton.js → react/features/mobile/audio-mode/components/AudioRouteButton.js Parādīt failu

@@ -9,13 +9,12 @@ import {
9 9
 } from 'react-native';
10 10
 import { connect } from 'react-redux';
11 11
 
12
-import { openDialog } from '../../../../base/dialog';
13
-import { translate } from '../../../../base/i18n';
14
-import { AudioRoutePickerDialog } from '../../../../mobile/audio-mode';
15
-
16
-import AbstractButton from '../AbstractButton';
17
-import type { Props as AbstractButtonProps } from '../AbstractButton';
12
+import { openDialog } from '../../../base/dialog';
13
+import { translate } from '../../../base/i18n';
14
+import { AbstractButton } from '../../../base/toolbox';
15
+import type { AbstractButtonProps } from '../../../base/toolbox';
18 16
 
17
+import AudioRoutePickerDialog from './AudioRoutePickerDialog';
19 18
 
20 19
 /**
21 20
  * The {@code MPVolumeView} React {@code Component}. It will only be available

+ 1
- 3
react/features/mobile/audio-mode/components/index.js Parādīt failu

@@ -1,3 +1 @@
1
-export {
2
-    default as AudioRoutePickerDialog
3
-} from './AudioRoutePickerDialog';
1
+export { default as AudioRouteButton } from './AudioRouteButton';

react/features/toolbox/components/buttons/native/PictureInPictureButton.js → react/features/mobile/picture-in-picture/components/PictureInPictureButton.js Parādīt failu

@@ -2,12 +2,12 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { getAppProp } from '../../../../app';
6
-import { translate } from '../../../../base/i18n';
7
-import { enterPictureInPicture } from '../../../../mobile/picture-in-picture';
5
+import { getAppProp } from '../../../app';
6
+import { translate } from '../../../base/i18n';
7
+import { AbstractButton } from '../../../base/toolbox';
8
+import type { AbstractButtonProps } from '../../../base/toolbox';
8 9
 
9
-import AbstractButton from '../AbstractButton';
10
-import type { Props as AbstractButtonProps } from '../AbstractButton';
10
+import { enterPictureInPicture } from '../actions';
11 11
 
12 12
 type Props = AbstractButtonProps & {
13 13
 

+ 1
- 0
react/features/mobile/picture-in-picture/components/index.js Parādīt failu

@@ -0,0 +1 @@
1
+export { default as PictureInPictureButton } from './PictureInPictureButton';

+ 1
- 0
react/features/mobile/picture-in-picture/index.js Parādīt failu

@@ -1,2 +1,3 @@
1 1
 export * from './actions';
2 2
 export * from './actionTypes';
3
+export * from './components';

react/features/toolbox/components/buttons/native/RoomLockButton.js → react/features/room-lock/components/RoomLockButton.js Parādīt failu

@@ -2,11 +2,11 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { translate } from '../../../../base/i18n';
6
-import { beginRoomLockRequest } from '../../../../room-lock';
5
+import { translate } from '../../base/i18n';
6
+import { AbstractButton } from '../../base/toolbox';
7
+import type { AbstractButtonProps } from '../../base/toolbox';
7 8
 
8
-import AbstractButton from '../AbstractButton';
9
-import type { Props as AbstractButtonProps } from '../AbstractButton';
9
+import { beginRoomLockRequest } from '../actions';
10 10
 
11 11
 type Props = AbstractButtonProps & {
12 12
 
@@ -24,7 +24,7 @@ type Props = AbstractButtonProps & {
24 24
      * The redux {@code dispatch} function.
25 25
      */
26 26
     dispatch: Function
27
-}
27
+};
28 28
 
29 29
 /**
30 30
  * An implementation of a button for locking / unlocking a room.

+ 1
- 0
react/features/room-lock/components/index.js Parādīt failu

@@ -1,2 +1,3 @@
1 1
 export { default as PasswordRequiredPrompt } from './PasswordRequiredPrompt';
2
+export { default as RoomLockButton } from './RoomLockButton';
2 3
 export { default as RoomLockPrompt } from './RoomLockPrompt';

react/features/toolbox/components/buttons/web/SettingsButton.js → react/features/settings/components/web/SettingsButton.js Parādīt failu

@@ -2,13 +2,12 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { createToolbarEvent, sendAnalytics } from '../../../../analytics';
6
-import { translate } from '../../../../base/i18n';
7
-import { openDeviceSelectionDialog } from '../../../../device-selection';
8
-import { toggleSettings } from '../../../../side-panel';
9
-
10
-import AbstractButton from '../AbstractButton';
11
-import type { Props as AbstractButtonProps } from '../AbstractButton';
5
+import { createToolbarEvent, sendAnalytics } from '../../../analytics';
6
+import { translate } from '../../../base/i18n';
7
+import { AbstractButton } from '../../../base/toolbox';
8
+import type { AbstractButtonProps } from '../../../base/toolbox';
9
+import { openDeviceSelectionDialog } from '../../../device-selection';
10
+import { toggleSettings } from '../../../side-panel';
12 11
 
13 12
 declare var interfaceConfig: Object;
14 13
 
@@ -28,7 +27,7 @@ type Props = AbstractButtonProps & {
28 27
      * The redux {@code dispatch} function.
29 28
      */
30 29
     dispatch: Function
31
-}
30
+};
32 31
 
33 32
 /**
34 33
  * An abstract implementation of a button for accessing settings.

+ 1
- 0
react/features/settings/components/web/index.js Parādīt failu

@@ -1 +1,2 @@
1
+export { default as SettingsButton } from './SettingsButton';
1 2
 export { default as SettingsMenu } from './SettingsMenu';

react/features/toolbox/components/buttons/AudioMuteButton.js → react/features/toolbox/components/AudioMuteButton.js Parādīt failu

@@ -6,16 +6,12 @@ import {
6 6
     AUDIO_MUTE,
7 7
     createToolbarEvent,
8 8
     sendAnalytics
9
-} from '../../../analytics';
10
-import { translate } from '../../../base/i18n';
11
-import {
12
-    MEDIA_TYPE,
13
-    setAudioMuted
14
-} from '../../../base/media';
15
-import { isLocalTrackMuted } from '../../../base/tracks';
16
-
17
-import AbstractAudioMuteButton from './AbstractAudioMuteButton';
18
-import type { Props as AbstractButtonProps } from './AbstractButton';
9
+} from '../../analytics';
10
+import { translate } from '../../base/i18n';
11
+import { MEDIA_TYPE, setAudioMuted } from '../../base/media';
12
+import { AbstractAudioMuteButton } from '../../base/toolbox';
13
+import type { AbstractButtonProps } from '../../base/toolbox';
14
+import { isLocalTrackMuted } from '../../base/tracks';
19 15
 
20 16
 type Props = AbstractButtonProps & {
21 17
 

react/features/toolbox/components/buttons/HangupButton.js → react/features/toolbox/components/HangupButton.js Parādīt failu

@@ -2,14 +2,13 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { createToolbarEvent, sendAnalytics } from '../../../analytics';
6
-import { appNavigate } from '../../../app';
5
+import { createToolbarEvent, sendAnalytics } from '../../analytics';
6
+import { appNavigate } from '../../app';
7 7
 
8
-import { disconnect } from '../../../base/connection';
9
-import { translate } from '../../../base/i18n';
10
-
11
-import AbstractHangupButton from './AbstractHangupButton';
12
-import type { Props as AbstractButtonProps } from './AbstractButton';
8
+import { disconnect } from '../../base/connection';
9
+import { translate } from '../../base/i18n';
10
+import { AbstractHangupButton } from '../../base/toolbox';
11
+import type { AbstractButtonProps } from '../../base/toolbox';
13 12
 
14 13
 type Props = AbstractButtonProps & {
15 14
 

+ 0
- 57
react/features/toolbox/components/Notice.js Parādīt failu

@@ -1,57 +0,0 @@
1
-/* @flow */
2
-
3
-import React, { Component } from 'react';
4
-
5
-declare var config: Object;
6
-
7
-/**
8
- * Notice react component.
9
- *
10
- * @class Notice
11
- */
12
-export default class Notice extends Component<*, *> {
13
-    state: Object;
14
-
15
-    /**
16
-     * Constructor of Notice component.
17
-     *
18
-     * @param {Object} props - The read-only React Component props with which
19
-     * the new instance is to be initialized.
20
-     */
21
-    constructor(props: Object) {
22
-        super(props);
23
-
24
-        const { noticeMessage } = config;
25
-
26
-        this.state = {
27
-            /**
28
-             * Message to be shown in notice component.
29
-             *
30
-             * @type {string}
31
-             */
32
-            noticeMessage
33
-        };
34
-    }
35
-
36
-    /**
37
-     * Implements React's {@link Component#render()}.
38
-     *
39
-     * @inheritdoc
40
-     * @returns {ReactElement}
41
-     */
42
-    render() {
43
-        const { noticeMessage } = this.state;
44
-
45
-        if (!noticeMessage) {
46
-            return null;
47
-        }
48
-
49
-        return (
50
-            <div className = 'notice'>
51
-                <span className = 'notice__message' >
52
-                    { noticeMessage }
53
-                </span>
54
-            </div>
55
-        );
56
-    }
57
-}

react/features/toolbox/components/buttons/VideoMuteButton.js → react/features/toolbox/components/VideoMuteButton.js Parādīt failu

@@ -6,17 +6,16 @@ import {
6 6
     VIDEO_MUTE,
7 7
     createToolbarEvent,
8 8
     sendAnalytics
9
-} from '../../../analytics';
10
-import { translate } from '../../../base/i18n';
9
+} from '../../analytics';
10
+import { translate } from '../../base/i18n';
11 11
 import {
12 12
     MEDIA_TYPE,
13 13
     VIDEO_MUTISM_AUTHORITY,
14 14
     setVideoMuted
15
-} from '../../../base/media';
16
-import { isLocalTrackMuted } from '../../../base/tracks';
17
-
18
-import AbstractVideoMuteButton from './AbstractVideoMuteButton';
19
-import type { Props as AbstractButtonProps } from './AbstractButton';
15
+} from '../../base/media';
16
+import { AbstractVideoMuteButton } from '../../base/toolbox';
17
+import type { AbstractButtonProps } from '../../base/toolbox';
18
+import { isLocalTrackMuted } from '../../base/tracks';
20 19
 
21 20
 type Props = AbstractButtonProps & {
22 21
 

react/features/toolbox/components/buttons/_.native.js → react/features/toolbox/components/_.native.js Parādīt failu


react/features/toolbox/components/buttons/_.web.js → react/features/toolbox/components/_.web.js Parādīt failu


+ 0
- 5
react/features/toolbox/components/buttons/index.js Parādīt failu

@@ -1,5 +0,0 @@
1
-export * from './_';
2
-
3
-export { default as AudioMuteButton } from './AudioMuteButton';
4
-export { default as HangupButton } from './HangupButton';
5
-export { default as VideoMuteButton } from './VideoMuteButton';

+ 0
- 50
react/features/toolbox/components/buttons/native/ShareRoomButton.js Parādīt failu

@@ -1,50 +0,0 @@
1
-// @flow
2
-
3
-import { connect } from 'react-redux';
4
-
5
-import { translate } from '../../../../base/i18n';
6
-import { beginShareRoom } from '../../../../share-room';
7
-
8
-import AbstractButton from '../AbstractButton';
9
-import type { Props as AbstractButtonProps } from '../AbstractButton';
10
-
11
-type Props = AbstractButtonProps & {
12
-
13
-    /**
14
-     * The redux {@code dispatch} function.
15
-     */
16
-    dispatch: Function
17
-}
18
-
19
-/**
20
- * An implementation of a button for sharing a room using the native OS sharing
21
- * capabilities.
22
- */
23
-class ShareRoomButton extends AbstractButton<Props, *> {
24
-    accessibilityLabel = 'Share room';
25
-    iconName = 'icon-link';
26
-    label = 'toolbar.shareRoom';
27
-
28
-    /**
29
-     * Handles clicking / pressing the button, and opens the appropriate dialog.
30
-     *
31
-     * @private
32
-     * @returns {void}
33
-     */
34
-    _handleClick() {
35
-        this.props.dispatch(beginShareRoom());
36
-    }
37
-
38
-    /**
39
-     * Indicates whether this button is disabled or not.
40
-     *
41
-     * @override
42
-     * @private
43
-     * @returns {boolean}
44
-     */
45
-    _isDisabled() {
46
-        return false;
47
-    }
48
-}
49
-
50
-export default translate(connect()(ShareRoomButton));

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

@@ -1,6 +0,0 @@
1
-export { default as AudioOnlyButton } from './AudioOnlyButton';
2
-export { default as AudioRouteButton } from './AudioRouteButton';
3
-export { default as InviteButton } from './InviteButton';
4
-export { default as PictureInPictureButton } from './PictureInPictureButton';
5
-export { default as RoomLockButton } from './RoomLockButton';
6
-export { default as ToggleCameraButton } from './ToggleCameraButton';

+ 0
- 1
react/features/toolbox/components/buttons/web/index.js Parādīt failu

@@ -1 +0,0 @@
1
-export { default as SettingsButton } from './SettingsButton';

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

@@ -1,3 +1,6 @@
1
-export { default as ToolbarButton } from './ToolbarButton';
2
-export { default as Toolbox } from './Toolbox';
3
-export * from './buttons';
1
+// @flow
2
+
3
+export * from './_';
4
+export { default as AudioMuteButton } from './AudioMuteButton';
5
+export { default as HangupButton } from './HangupButton';
6
+export { default as VideoMuteButton } from './VideoMuteButton';

react/features/toolbox/components/buttons/native/AudioOnlyButton.js → react/features/toolbox/components/native/AudioOnlyButton.js Parādīt failu

@@ -2,11 +2,10 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { toggleAudioOnly } from '../../../../base/conference';
6
-import { translate } from '../../../../base/i18n';
7
-
8
-import AbstractButton from '../AbstractButton';
9
-import type { Props as AbstractButtonProps } from '../AbstractButton';
5
+import { toggleAudioOnly } from '../../../base/conference';
6
+import { translate } from '../../../base/i18n';
7
+import { AbstractButton } from '../../../base/toolbox';
8
+import type { AbstractButtonProps } from '../../../base/toolbox';
10 9
 
11 10
 type Props = AbstractButtonProps & {
12 11
 
@@ -19,7 +18,7 @@ type Props = AbstractButtonProps & {
19 18
      * The redux {@code dispatch} function.
20 19
      */
21 20
     dispatch: Function
22
-}
21
+};
23 22
 
24 23
 /**
25 24
  * An implementation of a button for toggling the audio-only mode.

react/features/toolbox/components/buttons/native/ToggleCameraButton.js → react/features/toolbox/components/native/ToggleCameraButton.js Parādīt failu

@@ -2,12 +2,11 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
-import { translate } from '../../../../base/i18n';
6
-import { MEDIA_TYPE, toggleCameraFacingMode } from '../../../../base/media';
7
-import { isLocalTrackMuted } from '../../../../base/tracks';
8
-
9
-import AbstractButton from '../AbstractButton';
10
-import type { Props as AbstractButtonProps } from '../AbstractButton';
5
+import { translate } from '../../../base/i18n';
6
+import { MEDIA_TYPE, toggleCameraFacingMode } from '../../../base/media';
7
+import { AbstractButton } from '../../../base/toolbox';
8
+import type { AbstractButtonProps } from '../../../base/toolbox';
9
+import { isLocalTrackMuted } from '../../../base/tracks';
11 10
 
12 11
 type Props = AbstractButtonProps & {
13 12
 
@@ -25,7 +24,7 @@ type Props = AbstractButtonProps & {
25 24
      * The redux {@code dispatch} function.
26 25
      */
27 26
     dispatch: Function
28
-}
27
+};
29 28
 
30 29
 /**
31 30
  * An implementation of a button for toggling the camera facing mode.

react/features/toolbox/components/ToolbarButton.native.js → react/features/toolbox/components/native/ToolbarButton.js Parādīt failu

@@ -3,9 +3,9 @@ import React from 'react';
3 3
 import { TouchableHighlight } from 'react-native';
4 4
 import { connect } from 'react-redux';
5 5
 
6
-import { Icon } from '../../base/font-icons';
6
+import { Icon } from '../../../base/font-icons';
7 7
 
8
-import AbstractToolbarButton from './AbstractToolbarButton';
8
+import AbstractToolbarButton from '../AbstractToolbarButton';
9 9
 
10 10
 /**
11 11
  * Represents a button in {@link Toolbar} on React Native.

react/features/toolbox/components/Toolbox.native.js → react/features/toolbox/components/native/Toolbox.js Parādīt failu

@@ -4,26 +4,23 @@ import React, { Component } from 'react';
4 4
 import { View } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7
-import { Container } from '../../base/react';
7
+import { Container } from '../../../base/react';
8 8
 import {
9 9
     isNarrowAspectRatio,
10 10
     makeAspectRatioAware
11
-} from '../../base/responsive-ui';
12
-import { ColorPalette } from '../../base/styles';
13
-
11
+} from '../../../base/responsive-ui';
12
+import { ColorPalette } from '../../../base/styles';
13
+import { InviteButton } from '../../../invite';
14
+import { AudioRouteButton } from '../../../mobile/audio-mode';
15
+import { PictureInPictureButton } from '../../../mobile/picture-in-picture';
16
+import { RoomLockButton } from '../../../room-lock';
17
+
18
+import AudioMuteButton from '../AudioMuteButton';
19
+import AudioOnlyButton from './AudioOnlyButton';
20
+import HangupButton from '../HangupButton';
14 21
 import styles from './styles';
15
-
16
-import {
17
-    AudioMuteButton,
18
-    AudioOnlyButton,
19
-    AudioRouteButton,
20
-    HangupButton,
21
-    PictureInPictureButton,
22
-    RoomLockButton,
23
-    InviteButton,
24
-    ToggleCameraButton,
25
-    VideoMuteButton
26
-} from './buttons';
22
+import ToggleCameraButton from './ToggleCameraButton';
23
+import VideoMuteButton from '../VideoMuteButton';
27 24
 
28 25
 /**
29 26
  * Styles for the hangup button.

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

@@ -0,0 +1,2 @@
1
+export { default as ToolbarButton } from './ToolbarButton';
2
+export { default as Toolbox } from './Toolbox';

react/features/toolbox/components/styles.js → react/features/toolbox/components/native/styles.js Parādīt failu

@@ -1,4 +1,4 @@
1
-import { BoxModel, ColorPalette, createStyleSheet } from '../../base/styles';
1
+import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
2 2
 
3 3
 /**
4 4
  * The base style for toolbars.

react/features/toolbox/components/OverflowMenuButton.web.js → react/features/toolbox/components/web/OverflowMenuButton.js Parādīt failu

@@ -2,8 +2,8 @@ import InlineDialog from '@atlaskit/inline-dialog';
2 2
 import PropTypes from 'prop-types';
3 3
 import React, { Component } from 'react';
4 4
 
5
-import { createToolbarEvent, sendAnalytics } from '../../analytics';
6
-import { translate } from '../../base/i18n';
5
+import { createToolbarEvent, sendAnalytics } from '../../../analytics';
6
+import { translate } from '../../../base/i18n';
7 7
 
8 8
 import ToolbarButton from './ToolbarButton';
9 9
 

react/features/toolbox/components/OverflowMenuItem.web.js → react/features/toolbox/components/web/OverflowMenuItem.js Parādīt failu


react/features/toolbox/components/OverflowMenuProfileItem.web.js → react/features/toolbox/components/web/OverflowMenuProfileItem.js Parādīt failu

@@ -8,7 +8,7 @@ import {
8 8
     Avatar,
9 9
     getAvatarURL,
10 10
     getLocalParticipant
11
-} from '../../base/participants';
11
+} from '../../../base/participants';
12 12
 
13 13
 /**
14 14
  * A React {@code Component} for displaying a link with a profile avatar as an

react/features/toolbox/components/ToolbarButton.web.js → react/features/toolbox/components/web/ToolbarButton.js Parādīt failu

@@ -2,7 +2,7 @@ import Tooltip from '@atlaskit/tooltip';
2 2
 import PropTypes from 'prop-types';
3 3
 import React from 'react';
4 4
 
5
-import AbstractToolbarButton from './AbstractToolbarButton';
5
+import AbstractToolbarButton from '../AbstractToolbarButton';
6 6
 
7 7
 /**
8 8
  * Represents a button in the toolbar.

react/features/toolbox/components/Toolbox.web.js → react/features/toolbox/components/web/Toolbox.js Parādīt failu

@@ -8,50 +8,47 @@ import {
8 8
     createShortcutEvent,
9 9
     createToolbarEvent,
10 10
     sendAnalytics
11
-} from '../../analytics';
12
-import { openDialog } from '../../base/dialog';
13
-import { translate } from '../../base/i18n';
11
+} from '../../../analytics';
12
+import { openDialog } from '../../../base/dialog';
13
+import { translate } from '../../../base/i18n';
14 14
 import {
15 15
     PARTICIPANT_ROLE,
16 16
     getLocalParticipant,
17 17
     participantUpdated
18
-} from '../../base/participants';
19
-import { getLocalVideoTrack, toggleScreensharing } from '../../base/tracks';
20
-import { ChatCounter } from '../../chat';
21
-import { toggleDocument } from '../../etherpad';
22
-import { openFeedbackDialog } from '../../feedback';
18
+} from '../../../base/participants';
19
+import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
20
+import { ChatCounter } from '../../../chat';
21
+import { toggleDocument } from '../../../etherpad';
22
+import { openFeedbackDialog } from '../../../feedback';
23 23
 import {
24 24
     beginAddPeople,
25 25
     InfoDialogButton,
26 26
     isAddPeopleEnabled,
27 27
     isDialOutEnabled
28
-} from '../../invite';
29
-import { openKeyboardShortcutsDialog } from '../../keyboard-shortcuts';
30
-import { RECORDING_TYPES, toggleRecording } from '../../recording';
31
-import { toggleSharedVideo } from '../../shared-video';
32
-import { toggleChat, toggleProfile } from '../../side-panel';
33
-import { SpeakerStats } from '../../speaker-stats';
28
+} from '../../../invite';
29
+import { openKeyboardShortcutsDialog } from '../../../keyboard-shortcuts';
30
+import { RECORDING_TYPES, toggleRecording } from '../../../recording';
31
+import { SettingsButton } from '../../../settings';
32
+import { toggleSharedVideo } from '../../../shared-video';
33
+import { toggleChat, toggleProfile } from '../../../side-panel';
34
+import { SpeakerStats } from '../../../speaker-stats';
34 35
 import {
35 36
     OverflowMenuVideoQualityItem,
36 37
     VideoQualityDialog
37
-} from '../../video-quality';
38
+} from '../../../video-quality';
38 39
 
39 40
 import {
40 41
     setFullScreen,
41 42
     setOverflowMenuVisible,
42 43
     setToolbarHovered
43
-} from '../actions';
44
-
44
+} from '../../actions';
45
+import AudioMuteButton from '../AudioMuteButton';
46
+import HangupButton from '../HangupButton';
45 47
 import OverflowMenuButton from './OverflowMenuButton';
46 48
 import OverflowMenuItem from './OverflowMenuItem';
47 49
 import OverflowMenuProfileItem from './OverflowMenuProfileItem';
48 50
 import ToolbarButton from './ToolbarButton';
49
-import {
50
-    AudioMuteButton,
51
-    HangupButton,
52
-    SettingsButton,
53
-    VideoMuteButton
54
-} from './buttons';
51
+import VideoMuteButton from '../VideoMuteButton';
55 52
 
56 53
 type Props = {
57 54
 

+ 2
- 0
react/features/toolbox/components/web/index.js Parādīt failu

@@ -0,0 +1,2 @@
1
+export { default as ToolbarButton } from './ToolbarButton';
2
+export { default as Toolbox } from './Toolbox';

Notiek ielāde…
Atcelt
Saglabāt