2023-02-03 13:31:00 +02:00
|
|
|
import { WithTranslation } from 'react-i18next';
|
2020-04-23 15:45:36 +02:00
|
|
|
|
2023-02-03 13:31:00 +02:00
|
|
|
import { IReduxState } from '../../app/types';
|
2020-04-23 15:45:36 +02:00
|
|
|
|
2023-02-03 13:31:00 +02:00
|
|
|
export interface IProps extends WithTranslation {
|
2020-04-23 15:45:36 +02:00
|
|
|
|
2021-09-09 11:10:09 +03:00
|
|
|
/**
|
|
|
|
|
* Custom e2ee labels.
|
|
|
|
|
*/
|
2023-02-03 13:31:00 +02:00
|
|
|
_e2eeLabels?: any;
|
2021-09-09 11:10:09 +03:00
|
|
|
|
2020-04-23 15:45:36 +02:00
|
|
|
/**
|
|
|
|
|
* True if the label needs to be rendered, false otherwise.
|
|
|
|
|
*/
|
2023-02-03 13:31:00 +02:00
|
|
|
_showLabel?: boolean;
|
|
|
|
|
}
|
2020-04-23 15:45:36 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Maps (parts of) the redux state to the associated props of this {@code Component}.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} state - The redux state.
|
|
|
|
|
* @private
|
2023-02-03 13:31:00 +02:00
|
|
|
* @returns {IProps}
|
2020-04-23 15:45:36 +02:00
|
|
|
*/
|
2023-02-03 13:31:00 +02:00
|
|
|
export function _mapStateToProps(state: IReduxState) {
|
2021-11-16 13:12:10 +02:00
|
|
|
const { e2ee = {} } = state['features/base/config'];
|
|
|
|
|
|
2020-04-23 15:45:36 +02:00
|
|
|
return {
|
2021-11-16 13:12:10 +02:00
|
|
|
_e2eeLabels: e2ee.labels,
|
2023-02-23 17:00:47 -06:00
|
|
|
_showLabel: state['features/base/participants'].numberOfParticipantsDisabledE2EE === 0
|
2020-04-23 15:45:36 +02:00
|
|
|
};
|
|
|
|
|
}
|