flag to hide settings button in overflow menu (#12515)
* flag to hide settings button in overflow menu
This commit is contained in:
parent
215c2825de
commit
c32866f6a2
|
@ -209,6 +209,12 @@ export const SECURITY_OPTIONS_ENABLED = 'security-options.enabled';
|
||||||
*/
|
*/
|
||||||
export const SERVER_URL_CHANGE_ENABLED = 'server-url-change.enabled';
|
export const SERVER_URL_CHANGE_ENABLED = 'server-url-change.enabled';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag indicating if settings should be enabled.
|
||||||
|
* Default: enabled (true).
|
||||||
|
*/
|
||||||
|
export const SETTINGS_ENABLED = 'settings.enabled';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag indicating if tile view feature should be enabled.
|
* Flag indicating if tile view feature should be enabled.
|
||||||
* Default: enabled.
|
* Default: enabled.
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
/* eslint-disable lines-around-comment */
|
/* eslint-disable lines-around-comment */
|
||||||
import { translate } from '../../../../base/i18n/functions';
|
|
||||||
import { IconSettings } from '../../../../base/icons/svg';
|
import { IReduxState } from '../../../../app/types';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { AbstractButton, type AbstractButtonProps } from '../../../../base/toolbox/components';
|
import { AbstractButton, type AbstractButtonProps } from '../../../../base/toolbox/components';
|
||||||
// @ts-ignore
|
|
||||||
import { navigate }
|
import { navigate }
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
|
from '../../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { screen } from '../../../../mobile/navigation/routes';
|
import { screen } from '../../../../mobile/navigation/routes';
|
||||||
|
// @ts-ignore
|
||||||
|
import { SETTINGS_ENABLED, getFeatureFlag } from '../../../flags';
|
||||||
|
import { translate } from '../../../i18n/functions';
|
||||||
|
import { IconSettings } from '../../../icons/svg';
|
||||||
|
import { connect } from '../../../redux/functions';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements an {@link AbstractButton} to open the carmode.
|
* Implements an {@link AbstractButton} to open the carmode.
|
||||||
|
@ -29,5 +33,20 @@ class SettingsButton extends AbstractButton<AbstractButtonProps, any, any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps part of the redux state to the component's props.
|
||||||
|
*
|
||||||
|
* @param {IReduxState} state - The Redux state.
|
||||||
|
* @returns {Object}
|
||||||
|
*/
|
||||||
|
function _mapStateToProps(state: IReduxState) {
|
||||||
|
const enabled = getFeatureFlag(state, SETTINGS_ENABLED, true);
|
||||||
|
|
||||||
|
return {
|
||||||
|
visible: enabled
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export default translate(SettingsButton);
|
export default translate(connect(_mapStateToProps)(SettingsButton));
|
||||||
|
|
Loading…
Reference in New Issue