Skip to content

Commit e5d41bb

Browse files
committed
Node Explorer: Add documentation link to view/title (#193)
![image](https://github.com/tailscale-dev/vscode-tailscale/assets/40265/d3597a1e-f7a1-4bd4-9726-796bf5a07c83) Signed-off-by: Tyler Smalley <[email protected]>
1 parent afc9570 commit e5d41bb

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@
128128
"group": "overflow",
129129
"when": "view == serve-view || view == node-explorer-view"
130130
},
131+
{
132+
"command": "tailscale.openVSCodeDocs",
133+
"group": "overflow",
134+
"when": "view == serve-view || view == node-explorer-view"
135+
},
131136
{
132137
"command": "tailscale.nodeExplorer.refresh",
133138
"group": "navigation",
@@ -233,6 +238,11 @@
233238
"title": "Admin console",
234239
"category": "Tailscale"
235240
},
241+
{
242+
"command": "tailscale.openVSCodeDocs",
243+
"title": "Documentation",
244+
"category": "Tailscale"
245+
},
236246
{
237247
"command": "tailscale.resetServe",
238248
"title": "Reset",

src/extension.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as path from 'path';
22
import * as vscode from 'vscode';
33

44
import { ServePanelProvider } from './serve-panel-provider';
5-
import { ADMIN_CONSOLE } from './utils/url';
5+
import { ADMIN_CONSOLE, KB_DOCS_URL as KB_DOCS_URL } from './utils/url';
66
import { Tailscale } from './tailscale';
77
import { Logger } from './logger';
88
import { errorForType } from './tailscale/error';
@@ -124,6 +124,12 @@ export async function activate(context: vscode.ExtensionContext) {
124124
})
125125
);
126126

127+
context.subscriptions.push(
128+
vscode.commands.registerCommand('tailscale.openVSCodeDocs', () => {
129+
vscode.env.openExternal(vscode.Uri.parse(KB_DOCS_URL));
130+
})
131+
);
132+
127133
context.subscriptions.push(
128134
vscode.commands.registerCommand('tailscale.node.setUsername', async (node: PeerRoot) => {
129135
const username = await vscode.window.showInputBox({

src/utils/url.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export const ADMIN_CONSOLE_DNS = `${ADMIN_CONSOLE}/admin/dns`;
33
export const KB_FUNNEL_SETUP = 'https://tailscale.com/kb/1223/tailscale-funnel/#setup';
44
export const KB_FUNNEL_USE_CASES = 'https://tailscale.com/kb/1247/funnel-serve-use-cases';
55
export const KB_ENABLE_HTTPS = 'https://tailscale.com/kb/1153/enabling-https/#configure-https';
6+
export const KB_DOCS_URL = 'https://tailscale.com/kb/1265/vscode-extension/';

0 commit comments

Comments
 (0)