Add docs and help/support actions

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-11-16 20:43:16 -05:00
parent 28ee724678
commit 72d9888ac3
2 changed files with 48 additions and 2 deletions

View File

@@ -241,6 +241,23 @@
"command": "githubLocalActions.editSetting", "command": "githubLocalActions.editSetting",
"title": "Edit", "title": "Edit",
"icon": "$(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": { "menus": {
@@ -316,6 +333,14 @@
{ {
"command": "githubLocalActions.editSetting", "command": "githubLocalActions.editSetting",
"when": "never" "when": "never"
},
{
"command": "githubLocalActions.viewDocumentation",
"when": "never"
},
{
"command": "githubLocalActions.helpAndSupport",
"when": "never"
} }
], ],
"view/title": [ "view/title": [
@@ -353,6 +378,21 @@
"command": "githubLocalActions.refreshSettings", "command": "githubLocalActions.refreshSettings",
"when": "view == settings", "when": "view == settings",
"group": "navigation@0" "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": [ "view/item/context": [

View File

@@ -1,5 +1,5 @@
import * as vscode from 'vscode'; 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 { Act } from './act';
import ComponentsTreeDataProvider from './views/components/componentsTreeDataProvider'; import ComponentsTreeDataProvider from './views/components/componentsTreeDataProvider';
import { DecorationProvider } from './views/decorationProvider'; import { DecorationProvider } from './views/decorationProvider';
@@ -55,7 +55,13 @@ export function activate(context: vscode.ExtensionContext) {
historyTreeView, historyTreeView,
settingsTreeView, settingsTreeView,
window.registerFileDecorationProvider(decorationProvider), 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'));
}),
); );
} }