mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Close settings dialog when disconnecting
This commit is contained in:
parent
dc5e64aaac
commit
ab3569e104
1 changed files with 8 additions and 2 deletions
|
@ -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}
|
||||
/>
|
||||
</>
|
||||
`;
|
||||
|
|
Loading…
Reference in a new issue