feat(ConferenceTimer): Add config option to hide.

This commit is contained in:
Hristo Terezov 2020-12-03 15:49:08 -06:00
parent d77c5ccb7d
commit 5cae5985c0
4 changed files with 20 additions and 4 deletions

View File

@ -616,6 +616,12 @@ var config = {
// otherwise the app doesn't render it. // otherwise the app doesn't render it.
// moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com', // moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com',
// Hides the conference timer.
// hideConferenceTimer: true,
// Sets the conference subject
// subject: 'Conference Subject',
// List of undocumented settings used in jitsi-meet // List of undocumented settings used in jitsi-meet
/** /**
_immediateReloadThreshold _immediateReloadThreshold

View File

@ -116,6 +116,7 @@ export default [
'forceJVB121Ratio', 'forceJVB121Ratio',
'gatherStats', 'gatherStats',
'googleApiApplicationClientID', 'googleApiApplicationClientID',
'hideConferenceTimer',
'hiddenDomain', 'hiddenDomain',
'hideLobbyButton', 'hideLobbyButton',
'hosts', 'hosts',

View File

@ -96,7 +96,8 @@ class NavigationBar extends Component<Props> {
*/ */
function _mapStateToProps(state) { function _mapStateToProps(state) {
return { return {
_conferenceTimerEnabled: getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true), _conferenceTimerEnabled:
getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !state['features/base/config'].hideConferenceTimer,
_meetingName: getConferenceName(state), _meetingName: getConferenceName(state),
_meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true), _meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true),
_visible: isToolboxVisible(state) _visible: isToolboxVisible(state)

View File

@ -16,7 +16,12 @@ import ParticipantsCount from './ParticipantsCount';
type Props = { type Props = {
/** /**
* Whether then participant count should be shown or not. * Whether the conference timer should be shown or not.
*/
_hideConferenceTimer: Boolean,
/**
* Whether the participant count should be shown or not.
*/ */
_showParticipantCount: boolean, _showParticipantCount: boolean,
@ -46,13 +51,13 @@ class Subject extends Component<Props> {
* @returns {ReactElement} * @returns {ReactElement}
*/ */
render() { render() {
const { _showParticipantCount, _subject, _visible } = this.props; const { _hideConferenceTimer, _showParticipantCount, _subject, _visible } = this.props;
return ( return (
<div className = { `subject ${_visible ? 'visible' : ''}` }> <div className = { `subject ${_visible ? 'visible' : ''}` }>
<span className = 'subject-text'>{ _subject }</span> <span className = 'subject-text'>{ _subject }</span>
{ _showParticipantCount && <ParticipantsCount /> } { _showParticipantCount && <ParticipantsCount /> }
<ConferenceTimer /> { !_hideConferenceTimer && <ConferenceTimer /> }
</div> </div>
); );
} }
@ -65,6 +70,8 @@ class Subject extends Component<Props> {
* @param {Object} state - The Redux state. * @param {Object} state - The Redux state.
* @private * @private
* @returns {{ * @returns {{
* _hideConferenceTimer: boolean,
* _showParticipantCount: boolean,
* _subject: string, * _subject: string,
* _visible: boolean * _visible: boolean
* }} * }}
@ -73,6 +80,7 @@ function _mapStateToProps(state) {
const participantCount = getParticipantCount(state); const participantCount = getParticipantCount(state);
return { return {
_hideConferenceTimer: Boolean(state['features/base/config'].hideConferenceTimer),
_showParticipantCount: participantCount > 2, _showParticipantCount: participantCount > 2,
_subject: getConferenceName(state), _subject: getConferenceName(state),
_visible: isToolboxVisible(state) && participantCount > 1 _visible: isToolboxVisible(state) && participantCount > 1