From 40c52fd195d7adb859f83a4d0066b87477016685 Mon Sep 17 00:00:00 2001
From: sawka
Date: Wed, 14 Sep 2022 13:02:33 -0700
Subject: [PATCH] a click on a remote runs /remote:show
---
src/main.tsx | 6 +++++-
src/model.ts | 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/main.tsx b/src/main.tsx
index 5f96a4b4..b21bb29a 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1256,6 +1256,10 @@ class MainSideBar extends React.Component<{}, {}> {
return ({remote.remotecanonicalname});
}
+ 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<{}, {}> {
- -
+
- this.clickRemote(remote)}>
{this.remoteDisplayName(remote)}
diff --git a/src/model.ts b/src/model.ts
index f47b36d8..3c5ad9cc 100644
--- a/src/model.ts
+++ b/src/model.ts
@@ -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;