Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing progress bar upon clearing all stages #70

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion sidebar/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ let actionStarted = false;
const navigateToConfigButton = document.getElementById('backtoHome');
const backtoHome = document.getElementById('backArrow');
const selectedIconButton = document.getElementById('selectedIconNumber');
const ProgressStepperContainer = document.getElementById('progress-stepper');
let FilePath = "";

//cleanup required
Expand Down Expand Up @@ -394,6 +395,8 @@ document.addEventListener('ciCdStepClick', function (e) {
type: "openLink",
url: "https://keploy.io/docs", // Replace this with the URL you want to navigate to
});// Example of opening a link


}
});

Expand All @@ -407,13 +410,25 @@ document.addEventListener('addUsersClick', function (e) {
type: "openLink",
url: "https://app.keploy.io", // Replace this with the URL you want to navigate to
});// Example of opening a link

vscode.postMessage({
type:"progressStatus",
value:"false"
})
}
});

// Handle messages sent from the extension
window.addEventListener('message', event => {
const message = event.data;
// console.log("message", message);
console.log("message", message);

if(message.type === "progressBarStatus"){
if(message.value == false){
ProgressStepperContainer.style.display = "none";
}
}


if (message.type === 'navigateToHome') {
vscode.postMessage({
Expand Down
20 changes: 19 additions & 1 deletion src/SidebarProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@

const apiResponse = this._context.globalState.get<string>('apiResponse') || "No response";
const signedIn = this._context.globalState.get<string>('SignedOthers') || "false";
const progressBarVisible = this._context.globalState.get<boolean>('progressVisible') ?? true;


console.log("signedIn others value", signedIn);

Expand Down Expand Up @@ -346,7 +348,14 @@
}
break;
}
case "progressStatus":{
if(progressBarVisible == true && data.value == "false"){

Check warning on line 352 in src/SidebarProvider.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected '===' and instead saw '=='

Check warning on line 352 in src/SidebarProvider.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Expected '===' and instead saw '=='

Check warning on line 352 in src/SidebarProvider.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected '===' and instead saw '=='

Check warning on line 352 in src/SidebarProvider.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Expected '===' and instead saw '=='

Check warning on line 352 in src/SidebarProvider.ts

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected '===' and instead saw '=='

Check warning on line 352 in src/SidebarProvider.ts

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Expected '===' and instead saw '=='
console.log("progressbarVisible and data value: ",progressBarVisible,data.value);
await this._context.globalState.update("progressVisible", false);
}

break;
}
case "openLink": {

try {
Expand Down Expand Up @@ -491,7 +500,7 @@

// Stop the interval when the webview is no longer active
public dispose() {
if (this._interval) {
if (this._interval) {
clearInterval(this._interval);
}
}
Expand All @@ -509,6 +518,15 @@
type: 'signedIn',
value: signedIn,
});

const progressBarVisible = this._context.globalState.get<boolean>('progressVisible') ?? true;


this._view.webview.postMessage({
type: 'progressBarStatus',
value: progressBarVisible,
});

}
}
public revive(panel: vscode.WebviewView) {
Expand Down
6 changes: 4 additions & 2 deletions webviews/components/KeployHome.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
let settingsIcon = document.querySelector(".settings-icon");
let currentStep = 1;
let backConfigButton;

let progressBarHide;
function goToNextStep(step) {
currentStep = step;

}

function resetCurrentStep() {
Expand Down Expand Up @@ -83,6 +84,7 @@
detail: { step: 'add-users' },
});
document.dispatchEvent(event);

}
}
const toggleRecording = () => {
Expand Down Expand Up @@ -345,7 +347,7 @@
</div>
{/if}
<div class="loader" id="loader"></div>
<div class="stepper-container">
<div class="stepper-container" id="progress-stepper">
<div class="step-line"></div>
<div class="step">
<span
Expand Down
Loading