Implemented a deaktivateProgressbar function

This commit is contained in:
2025-11-17 13:15:37 +01:00
parent 1e3d830ae2
commit ada231cd28
3 changed files with 32 additions and 8 deletions
+28 -7
View File
@@ -23,9 +23,17 @@ function checkBoxes() {
if(isChecked){
//Code to submit the video
var selectedCheckboxes = {};
checkboxes.forEach(function(checkbox){
if(checkbox.checked){
selectedCheckboxes[checkbox.nextElementSibling.textContent] = "";
}
});
console.log(selectedCheckboxes);
var pathTest = window.electronAPI.getFilePath(videoUpload.files[0]);
if(pathTest.endsWith(".mp4") || pathTest.endsWith(".mov") || pathTest.endsWith(".avi") || pathTest.endsWith( ".mkv")){
window.extractor.extract({inputVideoPath: pathTest, outputType:"wav"});
document.getElementById("progressbar").style.visibility = "visible";
//window.extractor.extract({inputVideoPath: pathTest, outputType:"wav"});
}
} else {
//language only english at the moment
@@ -102,12 +110,13 @@ function updateProgressBar(bar, value){
function loadAiOptions(options){
try {
var menu = document.getElementById('ai_type');
var object_holdy;
var choice ;
object_holdy = Object.keys(languageOptions);
for(i = 0; i < options.length; i++){
var opty = options[i];
var namey = "option" + i;
var choice = document.createElement(namey);
choice.textContent = "t";
choice.value = i;
choice = document.createElement('option');
choice.textContent = object_holdy[i];
choice.value = object_holdy[i];
menu.appendChild(choice);
}
} catch (error) {
@@ -137,7 +146,19 @@ function loadLanguageOptions(){
}
function activateSubmitBtn(hasFile){
submitButton.disabled = !hasFile;
try {
submitButton.disabled = !hasFile;
} catch (error) {
console.log(error);
}
}
function deaktivateProgressbar(){
try {
document.getElementById("progressbar").style.visibility = "hidden";
} catch (error) {
console.log(error);
}
}
videoUpload.addEventListener("change", () => {