2021-12-10 16:23:27 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { translate } from '../../../../base/i18n';
|
|
|
|
import { connect } from '../../../../base/redux';
|
|
|
|
import { toggleSecurityDialog } from '../../../actions';
|
|
|
|
import AbstractSecurityDialogButton, {
|
2022-09-27 07:10:28 +00:00
|
|
|
type Props as AbstractSecurityDialogButtonProps,
|
|
|
|
_mapStateToProps as _abstractMapStateToProps
|
2021-12-10 16:23:27 +00:00
|
|
|
} from '../AbstractSecurityDialogButton';
|
|
|
|
|
|
|
|
type Props = AbstractSecurityDialogButtonProps;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements an {@link AbstractSecurityDialogButton} to open the security dialog.
|
|
|
|
*/
|
|
|
|
class SecurityDialogButton<P: Props, S:*> extends AbstractSecurityDialogButton<P, S> {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Opens / closes the security dialog.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_handleClickSecurityButton() {
|
|
|
|
const { dispatch } = this.props;
|
|
|
|
|
|
|
|
dispatch(toggleSecurityDialog());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect(_abstractMapStateToProps)(SecurityDialogButton));
|