2018-06-20 20:19:53 +00:00
|
|
|
import React from 'react';
|
2022-08-08 09:36:06 +00:00
|
|
|
import { WithTranslation } from 'react-i18next';
|
2018-06-20 20:19:53 +00:00
|
|
|
|
2022-08-02 10:51:42 +00:00
|
|
|
// @ts-ignore
|
2021-06-10 12:48:44 +00:00
|
|
|
import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut';
|
2022-09-15 12:20:11 +00:00
|
|
|
import AbstractDialogTab, {
|
|
|
|
Props as AbstractDialogTabProps
|
|
|
|
} from '../../../base/dialog/components/web/AbstractDialogTab';
|
2022-08-08 09:36:06 +00:00
|
|
|
import { translate } from '../../../base/i18n/functions';
|
2022-08-02 10:51:42 +00:00
|
|
|
import Checkbox from '../../../base/ui/components/web/Checkbox';
|
2022-09-15 12:20:11 +00:00
|
|
|
import Select from '../../../base/ui/components/web/Select';
|
2022-09-06 17:32:20 +00:00
|
|
|
import { MAX_ACTIVE_PARTICIPANTS } from '../../../filmstrip/constants';
|
2021-06-28 07:48:16 +00:00
|
|
|
import { SS_DEFAULT_FRAME_RATE } from '../../constants';
|
2018-06-20 20:19:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The type of the React {@code Component} props of {@link MoreTab}.
|
|
|
|
*/
|
2022-08-08 09:36:06 +00:00
|
|
|
export type Props = AbstractDialogTabProps & WithTranslation & {
|
2018-06-20 20:19:53 +00:00
|
|
|
|
2021-06-28 07:48:16 +00:00
|
|
|
/**
|
|
|
|
* The currently selected desktop share frame rate in the frame rate select dropdown.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
currentFramerate: string;
|
2021-06-28 07:48:16 +00:00
|
|
|
|
2018-06-20 20:19:53 +00:00
|
|
|
/**
|
|
|
|
* The currently selected language to display in the language select
|
|
|
|
* dropdown.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
currentLanguage: string;
|
2018-06-20 20:19:53 +00:00
|
|
|
|
2021-06-28 07:48:16 +00:00
|
|
|
/**
|
|
|
|
* All available desktop capture frame rates.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
desktopShareFramerates: Array<number>;
|
2021-06-28 07:48:16 +00:00
|
|
|
|
2021-12-16 16:55:45 +00:00
|
|
|
/**
|
|
|
|
* Whether to show hide self view setting.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
disableHideSelfView: boolean;
|
2021-12-16 16:55:45 +00:00
|
|
|
|
2022-08-02 10:51:42 +00:00
|
|
|
/**
|
|
|
|
* The types of enabled notifications that can be configured and their specific visibility.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
enabledNotifications: Object;
|
2022-08-02 10:51:42 +00:00
|
|
|
|
2019-04-26 18:11:53 +00:00
|
|
|
/**
|
|
|
|
* Whether or not follow me is currently active (enabled by some other participant).
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
followMeActive: boolean;
|
2019-04-26 18:11:53 +00:00
|
|
|
|
2018-06-20 20:19:53 +00:00
|
|
|
/**
|
2022-08-02 10:51:42 +00:00
|
|
|
* Whether or not to hide self-view screen.
|
2018-06-20 20:19:53 +00:00
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
hideSelfView: boolean;
|
2018-06-20 20:19:53 +00:00
|
|
|
|
2021-12-17 12:39:15 +00:00
|
|
|
/**
|
2022-08-02 10:51:42 +00:00
|
|
|
* All available languages to display in the language select dropdown.
|
2021-12-17 12:39:15 +00:00
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
languages: Array<string>;
|
2021-12-17 12:39:15 +00:00
|
|
|
|
2022-09-15 12:20:11 +00:00
|
|
|
/**
|
|
|
|
* The number of max participants to display on stage.
|
|
|
|
*/
|
|
|
|
maxStageParticipants: number;
|
|
|
|
|
2018-06-20 20:19:53 +00:00
|
|
|
/**
|
|
|
|
* Whether or not to display the language select dropdown.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
showLanguageSettings: boolean;
|
2018-06-20 20:19:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether or not to display moderator-only settings.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
showModeratorSettings: boolean;
|
2018-06-20 20:19:53 +00:00
|
|
|
|
2021-12-17 12:39:15 +00:00
|
|
|
/**
|
|
|
|
* Whether or not to display notifications settings.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
showNotificationsSettings: boolean;
|
2021-12-17 12:39:15 +00:00
|
|
|
|
2020-07-16 10:00:37 +00:00
|
|
|
/**
|
|
|
|
* Whether or not to show prejoin screen.
|
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
showPrejoinPage: boolean;
|
2020-07-16 10:00:37 +00:00
|
|
|
|
2021-12-16 16:55:45 +00:00
|
|
|
/**
|
2022-08-02 10:51:42 +00:00
|
|
|
* Whether or not to display the prejoin settings section.
|
2021-12-16 16:55:45 +00:00
|
|
|
*/
|
2022-09-08 09:52:36 +00:00
|
|
|
showPrejoinSettings: boolean;
|
2021-12-16 16:55:45 +00:00
|
|
|
|
2018-06-20 20:19:53 +00:00
|
|
|
/**
|
2022-09-15 12:20:11 +00:00
|
|
|
* Wether or not the stage filmstrip is enabled.
|
2021-06-28 07:48:16 +00:00
|
|
|
*/
|
2022-09-15 12:20:11 +00:00
|
|
|
stageFilmstripEnabled: boolean;
|
2021-06-28 07:48:16 +00:00
|
|
|
|
2018-06-20 20:19:53 +00:00
|
|
|
/**
|
2022-09-15 12:20:11 +00:00
|
|
|
* Invoked to obtain translated strings.
|
2018-06-20 20:19:53 +00:00
|
|
|
*/
|
2022-09-15 12:20:11 +00:00
|
|
|
t: Function;
|
2018-06-20 20:19:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* React {@code Component} for modifying language and moderator settings.
|
|
|
|
*
|
2021-11-04 21:10:43 +00:00
|
|
|
* @augments Component
|
2018-06-20 20:19:53 +00:00
|
|
|
*/
|
2022-09-15 12:20:11 +00:00
|
|
|
class MoreTab extends AbstractDialogTab<Props, {}> {
|
2018-06-20 20:19:53 +00:00
|
|
|
/**
|
|
|
|
* Initializes a new {@code MoreTab} instance.
|
|
|
|
*
|
|
|
|
* @param {Object} props - The read-only properties with which the new
|
|
|
|
* instance is to be initialized.
|
|
|
|
*/
|
|
|
|
constructor(props: Props) {
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
// Bind event handler so it is only bound once for every instance.
|
2021-06-28 07:48:16 +00:00
|
|
|
this._onFramerateItemSelect = this._onFramerateItemSelect.bind(this);
|
2021-06-10 12:48:44 +00:00
|
|
|
this._onLanguageItemSelect = this._onLanguageItemSelect.bind(this);
|
2021-12-17 12:39:15 +00:00
|
|
|
this._onEnabledNotificationsChanged = this._onEnabledNotificationsChanged.bind(this);
|
2021-06-10 12:48:44 +00:00
|
|
|
this._onShowPrejoinPageChanged = this._onShowPrejoinPageChanged.bind(this);
|
|
|
|
this._onKeyboardShortcutEnableChanged = this._onKeyboardShortcutEnableChanged.bind(this);
|
2021-12-16 16:55:45 +00:00
|
|
|
this._onHideSelfViewChanged = this._onHideSelfViewChanged.bind(this);
|
2022-04-07 08:31:53 +00:00
|
|
|
this._renderMaxStageParticipantsSelect = this._renderMaxStageParticipantsSelect.bind(this);
|
|
|
|
this._onMaxStageParticipantsSelect = this._onMaxStageParticipantsSelect.bind(this);
|
2018-06-20 20:19:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
const content = [];
|
|
|
|
|
2021-06-28 07:48:16 +00:00
|
|
|
content.push(this._renderSettingsLeft());
|
|
|
|
content.push(this._renderSettingsRight());
|
2020-07-16 10:00:37 +00:00
|
|
|
|
2021-11-10 11:19:40 +00:00
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className = 'more-tab box'
|
|
|
|
key = 'more'>
|
|
|
|
{ content }
|
|
|
|
</div>
|
|
|
|
);
|
2021-06-28 07:48:16 +00:00
|
|
|
}
|
2021-06-10 12:48:44 +00:00
|
|
|
|
2021-06-28 07:48:16 +00:00
|
|
|
/**
|
|
|
|
* Callback invoked to select a frame rate from the select dropdown.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-08-02 10:51:42 +00:00
|
|
|
_onFramerateItemSelect(e: React.ChangeEvent<HTMLSelectElement>) {
|
2022-09-15 12:20:11 +00:00
|
|
|
const frameRate = e.target.value;
|
2018-06-20 20:19:53 +00:00
|
|
|
|
2021-06-28 07:48:16 +00:00
|
|
|
super._onChange({ currentFramerate: frameRate });
|
2018-06-20 20:19:53 +00:00
|
|
|
}
|
|
|
|
|
2021-06-10 12:48:44 +00:00
|
|
|
/**
|
|
|
|
* Callback invoked to select a language from select dropdown.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-08-02 10:51:42 +00:00
|
|
|
_onLanguageItemSelect(e: React.ChangeEvent<HTMLSelectElement>) {
|
2022-09-15 12:20:11 +00:00
|
|
|
const language = e.target.value;
|
2021-06-10 12:48:44 +00:00
|
|
|
|
|
|
|
super._onChange({ currentLanguage: language });
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked to select if the lobby
|
|
|
|
* should be shown.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-08-02 10:51:42 +00:00
|
|
|
_onShowPrejoinPageChanged({ target: { checked } }: React.ChangeEvent<HTMLInputElement>) {
|
2021-06-10 12:48:44 +00:00
|
|
|
super._onChange({ showPrejoinPage: checked });
|
|
|
|
}
|
|
|
|
|
2021-12-17 12:39:15 +00:00
|
|
|
/**
|
|
|
|
* Callback invoked to select if the given type of
|
|
|
|
* notifications should be shown.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
* @param {string} type - The type of the notification.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-08-02 10:51:42 +00:00
|
|
|
_onEnabledNotificationsChanged({ target: { checked } }: React.ChangeEvent<HTMLInputElement>, type: any) {
|
2021-12-17 12:39:15 +00:00
|
|
|
super._onChange({
|
|
|
|
enabledNotifications: {
|
|
|
|
...this.props.enabledNotifications,
|
|
|
|
[type]: checked
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-06-10 12:48:44 +00:00
|
|
|
/**
|
|
|
|
* Callback invoked to select if global keyboard shortcuts
|
|
|
|
* should be enabled.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-08-02 10:51:42 +00:00
|
|
|
_onKeyboardShortcutEnableChanged({ target: { checked } }: React.ChangeEvent<HTMLInputElement>) {
|
2021-06-10 12:48:44 +00:00
|
|
|
keyboardShortcut.enable(checked);
|
|
|
|
super._onChange({ keyboardShortcutEnable: checked });
|
|
|
|
}
|
|
|
|
|
2021-12-16 16:55:45 +00:00
|
|
|
/**
|
|
|
|
* Callback invoked to select if hide self view should be enabled.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-08-02 10:51:42 +00:00
|
|
|
_onHideSelfViewChanged({ target: { checked } }: React.ChangeEvent<HTMLInputElement>) {
|
2021-12-16 16:55:45 +00:00
|
|
|
super._onChange({ hideSelfView: checked });
|
|
|
|
}
|
|
|
|
|
2022-04-07 08:31:53 +00:00
|
|
|
/**
|
|
|
|
* Callback invoked to select a max number of stage participants from the select dropdown.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-08-02 10:51:42 +00:00
|
|
|
_onMaxStageParticipantsSelect(e: React.ChangeEvent<HTMLSelectElement>) {
|
2022-09-15 17:58:23 +00:00
|
|
|
const maxParticipants = Number(e.target.value);
|
2022-04-07 08:31:53 +00:00
|
|
|
|
|
|
|
super._onChange({ maxStageParticipants: maxParticipants });
|
|
|
|
}
|
|
|
|
|
2021-06-28 07:48:16 +00:00
|
|
|
/**
|
|
|
|
* Returns the React Element for the desktop share frame rate dropdown.
|
|
|
|
*
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderFramerateSelect() {
|
|
|
|
const { currentFramerate, desktopShareFramerates, t } = this.props;
|
2022-09-15 12:20:11 +00:00
|
|
|
const frameRateItems = desktopShareFramerates.map((frameRate: number) => {
|
|
|
|
return {
|
|
|
|
value: frameRate,
|
|
|
|
label: `${frameRate} ${t('settings.framesPerSecond')}`
|
|
|
|
};
|
|
|
|
});
|
2021-06-28 07:48:16 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className = 'settings-sub-pane-element'
|
|
|
|
key = 'frameRate'>
|
|
|
|
<div className = 'dropdown-menu'>
|
2022-09-15 12:20:11 +00:00
|
|
|
<Select
|
|
|
|
bottomLabel = { parseInt(currentFramerate, 10) > SS_DEFAULT_FRAME_RATE
|
|
|
|
? t('settings.desktopShareHighFpsWarning')
|
|
|
|
: t('settings.desktopShareWarning') }
|
|
|
|
label = { t('settings.desktopShareFramerate') }
|
|
|
|
onChange = { this._onFramerateItemSelect }
|
|
|
|
options = { frameRateItems }
|
|
|
|
value = { currentFramerate } />
|
2021-06-28 07:48:16 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the React Element for keyboardShortcut settings.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderKeyboardShortcutCheckbox() {
|
|
|
|
const { t } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className = 'settings-sub-pane-element'
|
|
|
|
key = 'keyboard-shortcut'>
|
2022-09-15 12:20:11 +00:00
|
|
|
<span className = 'checkbox-label'>
|
2021-06-28 07:48:16 +00:00
|
|
|
{ t('keyboardShortcuts.keyboardShortcuts') }
|
2022-09-15 12:20:11 +00:00
|
|
|
</span>
|
2021-06-28 07:48:16 +00:00
|
|
|
<Checkbox
|
2022-08-02 10:51:42 +00:00
|
|
|
checked = { keyboardShortcut.getEnabled() }
|
2021-06-28 07:48:16 +00:00
|
|
|
label = { t('prejoin.keyboardShortcuts') }
|
|
|
|
name = 'enable-keyboard-shortcuts'
|
|
|
|
onChange = { this._onKeyboardShortcutEnableChanged } />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-12-16 16:55:45 +00:00
|
|
|
/**
|
|
|
|
* Returns the React Element for self view setting.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderSelfViewCheckbox() {
|
|
|
|
const { hideSelfView, t } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className = 'settings-sub-pane-element'
|
|
|
|
key = 'selfview'>
|
2022-09-15 12:20:11 +00:00
|
|
|
<span className = 'checkbox-label'>
|
2021-12-16 16:55:45 +00:00
|
|
|
{ t('settings.selfView') }
|
2022-09-15 12:20:11 +00:00
|
|
|
</span>
|
2021-12-16 16:55:45 +00:00
|
|
|
<Checkbox
|
2022-08-02 10:51:42 +00:00
|
|
|
checked = { hideSelfView }
|
2021-12-16 16:55:45 +00:00
|
|
|
label = { t('videothumbnail.hideSelfView') }
|
|
|
|
name = 'hide-self-view'
|
|
|
|
onChange = { this._onHideSelfViewChanged } />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2018-06-20 20:19:53 +00:00
|
|
|
/**
|
|
|
|
* Returns the menu item for changing displayed language.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
2021-06-28 07:48:16 +00:00
|
|
|
_renderLanguageSelect() {
|
2018-06-20 20:19:53 +00:00
|
|
|
const {
|
|
|
|
currentLanguage,
|
|
|
|
languages,
|
|
|
|
t
|
|
|
|
} = this.props;
|
|
|
|
|
2018-08-06 16:09:32 +00:00
|
|
|
const languageItems
|
2022-09-15 12:20:11 +00:00
|
|
|
= languages.map((language: string) => {
|
|
|
|
return {
|
|
|
|
value: language,
|
|
|
|
label: t(`languages:${language}`)
|
|
|
|
};
|
|
|
|
});
|
2018-06-20 20:19:53 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
2021-06-28 07:48:16 +00:00
|
|
|
className = 'settings-sub-pane-element'
|
2018-06-20 20:19:53 +00:00
|
|
|
key = 'language'>
|
2021-01-14 16:12:08 +00:00
|
|
|
<div className = 'dropdown-menu'>
|
2022-09-15 12:20:11 +00:00
|
|
|
<Select
|
|
|
|
label = { t('settings.language') }
|
|
|
|
onChange = { this._onLanguageItemSelect }
|
|
|
|
options = { languageItems }
|
|
|
|
value = { currentLanguage } />
|
2021-01-14 16:12:08 +00:00
|
|
|
</div>
|
2018-06-20 20:19:53 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-07-16 10:00:37 +00:00
|
|
|
/**
|
|
|
|
* Returns the React Element for modifying prejoin screen settings.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderPrejoinScreenSettings() {
|
|
|
|
const { t, showPrejoinPage } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
2021-06-28 07:48:16 +00:00
|
|
|
className = 'settings-sub-pane-element'
|
2020-07-16 10:00:37 +00:00
|
|
|
key = 'prejoin-screen'>
|
2022-09-15 12:20:11 +00:00
|
|
|
<span className = 'checkbox-label'>
|
2020-07-16 10:00:37 +00:00
|
|
|
{ t('prejoin.premeeting') }
|
2022-09-15 12:20:11 +00:00
|
|
|
</span>
|
2020-07-16 10:00:37 +00:00
|
|
|
<Checkbox
|
2022-08-02 10:51:42 +00:00
|
|
|
checked = { showPrejoinPage }
|
2020-07-16 10:00:37 +00:00
|
|
|
label = { t('prejoin.showScreen') }
|
|
|
|
name = 'show-prejoin-page'
|
2021-06-10 12:48:44 +00:00
|
|
|
onChange = { this._onShowPrejoinPageChanged } />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-12-17 12:39:15 +00:00
|
|
|
/**
|
|
|
|
* Returns the React Element for modifying the enabled notifications settings.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderNotificationsSettings() {
|
|
|
|
const { t, enabledNotifications } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className = 'settings-sub-pane-element'
|
|
|
|
key = 'notifications'>
|
2022-09-15 12:20:11 +00:00
|
|
|
<span className = 'checkbox-label'>
|
2021-12-17 12:39:15 +00:00
|
|
|
{ t('notify.displayNotifications') }
|
2022-09-15 12:20:11 +00:00
|
|
|
</span>
|
2021-12-17 12:39:15 +00:00
|
|
|
{
|
|
|
|
Object.keys(enabledNotifications).map(key => (
|
|
|
|
<Checkbox
|
2022-09-15 12:20:11 +00:00
|
|
|
checked = { Boolean(enabledNotifications[key as keyof typeof enabledNotifications]) }
|
2021-12-17 12:39:15 +00:00
|
|
|
key = { key }
|
|
|
|
label = { t(key) }
|
|
|
|
name = { `show-${key}` }
|
|
|
|
/* eslint-disable-next-line react/jsx-no-bind */
|
|
|
|
onChange = { e => this._onEnabledNotificationsChanged(e, key) } />
|
|
|
|
))
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-04-07 08:31:53 +00:00
|
|
|
/**
|
|
|
|
* Returns the React Element for the max stage participants dropdown.
|
|
|
|
*
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderMaxStageParticipantsSelect() {
|
2022-05-05 09:20:20 +00:00
|
|
|
const { maxStageParticipants, t, stageFilmstripEnabled } = this.props;
|
|
|
|
|
|
|
|
if (!stageFilmstripEnabled) {
|
|
|
|
return null;
|
|
|
|
}
|
2022-04-07 08:31:53 +00:00
|
|
|
const maxParticipantsItems = Array(MAX_ACTIVE_PARTICIPANTS).fill(0)
|
2022-09-15 12:20:11 +00:00
|
|
|
.map((no, index) => {
|
|
|
|
return {
|
|
|
|
value: index + 1,
|
|
|
|
label: `${index + 1}`
|
|
|
|
};
|
|
|
|
});
|
2022-04-07 08:31:53 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className = 'settings-sub-pane-element'
|
|
|
|
key = 'maxStageParticipants'>
|
|
|
|
<div className = 'dropdown-menu'>
|
2022-09-15 12:20:11 +00:00
|
|
|
<Select
|
|
|
|
label = { t('settings.maxStageParticipants') }
|
|
|
|
onChange = { this._onMaxStageParticipantsSelect }
|
|
|
|
options = { maxParticipantsItems }
|
|
|
|
value = { maxStageParticipants } />
|
2022-04-07 08:31:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-06-10 12:48:44 +00:00
|
|
|
/**
|
2021-06-28 07:48:16 +00:00
|
|
|
* Returns the React element that needs to be displayed on the right half of the more tabs.
|
2021-06-10 12:48:44 +00:00
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
2021-06-28 07:48:16 +00:00
|
|
|
_renderSettingsRight() {
|
|
|
|
const { showLanguageSettings } = this.props;
|
2021-06-10 12:48:44 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
2021-11-10 11:19:40 +00:00
|
|
|
className = 'settings-sub-pane right'
|
|
|
|
key = 'settings-sub-pane-right'>
|
2021-06-28 07:48:16 +00:00
|
|
|
{ showLanguageSettings && this._renderLanguageSelect() }
|
|
|
|
{ this._renderFramerateSelect() }
|
2022-04-07 08:31:53 +00:00
|
|
|
{ this._renderMaxStageParticipantsSelect() }
|
2021-06-28 07:48:16 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the React element that needs to be displayed on the left half of the more tabs.
|
|
|
|
*
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderSettingsLeft() {
|
2021-12-17 12:39:15 +00:00
|
|
|
const { disableHideSelfView, showNotificationsSettings, showPrejoinSettings } = this.props;
|
2021-06-28 07:48:16 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
2021-11-10 11:19:40 +00:00
|
|
|
className = 'settings-sub-pane left'
|
|
|
|
key = 'settings-sub-pane-left'>
|
2021-06-28 07:48:16 +00:00
|
|
|
{ showPrejoinSettings && this._renderPrejoinScreenSettings() }
|
2021-12-17 12:39:15 +00:00
|
|
|
{ showNotificationsSettings && this._renderNotificationsSettings() }
|
2021-06-28 07:48:16 +00:00
|
|
|
{ this._renderKeyboardShortcutCheckbox() }
|
2021-12-16 16:55:45 +00:00
|
|
|
{ !disableHideSelfView && this._renderSelfViewCheckbox() }
|
2020-07-16 10:00:37 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2018-06-20 20:19:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(MoreTab);
|