a click on a remote runs /remote:show

This commit is contained in:
sawka 2022-09-14 13:02:33 -07:00
parent 8d78e145be
commit 40c52fd195
2 changed files with 9 additions and 1 deletions

View File

@ -1256,6 +1256,10 @@ class MainSideBar extends React.Component<{}, {}> {
return (<span>{remote.remotecanonicalname}</span>);
}
clickRemote(remote : RemoteType) {
GlobalCommandRunner.showRemote(remote.remoteid);
}
render() {
let model = GlobalModel;
let activeSessionId = model.activeSessionId.get();
@ -1338,7 +1342,7 @@ class MainSideBar extends React.Component<{}, {}> {
</p>
<ul className="menu-list remotes-menu-list">
<For each="remote" of={remotes}>
<li key={remote.remoteid} className="remote-menu-item"><a>
<li key={remote.remoteid} className="remote-menu-item"><a onClick={() => this.clickRemote(remote)}>
<i className={cn("remote-status fa fa-circle", "status-" + remote.status)}/>
{this.remoteDisplayName(remote)}
</a></li>

View File

@ -1780,6 +1780,10 @@ class CommandRunner {
resizeWindow(windowId : string, cols : number) {
GlobalModel.submitCommand("window", "resize", null, {"nohist": "1", "window": windowId, "cols": String(cols)}, false);
}
showRemote(remoteid : string) {
GlobalModel.submitCommand("remote", "show", null, {"nohist": "1", "remote": remoteid}, true);
}
};
let GlobalModel : Model = null;