Merge pull request #12404 from ramonlsouza/issue-12396

feat: add setting to enable/disable raise hand action button
This commit is contained in:
Anton Georgiev 2021-05-18 13:30:58 -04:00 committed by GitHub
commit af04a4c20d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 24 deletions

View File

@ -27,6 +27,7 @@ class ActionsBar extends PureComponent {
isMeteorConnected,
isPollingEnabled,
isSelectRandomUserEnabled,
isRaiseHandButtonEnabled,
isPresentationDisabled,
isThereCurrentPresentation,
allowExternalVideo,
@ -84,30 +85,34 @@ class ActionsBar extends PureComponent {
/>
)
: null}
<Button
icon="hand"
label={intl.formatMessage({
id: `app.actionsBar.emojiMenu.${
currentUser.emoji === 'raiseHand'
? 'lowerHandLabel'
: 'raiseHandLabel'
}`,
})}
accessKey={shortcuts.raisehand}
color={currentUser.emoji === 'raiseHand' ? 'primary' : 'default'}
data-test={currentUser.emoji === 'raiseHand' ? 'lowerHandLabel' : 'raiseHandLabel'}
ghost={currentUser.emoji !== 'raiseHand'}
className={cx(currentUser.emoji === 'raiseHand' || styles.btn)}
hideLabel
circle
size="lg"
onClick={() => {
setEmojiStatus(
currentUser.userId,
currentUser.emoji === 'raiseHand' ? 'none' : 'raiseHand',
);
}}
/>
{isRaiseHandButtonEnabled
? (
<Button
icon="hand"
label={intl.formatMessage({
id: `app.actionsBar.emojiMenu.${
currentUser.emoji === 'raiseHand'
? 'lowerHandLabel'
: 'raiseHandLabel'
}`,
})}
accessKey={shortcuts.raisehand}
color={currentUser.emoji === 'raiseHand' ? 'primary' : 'default'}
data-test={currentUser.emoji === 'raiseHand' ? 'lowerHandLabel' : 'raiseHandLabel'}
ghost={currentUser.emoji !== 'raiseHand'}
className={cx(currentUser.emoji === 'raiseHand' || styles.btn)}
hideLabel
circle
size="lg"
onClick={() => {
setEmojiStatus(
currentUser.userId,
currentUser.emoji === 'raiseHand' ? 'none' : 'raiseHand',
);
}}
/>
)
: null}
</div>
</div>
);

View File

@ -38,6 +38,7 @@ const ActionsBarContainer = (props) => {
const POLLING_ENABLED = Meteor.settings.public.poll.enabled;
const PRESENTATION_DISABLED = Meteor.settings.public.layout.hidePresentation;
const SELECT_RANDOM_USER_ENABLED = Meteor.settings.public.selectRandomUser.enabled;
const RAISE_HAND_BUTTON_ENABLED = Meteor.settings.public.app.raiseHandActionButton.enabled;
export default withTracker(() => ({
amIPresenter: Service.amIPresenter(),
@ -55,6 +56,7 @@ export default withTracker(() => ({
isPollingEnabled: POLLING_ENABLED,
isPresentationDisabled: PRESENTATION_DISABLED,
isSelectRandomUserEnabled: SELECT_RANDOM_USER_ENABLED,
isRaiseHandButtonEnabled: RAISE_HAND_BUTTON_ENABLED,
isThereCurrentPresentation: Presentations.findOne({ meetingId: Auth.meetingID, current: true },
{ fields: {} }),
allowExternalVideo: Meteor.settings.public.externalVideoPlayer.enabled,

View File

@ -77,6 +77,8 @@ public:
# For more info, see 'microphoneConstraints' option in this config.
# If not set, default value is true.
showAudioFilters: true
raiseHandActionButton:
enabled: true
defaultSettings:
application:
animations: true