Add action list to cards with callback (#1392)

- Add the ActionDescriptor functionality. This is a table of information with actionable links
- Also add optional status indicator which shows a color. In the future, would like to extend to have icon in this space as an alternative.
- Fixed 1 issue with account management UI throwing an error on cancel
This commit is contained in:
Kevin Cunnane
2018-05-11 10:59:42 -07:00
committed by GitHub
parent c0a6f3e012
commit 41ffd6e8ae
9 changed files with 178 additions and 29 deletions

View File

@@ -188,10 +188,24 @@ declare module 'sqlops' {
*/
label: string;
/**
* ID of the task to be called when this is clicked on.
* These should be registered using the {tasks.registerTask} API.
* Name of the clickable action. If not defined then no action will be shown
*/
taskId: string;
actionTitle?: string;
/**
* Data sent on callback being run.
*/
callbackData?: string;
}
/**
* Defines status indicators that can be shown to the user as part of
* components such as the Card UI
*/
export enum StatusIndicator {
None = 0,
Ok = 1,
Warning = 2,
Error = 3
}
/**
@@ -202,6 +216,7 @@ declare module 'sqlops' {
label: string;
value?: string;
actions?: ActionDescriptor[];
status?: StatusIndicator;
}
export interface InputBoxProperties {
@@ -230,6 +245,7 @@ declare module 'sqlops' {
label: string;
value: string;
actions?: ActionDescriptor[];
onDidActionClick: vscode.Event<ActionDescriptor>;
}
export interface InputBoxComponent extends Component, InputBoxProperties {