config: add ability to hide the "invite more" header button

This commit is contained in:
Adam Wan 2020-06-16 18:07:37 +07:00 committed by GitHub
parent e8e2b3c341
commit e3d66db3d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -38,6 +38,11 @@ var interfaceConfig = {
*/ */
AUTHENTICATION_ENABLE: true, AUTHENTICATION_ENABLE: true,
/**
* Hide the invite prompt in the header when alone in the meeting.
*/
HIDE_INVITE_MORE_HEADER: false,
/** /**
* The name of the toolbar buttons to display in the toolbar. If present, * The name of the toolbar buttons to display in the toolbar. If present,
* the button will display. Exceptions are "livestreaming" and "recording" * the button will display. Exceptions are "livestreaming" and "recording"

View File

@ -29,6 +29,7 @@ export default [
'ENFORCE_NOTIFICATION_AUTO_DISMISS_TIMEOUT', 'ENFORCE_NOTIFICATION_AUTO_DISMISS_TIMEOUT',
'FILM_STRIP_MAX_HEIGHT', 'FILM_STRIP_MAX_HEIGHT',
'GENERATE_ROOMNAMES_ON_WELCOME_PAGE', 'GENERATE_ROOMNAMES_ON_WELCOME_PAGE',
'HIDE_INVITE_MORE_HEADER',
'INDICATOR_FONT_SIZES', 'INDICATOR_FONT_SIZES',
'INITIAL_TOOLBAR_TIMEOUT', 'INITIAL_TOOLBAR_TIMEOUT',
'INVITATION_POWERED_BY', 'INVITATION_POWERED_BY',

View File

@ -9,6 +9,8 @@ import { connect } from '../../../base/redux';
import { beginAddPeople } from '../../../invite'; import { beginAddPeople } from '../../../invite';
import { isToolboxVisible } from '../../../toolbox'; import { isToolboxVisible } from '../../../toolbox';
declare var interfaceConfig: Object;
type Props = { type Props = {
/** /**
@ -74,10 +76,12 @@ function InviteMore({
*/ */
function mapStateToProps(state) { function mapStateToProps(state) {
const participantCount = getParticipantCount(state); const participantCount = getParticipantCount(state);
const isAlone = participantCount === 1;
const hide = interfaceConfig.HIDE_INVITE_MORE_HEADER;
return { return {
_tileViewEnabled: state['features/video-layout'].tileViewEnabled, _tileViewEnabled: state['features/video-layout'].tileViewEnabled,
_visible: isToolboxVisible(state) && participantCount === 1 _visible: isToolboxVisible(state) && isAlone && !hide
}; };
} }