Fix when to see the record indicator
This commit is contained in:
parent
86993144cf
commit
bfc2f6bc24
@ -10,7 +10,6 @@ import DropdownListItem from '/imports/ui/components/dropdown/list/item/componen
|
||||
import PresentationUploaderContainer from '/imports/ui/components/presentation/presentation-uploader/container';
|
||||
import { withModalMounter } from '/imports/ui/components/modal/service';
|
||||
import { styles } from '../styles';
|
||||
import Service from '../service';
|
||||
|
||||
const propTypes = {
|
||||
isUserPresenter: PropTypes.bool.isRequired,
|
||||
@ -88,6 +87,7 @@ class ActionsDropdown extends Component {
|
||||
allowStartStopRecording,
|
||||
isRecording,
|
||||
record,
|
||||
toggleRecording,
|
||||
} = this.props;
|
||||
|
||||
return _.compact([
|
||||
@ -119,7 +119,7 @@ class ActionsDropdown extends Component {
|
||||
description={intl.formatMessage(isRecording ?
|
||||
intlMessages.stopRecording : intlMessages.startRecording)}
|
||||
key={this.recordId}
|
||||
onClick={Service.toggleRecording}
|
||||
onClick={toggleRecording}
|
||||
/>
|
||||
: null),
|
||||
]);
|
||||
@ -138,7 +138,7 @@ class ActionsDropdown extends Component {
|
||||
|
||||
const availableActions = this.getAvailableActions();
|
||||
|
||||
if (availableActions.length === 0 && (!isUserPresenter || !isUserModerator)) return null;
|
||||
if ((!isUserPresenter && !isUserModerator) || availableActions.length === 0) return null;
|
||||
|
||||
return (
|
||||
<Dropdown ref={(ref) => { this._dropdown = ref; }} >
|
||||
|
@ -20,6 +20,7 @@ class ActionsBar extends React.PureComponent {
|
||||
handleEmojiChange,
|
||||
isUserModerator,
|
||||
recordSettingsList,
|
||||
toggleRecording,
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
@ -44,6 +45,7 @@ class ActionsBar extends React.PureComponent {
|
||||
allowStartStopRecording,
|
||||
isRecording,
|
||||
record,
|
||||
toggleRecording,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
@ -19,4 +19,5 @@ export default withTracker(() => ({
|
||||
handleUnshareScreen: () => unshareScreen(),
|
||||
isVideoBroadcasting: isVideoBroadcasting(),
|
||||
recordSettingsList: Service.recordSettingsList(),
|
||||
toggleRecording: Service.toggleRecording,
|
||||
}))(ActionsBarContainer);
|
||||
|
@ -4,14 +4,12 @@ import { makeCall } from '/imports/ui/services/api';
|
||||
import { EMOJI_STATUSES } from '/imports/utils/statuses';
|
||||
import Meetings from '/imports/api/meetings';
|
||||
|
||||
const recordSettings = () => Meetings.findOne({ meetingId: Auth.meetingID }).recordProp;
|
||||
|
||||
export default {
|
||||
isUserPresenter: () => Users.findOne({ userId: Auth.userID }).presenter,
|
||||
getEmoji: () => Users.findOne({ userId: Auth.userID }).emoji,
|
||||
setEmoji: status => makeCall('setEmojiStatus', Auth.userID, status),
|
||||
getEmojiList: () => EMOJI_STATUSES,
|
||||
isUserModerator: () => Users.findOne({ userId: Auth.userID }).moderator,
|
||||
recordSettingsList: () => recordSettings(),
|
||||
recordSettingsList: () => Meetings.findOne({ meetingId: Auth.meetingID }).recordProp,
|
||||
toggleRecording: () => makeCall('toggleRecording'),
|
||||
};
|
||||
|
@ -201,7 +201,9 @@ class NavBar extends Component {
|
||||
</div>
|
||||
<div className={styles.center} role="banner">
|
||||
{this.renderPresentationTitle()}
|
||||
<span className={styles.presentationTitleSeparator}>|</span>
|
||||
{beingRecorded.record ?
|
||||
<span className={styles.presentationTitleSeparator}>|</span>
|
||||
: null}
|
||||
<RecordingIndicator
|
||||
{...beingRecorded}
|
||||
title={intl.formatMessage(intlMessages[recordingMessage])}
|
||||
|
@ -2,9 +2,9 @@ import React from 'react';
|
||||
import { styles } from './styles';
|
||||
|
||||
const RecordingIndicator = ({
|
||||
record, allowStartStopRecording, title, recording,
|
||||
record, title, recording,
|
||||
}) => {
|
||||
if (!record || !allowStartStopRecording) return null;
|
||||
if (!record) return null;
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
Loading…
Reference in New Issue
Block a user