Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added action that navigates to extension docs #162

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/161.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added dropdown menu action that redirects to extension docs.
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
"command": "mirrord.help",
"category": "mirrord",
"title": "Show mirrord walkthrough"
},
{
"command": "mirrord.documentation",
"category": "mirrord",
"title": "Navigate to mirrord documentation"
Razz4780 marked this conversation as resolved.
Show resolved Hide resolved
}
],
"configuration": {
Expand Down Expand Up @@ -178,6 +183,10 @@
{
"command": "mirrord.help",
"when": "true"
},
{
"command": "mirrord.documentation",
"when": "true"
}
]
},
Expand Down
9 changes: 8 additions & 1 deletion src/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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})`);

Expand All @@ -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);

Expand Down Expand Up @@ -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'));
}
}