Fix setting file count description to be for user selected files
Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
@@ -12,8 +12,9 @@ export default class InputsTreeItem extends TreeItem implements GithubLocalActio
|
||||
|
||||
constructor(public workspaceFolder: WorkspaceFolder, inputs: Setting[], inputFiles: SettingFile[]) {
|
||||
super('Inputs', TreeItemCollapsibleState.Collapsed);
|
||||
const selectedInputFiles = inputFiles.filter(inputFile => inputFile.selected);
|
||||
this.description = `${inputs.filter(input => input.selected).length}/${inputs.length}` +
|
||||
(inputFiles.length > 0 ? ` + ${inputFiles.length} input file(s)` : ``);
|
||||
(selectedInputFiles.length > 0 ? ` + ${selectedInputFiles.length} input file(s)` : ``);
|
||||
this.contextValue = InputsTreeItem.contextValue;
|
||||
this.iconPath = new ThemeIcon('record-keys');
|
||||
}
|
||||
|
||||
@@ -12,8 +12,9 @@ export default class SecretsTreeItem extends TreeItem implements GithubLocalActi
|
||||
|
||||
constructor(public workspaceFolder: WorkspaceFolder, secrets: Setting[], secretFiles: SettingFile[]) {
|
||||
super('Secrets', TreeItemCollapsibleState.Collapsed);
|
||||
const selectedSecretFiles = secretFiles.filter(secretFile => secretFile.selected);
|
||||
this.description = `${secrets.filter(secret => secret.selected).length}/${secrets.length}` +
|
||||
(secretFiles.length > 0 ? ` + ${secretFiles.length} secret file(s)` : ``);
|
||||
(selectedSecretFiles.length > 0 ? ` + ${selectedSecretFiles.length} secret file(s)` : ``);
|
||||
this.contextValue = SecretsTreeItem.contextValue;
|
||||
this.iconPath = new ThemeIcon('lock');
|
||||
}
|
||||
|
||||
@@ -12,8 +12,9 @@ export default class VariablesTreeItem extends TreeItem implements GithubLocalAc
|
||||
|
||||
constructor(public workspaceFolder: WorkspaceFolder, variables: Setting[], variableFiles: SettingFile[]) {
|
||||
super('Variables', TreeItemCollapsibleState.Collapsed);
|
||||
const selectedVariableFiles = variableFiles.filter(variableFile => variableFile.selected);
|
||||
this.description = `${variables.filter(variable => variable.selected).length}/${variables.length}` +
|
||||
(variableFiles.length > 0 ? ` + ${variableFiles.length} variable file(s)` : ``);
|
||||
(selectedVariableFiles.length > 0 ? ` + ${selectedVariableFiles.length} variable file(s)` : ``);
|
||||
this.contextValue = VariablesTreeItem.contextValue;
|
||||
this.iconPath = new ThemeIcon('symbol-key');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user