-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from isfopo:issue/Add-sections
Issue/Add-sections
- Loading branch information
Showing
8 changed files
with
190 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as vscode from "vscode"; | ||
import { EnvironmentKeyValueTreeItem } from "./EnvironmentKeyValueTreeItem"; | ||
|
||
export class EnvironmentGroupTreeItem extends vscode.TreeItem { | ||
constructor( | ||
public readonly name: string, | ||
public readonly presets: string[], | ||
public readonly children: EnvironmentKeyValueTreeItem[] = [], | ||
public readonly collapsibleState: vscode.TreeItemCollapsibleState = vscode | ||
.TreeItemCollapsibleState.Collapsed | ||
) { | ||
super(name, collapsibleState); | ||
this.presets = presets; | ||
this.children = children; | ||
|
||
if (presets.length > 0) { | ||
this.contextValue = "group-has-presets"; | ||
} else { | ||
this.contextValue = "group"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
export type EnvironmentContent = Record<string, EnvironmentKeyValue>; | ||
export type EnvironmentContent = Record< | ||
string, | ||
EnvironmentContent | EnvironmentKeyValue | ||
>; | ||
|
||
export interface EnvironmentKeyValue { | ||
value: string; | ||
type: EnvironmentKeyValueType; | ||
options?: string[]; | ||
presets?: Record<string, string>; | ||
} | ||
|
||
export type EnvironmentKeyValueType = "string" | "bool"; |