diff --git a/vscode-extension/src/Services/WebPanelCommandService.ts b/vscode-extension/src/Services/WebPanelCommandService.ts
index dde6262..83a5d26 100644
--- a/vscode-extension/src/Services/WebPanelCommandService.ts
+++ b/vscode-extension/src/Services/WebPanelCommandService.ts
@@ -184,5 +184,17 @@ export class WebPanelCommandService {
await this.excelService.export(entries);
WebPanel.postMessage(null);
}
+
+ async GetConfigurationCommand(message: IMessageBase) {
+ // TODO
+ let setting = false;
+ WebPanel.postMessage({ Command: 'GetConfiguration', setting});
+ }
+ async SetConfigurationCommand(message: IMessageBase) {
+ // TODO
+ //let setting = message.Data as boolean;
+ //
+ WebPanel.postMessage({Command: 'SetConfiguration', Data: null});
+ }
}
\ No newline at end of file
diff --git a/web-ui/src/resources/elements/toolbar.html b/web-ui/src/resources/elements/toolbar.html
index ca022e3..98ccd31 100644
--- a/web-ui/src/resources/elements/toolbar.html
+++ b/web-ui/src/resources/elements/toolbar.html
@@ -28,12 +28,22 @@
Scenario
-
+
-
+
+
+
+
+
+
ATDD.TestScriptor
diff --git a/web-ui/src/resources/elements/toolbar.ts b/web-ui/src/resources/elements/toolbar.ts
index ace3113..18a0173 100644
--- a/web-ui/src/resources/elements/toolbar.ts
+++ b/web-ui/src/resources/elements/toolbar.ts
@@ -1,5 +1,4 @@
-import { EventAggregator } from 'aurelia-event-aggregator';
-import { CommandHandlerService } from "backend/CommandHandlerService";
+import { BackendService } from 'services/backend-service';
import { autoinject, bindable } from "aurelia-framework";
@autoinject()
@@ -8,10 +7,34 @@ export class Toolbar {
@bindable()
searchValue: string;
- constructor(private commandHandlerService: CommandHandlerService) {
+ @bindable()
+ noConfirmations: boolean = false;
+
+ loaded: boolean = false;
+
+ constructor(private backendService: BackendService) {
+ }
+
+ async attached() {
+ try {
+ let currentSetting = await this.sendCommand('GetConfiguration');
+ this.noConfirmations = currentSetting;
+ } catch {
+ console.log('GetConfiguration call is not yet implemented');
+ }
+
+ this.loaded = true;
}
async sendCommand(command: string, data?: any) {
- await this.commandHandlerService.dispatch(command, data);
+ return await this.backendService.send({ Command: command, Data: data });
+ }
+
+ noConfirmationsChanged(newValue: boolean) {
+ if (this.loaded !== true) {
+ return;
+ }
+
+ this.sendCommand('SetConfiguration', newValue);
}
}
\ No newline at end of file