Skip to content

Commit f6b8806

Browse files
committed
File Explorer: Adds node context to file explorer item (#202)
* Adds an inline context item for refresh * Adds "change root directory" * Adds "change SSH username" ![image](https://github.com/tailscale-dev/vscode-tailscale/assets/40265/195db5a2-440d-4bcc-a423-714728c59d1f) Signed-off-by: Tyler Smalley <[email protected]> (cherry picked from commit f005dd7)
1 parent 4ff367b commit f6b8806

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,22 @@
148148
{
149149
"command": "tailscale.node.openTerminal",
150150
"when": "view == node-explorer-view && (viewItem =~ /^peer-file-explorer-dir/ || viewItem == peer-root)",
151-
"group": "inline"
151+
"group": "inline@1"
152152
},
153153
{
154-
"command": "tailscale.node.openTerminal",
154+
"command": "tailscale.node.openRemoteCode",
155155
"when": "view == node-explorer-view && (viewItem =~ /^peer-file-explorer-dir/ || viewItem == peer-root)",
156-
"group": "1_action@1"
156+
"group": "inline@2"
157157
},
158158
{
159-
"command": "tailscale.node.openRemoteCode",
159+
"command": "tailscale.nodeExplorer.refresh",
160+
"when": "(view == node-explorer-view && viewItem == peer-root) || (view == node-explorer-view && viewItem == peer-file-explorer-dir-root)",
161+
"group": "inline@3"
162+
},
163+
{
164+
"command": "tailscale.node.openTerminal",
160165
"when": "view == node-explorer-view && (viewItem =~ /^peer-file-explorer-dir/ || viewItem == peer-root)",
161-
"group": "inline"
166+
"group": "1_action@1"
162167
},
163168
{
164169
"command": "tailscale.node.openRemoteCode",
@@ -167,24 +172,19 @@
167172
},
168173
{
169174
"command": "tailscale.node.setUsername",
170-
"when": "view == node-explorer-view && viewItem == peer-root",
175+
"when": "(view == node-explorer-view && viewItem == peer-root) || (view == node-explorer-view && viewItem == peer-file-explorer-dir-root)",
171176
"group": "2_settings@3"
172177
},
173178
{
174179
"command": "tailscale.node.setRootDir",
175-
"when": "(view == node-explorer-view && viewItem == peer-root) || (view == node-explorer-view && viewItem =~ /^peer-file-explorer-root/)",
180+
"when": "(view == node-explorer-view && viewItem == peer-root) || (view == node-explorer-view && viewItem == peer-file-explorer-dir-root)",
176181
"group": "2_settings@3"
177182
},
178183
{
179184
"command": "tailscale.node.copyIPv4",
180185
"when": "view == node-explorer-view && viewItem == peer-root",
181186
"group": "3_copy@1"
182187
},
183-
{
184-
"command": "tailscale.nodeExplorer.refresh",
185-
"group": "inline",
186-
"when": "view == node-explorer-view && viewItem =~ /^peer-file-explorer-root/"
187-
},
188188
{
189189
"command": "tailscale.node.copyIPv6",
190190
"when": "view == node-explorer-view && viewItem == peer-root",

0 commit comments

Comments
 (0)