fix(authentication) fixed close on cancel click
This commit is contained in:
parent
8b23265a50
commit
9d5024cc5d
|
@ -124,15 +124,8 @@ class LoginDialog extends Component<Props, State> {
|
|||
*/
|
||||
_onCancelLogin() {
|
||||
const { dispatch } = this.props;
|
||||
const cancelButton = document.getElementById('modal-dialog-cancel-button');
|
||||
|
||||
if (cancelButton) {
|
||||
cancelButton.onclick = () => {
|
||||
dispatch(cancelLogin());
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
dispatch(cancelLogin());
|
||||
}
|
||||
|
||||
_onLogin: () => void;
|
||||
|
@ -252,6 +245,7 @@ class LoginDialog extends Component<Props, State> {
|
|||
|
||||
return (
|
||||
<Dialog
|
||||
disableBlanketClickDismiss = { true }
|
||||
hideCloseIconButton = { true }
|
||||
okDisabled = {
|
||||
connecting
|
||||
|
|
|
@ -64,15 +64,8 @@ class WaitForOwnerDialog extends PureComponent<Props> {
|
|||
*/
|
||||
_onCancelWaitForOwner() {
|
||||
const { dispatch } = this.props;
|
||||
const cancelButton = document.getElementById('modal-dialog-cancel-button');
|
||||
|
||||
if (cancelButton) {
|
||||
cancelButton.onclick = () => {
|
||||
dispatch(cancelWaitForOwner());
|
||||
};
|
||||
}
|
||||
|
||||
return false;
|
||||
dispatch(cancelWaitForOwner());
|
||||
}
|
||||
|
||||
_onIAmHost: () => void;
|
||||
|
@ -102,6 +95,7 @@ class WaitForOwnerDialog extends PureComponent<Props> {
|
|||
|
||||
return (
|
||||
<Dialog
|
||||
disableBlanketClickDismiss = { true }
|
||||
hideCloseIconButton = { true }
|
||||
okKey = { t('dialog.IamHost') }
|
||||
onCancel = { this._onCancelWaitForOwner }
|
||||
|
|
Loading…
Reference in New Issue