mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
after connections modal closes, refocus
This commit is contained in:
@@ -2275,11 +2275,15 @@ class RemotesModalModel {
|
||||
}
|
||||
|
||||
closeModal() : void {
|
||||
if (!this.openState.get()) {
|
||||
return;
|
||||
}
|
||||
mobx.action(() => {
|
||||
this.openState.set(false);
|
||||
this.selectedRemoteId.set(null);
|
||||
this.remoteEdit.set(null);
|
||||
})();
|
||||
setTimeout(() => GlobalModel.refocus(), 10);
|
||||
}
|
||||
|
||||
disposeTerm() : void {
|
||||
@@ -2448,6 +2452,14 @@ class Model {
|
||||
getApi().reloadWindow();
|
||||
}
|
||||
|
||||
refocus() { // givefocus() give back focus to cmd or input
|
||||
let activeScreen = this.getActiveScreen();
|
||||
if (screen == null) {
|
||||
return;
|
||||
}
|
||||
activeScreen.giveFocus();
|
||||
}
|
||||
|
||||
getHasClientStop() : boolean {
|
||||
if (this.clientData.get() == null) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user