Add history view, rework to use history status, remove old classes
Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { CancellationToken, commands, EventEmitter, ExtensionContext, TreeDataProvider, TreeItem } from "vscode";
|
||||
import { act } from "../../extension";
|
||||
import { GithubLocalActionsTreeItem } from "../githubLocalActionsTreeItem";
|
||||
import ContainerEnginesTreeItem from "./containerEngines";
|
||||
import EnvironmentsTreeItem from "./environments";
|
||||
@@ -40,14 +41,22 @@ export default class SettingsTreeDataProvider implements TreeDataProvider<Github
|
||||
if (element) {
|
||||
return element.getChildren();
|
||||
} else {
|
||||
return [
|
||||
new EnvironmentsTreeItem(),
|
||||
new SecretsTreeItem(),
|
||||
new VariablesTreeItem(),
|
||||
new InputsTreeItem(),
|
||||
new RunnersTreeItem(),
|
||||
new ContainerEnginesTreeItem()
|
||||
];
|
||||
const items: GithubLocalActionsTreeItem[] = [];
|
||||
|
||||
const workflows = await act.workflowsManager.getWorkflows();
|
||||
if (workflows.length > 0) {
|
||||
items.push(...[
|
||||
new EnvironmentsTreeItem(),
|
||||
new SecretsTreeItem(),
|
||||
new VariablesTreeItem(),
|
||||
new InputsTreeItem(),
|
||||
new RunnersTreeItem(),
|
||||
new ContainerEnginesTreeItem()
|
||||
]);
|
||||
}
|
||||
|
||||
await commands.executeCommand('setContext', 'githubLocalActions:noSettings', items.length == 0);
|
||||
return items;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user