2020-04-23 13:45:36 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
|
|
|
|
export type Props = {
|
|
|
|
|
2021-09-09 08:10:09 +00:00
|
|
|
/**
|
|
|
|
* Custom e2ee labels.
|
|
|
|
*/
|
|
|
|
_e2eeLabels?: Object;
|
|
|
|
|
2020-04-23 13:45:36 +00:00
|
|
|
/**
|
|
|
|
* True if the label needs to be rendered, false otherwise.
|
|
|
|
*/
|
|
|
|
_showLabel: boolean,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoked to obtain translated strings.
|
|
|
|
*/
|
|
|
|
t: Function
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps (parts of) the redux state to the associated props of this {@code Component}.
|
|
|
|
*
|
|
|
|
* @param {Object} state - The redux state.
|
|
|
|
* @private
|
|
|
|
* @returns {Props}
|
|
|
|
*/
|
|
|
|
export function _mapStateToProps(state: Object) {
|
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
|
|
|
};
|
|
|
|
}
|