diff --git a/sidebar/sidebar.js b/sidebar/sidebar.js index c06377f..7966832 100644 --- a/sidebar/sidebar.js +++ b/sidebar/sidebar.js @@ -132,6 +132,7 @@ if (rerunTestSuiteButton) { if(backConfigbutton){ backConfigbutton.addEventListener('click',async () =>{ + console.log("back button clicked man." , selectedIconButton.textContent); if(selectedIconButton.textContent == '1'){ console.log("selectedIconButton: " , selectedIconButton.textContent ); console.log("backconfig button clicked") @@ -418,6 +419,22 @@ document.addEventListener('addUsersClick', function (e) { } }); +// Listen for custom events from the Svelte component +document.addEventListener('getKeployConfig', () => { + vscode.postMessage({ + type: 'getKeployConfig', + }); +}); + +document.addEventListener('updateKeployConfig', (e) => { + const config = e.detail.config; + vscode.postMessage({ + type: 'updateKeployConfig', + config: config, + }); +}); + + // Handle messages sent from the extension window.addEventListener('message', event => { const message = event.data; diff --git a/webviews/components/KeployHome.svelte b/webviews/components/KeployHome.svelte index b74b246..e1c6cb9 100644 --- a/webviews/components/KeployHome.svelte +++ b/webviews/components/KeployHome.svelte @@ -1,37 +1,6 @@