mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
a click on a remote runs /remote:show
This commit is contained in:
parent
8d78e145be
commit
40c52fd195
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user