diff --git a/package.json b/package.json index 2f2634c..4d7ad4c 100644 --- a/package.json +++ b/package.json @@ -241,6 +241,23 @@ "command": "githubLocalActions.editSetting", "title": "Edit", "icon": "$(edit)" + }, + { + "category": "GitHub Local Actions", + "command": "githubLocalActions.viewDocumentation", + "title": "View Documentation" + }, + { + "category": "GitHub Local Actions", + "command": "githubLocalActions.helpAndSupport", + "title": "Help and Support" + } + ], + "submenus": [ + { + "id": "githubLocalActions.moreActions", + "label": "More Actions...", + "icon": "$(ellipsis)" } ], "menus": { @@ -316,6 +333,14 @@ { "command": "githubLocalActions.editSetting", "when": "never" + }, + { + "command": "githubLocalActions.viewDocumentation", + "when": "never" + }, + { + "command": "githubLocalActions.helpAndSupport", + "when": "never" } ], "view/title": [ @@ -353,6 +378,21 @@ "command": "githubLocalActions.refreshSettings", "when": "view == settings", "group": "navigation@0" + }, + { + "submenu": "githubLocalActions.moreActions", + "when": "view =~ /^(components|workflows|history|settings)$/", + "group": "navigation@99" + } + ], + "githubLocalActions.moreActions": [ + { + "command": "githubLocalActions.viewDocumentation", + "group": "0_more@0" + }, + { + "command": "githubLocalActions.helpAndSupport", + "group": "0_more@1" } ], "view/item/context": [ diff --git a/src/extension.ts b/src/extension.ts index 16d8ee1..b785fdd 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,5 +1,5 @@ import * as vscode from 'vscode'; -import { TreeCheckboxChangeEvent, window, workspace } from 'vscode'; +import { commands, env, TreeCheckboxChangeEvent, Uri, window, workspace } from 'vscode'; import { Act } from './act'; import ComponentsTreeDataProvider from './views/components/componentsTreeDataProvider'; import { DecorationProvider } from './views/decorationProvider'; @@ -55,7 +55,13 @@ export function activate(context: vscode.ExtensionContext) { historyTreeView, settingsTreeView, window.registerFileDecorationProvider(decorationProvider), - workflowsFileWatcher + workflowsFileWatcher, + commands.registerCommand('githubLocalActions.viewDocumentation', async () => { + await env.openExternal(Uri.parse('https://nektosact.com')); + }), + commands.registerCommand('githubLocalActions.helpAndSupport', async () => { + await env.openExternal(Uri.parse('https://github.com/SanjulaGanepola/github-local-actions/issues')); + }), ); }