Skip to content

Commit

Permalink
DA#242: Modified: Small fix in data export
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushTyagi1 committed Oct 17, 2023
1 parent e0773a4 commit 8519502
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pages/Tools/DataExport/dataExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const validateFormData = (formData: any): string => {
errors.push("Please inform the file destination folder");
}

if(!formData.threads.trim() || parseInt(formData.threads)<1){
if (!formData.threads.trim() || parseInt(formData.threads) < 1) {
errors.push("threads cannot be undefined or less than 1");
}

Expand Down Expand Up @@ -109,10 +109,10 @@ export const dataExport = async () => {
});
currentPanel.iconPath = {
dark: vscode.Uri.file(
path.join(__filename, "..", "..", "images","dark","export_dark.svg")
path.join(__filename, "..", "..", "images", "dark", "export_dark.svg")
),
light: vscode.Uri.file(
path.join(__filename, "..", "..", "images","light","export_light.svg")
path.join(__filename, "..", "..", "images", "light", "export_light.svg")
),
};
currentPanel.webview.html = getLoader("Data Export");
Expand All @@ -123,10 +123,8 @@ export const dataExport = async () => {
vscode.window.showErrorMessage("Buckets not found");
return;
}
const bucketNameArr: string[] = [];
for (let bucket of buckets) {
bucketNameArr.push(bucket.name);
}

const bucketNameArr: string[] = buckets.map(b => b.name);

try {
currentPanel.webview.html = await dataExportWebview(bucketNameArr);
Expand Down
25 changes: 25 additions & 0 deletions src/webViews/tools/dataExport.webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ export const dataExportWebview = async (buckets: string[]): Promise<string> => {
margin-bottom: 5px;
}
input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
width: 15px;
height: 15px;
border-radius: 2px;
outline: none;
border: 1px solid #999;
background-color: white;
}
input[type="checkbox"]:checked {
background-color: #ea2328;
}
input[type="checkbox"]:checked::before {
content: '\\2714';
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
color: white;
height: 100%;
}
form {
max-width: 500px;
margin: 0 auto;
Expand Down

0 comments on commit 8519502

Please sign in to comment.