mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Implemented a deaktivateProgressbar function
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
<div class="flagsBtns" id="flagsBtns">
|
||||
<select name="ai_type" id="ai_type">
|
||||
</select>
|
||||
<select name="transkript_type" id="transkript_type">
|
||||
</select>
|
||||
<select name="language_option" id="language_option">
|
||||
</select>
|
||||
</div>
|
||||
@@ -40,7 +42,7 @@
|
||||
|
||||
<button class="submit-btn" id="submitButton" onclick="checkBoxes()" disabled>Submit</button>
|
||||
|
||||
<div class="progressbar">
|
||||
<div class="progressbar" id="progressbar">
|
||||
<div class="progress_fill"></div>
|
||||
<span class="progress_text">0%</span>
|
||||
</div>
|
||||
|
||||
+28
-7
@@ -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", () => {
|
||||
|
||||
@@ -131,6 +131,7 @@ h1 {
|
||||
background: rgb(42, 46, 78);
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.progress_fill{
|
||||
|
||||
Reference in New Issue
Block a user