Close settings dialog when disconnecting

This commit is contained in:
Simon Ser 2022-11-30 11:18:23 +01:00
parent dc5e64aaac
commit ab3569e104

View file

@ -225,6 +225,7 @@ export default class App extends Component {
this.handleVerifySubmit = this.handleVerifySubmit.bind(this);
this.handleOpenSettingsClick = this.handleOpenSettingsClick.bind(this);
this.handleSettingsChange = this.handleSettingsChange.bind(this);
this.handleSettingsDisconnect = this.handleSettingsDisconnect.bind(this);
this.state.settings = {
...this.state.settings,
@ -1845,6 +1846,11 @@ export default class App extends Component {
this.setState({ settings });
}
handleSettingsDisconnect() {
this.dismissDialog();
this.disconnectAll();
}
componentDidMount() {
this.baseTitle = document.title;
setupKeybindings(this);
@ -2026,8 +2032,8 @@ export default class App extends Component {
settings=${this.state.settings}
showProtocolHandler=${dialogData.showProtocolHandler}
onChange=${this.handleSettingsChange}
onDisconnect=${() => this.disconnectAll()}
onClose=${() => this.dismissDialog()}
onDisconnect=${this.handleSettingsDisconnect}
onClose=${this.dismissDialog}
/>
</>
`;