From 419d5e4ceccabef6c04683d72c08e4bc27c5450a Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Tue, 7 Jan 2025 18:51:10 +0100 Subject: [PATCH 1/3] Added redirect action --- package.json | 9 +++++++++ src/status.ts | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 10b0b921..2a13dd97 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,11 @@ "command": "mirrord.help", "category": "mirrord", "title": "Show mirrord walkthrough" + }, + { + "command": "mirrord.documentation", + "category": "mirrord", + "title": "Navigate to mirrord documentation" } ], "configuration": { @@ -178,6 +183,10 @@ { "command": "mirrord.help", "when": "true" + }, + { + "command": "mirrord.documentation", + "when": "true" } ] }, diff --git a/src/status.ts b/src/status.ts index 15bcc3bc..423cbd5b 100644 --- a/src/status.ts +++ b/src/status.ts @@ -12,6 +12,7 @@ export class MirrordStatus { static readonly mirrordForTeamsCommandId = 'mirrord.mirrordForTeams'; static readonly selectActiveConfigId = 'mirrord.selectActiveConfig'; static readonly helpCommandId = 'mirrord.help'; + static readonly documentationCommandId = 'mirrord.documentation'; constructor(statusBar: vscode.StatusBarItem) { this.statusBar = statusBar; @@ -49,6 +50,7 @@ export class MirrordStatus { if (!getOperatorUsed()) { statusBar.tooltip.appendMarkdown(`\n\n[mirrord for Teams](command:${MirrordStatus.mirrordForTeamsCommandId})`); } + statusBar.tooltip.appendMarkdown(`\n\n[Documentation](command:${MirrordStatus.documentationCommandId})`); statusBar.tooltip.appendMarkdown(`\n\n[Get help on Discord](command:${MirrordStatus.joinDiscordCommandId})`); statusBar.tooltip.appendMarkdown(`\n\n[Walkthrough](command:${MirrordStatus.helpCommandId})`); @@ -71,6 +73,7 @@ export class MirrordStatus { globalContext.subscriptions.push(vscode.commands.registerCommand(MirrordStatus.helpCommandId, async () => { vscode.commands.executeCommand(`workbench.action.openWalkthrough`, `MetalBear.mirrord#mirrord.welcome`, false); })); + globalContext.subscriptions.push(vscode.commands.registerCommand(MirrordStatus.documentationCommandId, this.documentation.bind(this))); globalContext.subscriptions.push(this.statusBar); @@ -103,6 +106,10 @@ export class MirrordStatus { } mirrordForTeams() { - vscode.env.openExternal(vscode.Uri.parse('https://app.metalbear.co/')); + vscode.env.openExternal(vscode.Uri.parse('https://app.metalbear.co/?utm_medium=vscode&utm_source=ui_action')); + } + + documentation() { + vscode.env.openExternal(vscode.Uri.parse('https://mirrord.dev/docs/using-mirrord/vscode-extension/?utm_medium=vscode&utm_source=ui_action')); } } From a770041eadcb00f3e4bd3a5b87521cbd45a73ebc Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Tue, 7 Jan 2025 18:53:21 +0100 Subject: [PATCH 2/3] Changelog entry --- changelog.d/161.added.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/161.added.md diff --git a/changelog.d/161.added.md b/changelog.d/161.added.md new file mode 100644 index 00000000..1bea1223 --- /dev/null +++ b/changelog.d/161.added.md @@ -0,0 +1 @@ +Added dropdown menu action that redirects to extension docs. \ No newline at end of file From dd320768f4eb4aba461b8ec61692b13a302337e2 Mon Sep 17 00:00:00 2001 From: Razz4780 Date: Wed, 8 Jan 2025 16:35:46 +0100 Subject: [PATCH 3/3] my english bad --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a13dd97..ff12b488 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ { "command": "mirrord.documentation", "category": "mirrord", - "title": "Navigate to mirrord documentation" + "title": "Open mirrord documentation" } ], "configuration": {