2023-02-03 11:31:00 +00:00
|
|
|
import { WithTranslation } from 'react-i18next';
|
2020-04-23 13:45:36 +00:00
|
|
|
|
2023-02-03 11:31:00 +00:00
|
|
|
import { IReduxState } from '../../app/types';
|
2020-04-23 13:45:36 +00:00
|
|
|
|
2023-02-03 11:31:00 +00:00
|
|
|
export interface IProps extends WithTranslation {
|
2020-04-23 13:45:36 +00:00
|
|
|
|
2021-09-09 08:10:09 +00:00
|
|
|
/**
|
|
|
|
* Custom e2ee labels.
|
|
|
|
*/
|
2023-02-03 11:31:00 +00:00
|
|
|
_e2eeLabels?: any;
|
2021-09-09 08:10:09 +00:00
|
|
|
|
2020-04-23 13:45:36 +00:00
|
|
|
/**
|
|
|
|
* True if the label needs to be rendered, false otherwise.
|
|
|
|
*/
|
2023-02-03 11:31:00 +00:00
|
|
|
_showLabel?: boolean;
|
|
|
|
}
|
2020-04-23 13:45:36 +00: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 11:31:00 +00:00
|
|
|
* @returns {IProps}
|
2020-04-23 13:45:36 +00:00
|
|
|
*/
|
2023-02-03 11:31:00 +00:00
|
|
|
export function _mapStateToProps(state: IReduxState) {
|
2021-11-16 11:12:10 +00:00
|
|
|
const { e2ee = {} } = state['features/base/config'];
|
|
|
|
|
2020-04-23 13:45:36 +00:00
|
|
|
return {
|
2021-11-16 11:12:10 +00:00
|
|
|
_e2eeLabels: e2ee.labels,
|
2021-07-09 12:36:19 +00:00
|
|
|
_showLabel: state['features/e2ee'].everyoneEnabledE2EE
|
2020-04-23 13:45:36 +00:00
|
|
|
};
|
|
|
|
}
|