mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b76b2e96d | |||
| 6aa62ed534 | |||
| cd474d7101 | |||
| bd47a194c7 | |||
| ef080063a8 | |||
| c2c1aa1b17 | |||
| ee3bcdcd05 | |||
| bac6e2b7f0 | |||
| 9760704883 | |||
| aee1428cb6 | |||
| 7494e13c8c | |||
| 2998799826 |
@@ -147,12 +147,7 @@
|
||||
</div>
|
||||
|
||||
<div class="step" id="step6" style="display:none;">
|
||||
<button class="download-btn" id="downloadButton" onclick="" disabled>Download</button>
|
||||
|
||||
<div class="progressbar" id="progressbar">
|
||||
<div class="progress_fill"></div>
|
||||
<span class="progress_text">0%</span>
|
||||
</div>
|
||||
<button class="download-btn" id="downloadButton" onclick="fileDownload()">Download</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@ try {
|
||||
contextBridge.exposeInMainWorld("submitSpeaker", {
|
||||
submitSpeaker: (speaker_names) => {ipcRenderer.send("speaker_submit", speaker_names)}
|
||||
})
|
||||
|
||||
contextBridge.exposeInMainWorld("download", {
|
||||
file_download: () => {ipcRenderer.send("file_download")}
|
||||
})
|
||||
|
||||
|
||||
ipcRenderer.on("error", (event, err) => {alert(err)})
|
||||
} catch (error) {
|
||||
|
||||
+12
-17
@@ -33,7 +33,6 @@ uploadContainer.addEventListener("drop", (e) => {
|
||||
|
||||
window.addEventListener('load', async (e) => {
|
||||
try {
|
||||
console.log("test");
|
||||
loadLanguageOptions();
|
||||
const value = await window.onStartup.getModuleNames();
|
||||
loadAiOptions(value.ai_modules);
|
||||
@@ -117,7 +116,7 @@ docFormat.addEventListener("change", (e) =>{
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
docFormatSummary1.addEventListener("change", (e) =>{
|
||||
try {
|
||||
if(docFormatSummary1.checked){
|
||||
@@ -129,7 +128,7 @@ docFormatSummary1.addEventListener("change", (e) =>{
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
docFormatSummary2.addEventListener("change", (e) =>{
|
||||
try {
|
||||
if(docFormatSummary2.checked){
|
||||
@@ -141,7 +140,7 @@ docFormatSummary2.addEventListener("change", (e) =>{
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
docFormatSummary3.addEventListener("change", (e) =>{
|
||||
try {
|
||||
if(docFormatSummary3.checked){
|
||||
@@ -153,7 +152,7 @@ docFormatSummary3.addEventListener("change", (e) =>{
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
docFormatCustom.addEventListener("change", (e) =>{
|
||||
try {
|
||||
if(docFormatCustom.checked){
|
||||
@@ -165,7 +164,7 @@ docFormatCustom.addEventListener("change", (e) =>{
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//Speaker change listener
|
||||
cur_speaker.addEventListener("change", (e) =>{
|
||||
@@ -174,16 +173,12 @@ cur_speaker.addEventListener("change", (e) =>{
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
window.electron.speakerAudios((event, arg) => {
|
||||
try {
|
||||
window.audios.speakerAudios((event, arg) => {
|
||||
setSpeakerAudiosValue(arg);
|
||||
loadSpeakerOptions(arg);
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
window.electron.progress((event, arg) => {
|
||||
if(arg.curstep == 1){
|
||||
@@ -207,7 +202,7 @@ function setCircleOne(){
|
||||
} catch (error) {
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
function setCircleZwo(){
|
||||
try {
|
||||
if(document.getElementById("box2").style.backgroundColor == "green"){
|
||||
@@ -219,7 +214,7 @@ function setCircleZwo(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
function setCircleThree(){
|
||||
try {
|
||||
if(document.getElementById("box3").style.backgroundColor == "green"){
|
||||
@@ -231,7 +226,7 @@ function setCircleThree(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
function setCircleFour(){
|
||||
try {
|
||||
if(document.getElementById("box4").style.backgroundColor == "green"){
|
||||
@@ -242,7 +237,7 @@ function setCircleFour(){
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
+10
-5
@@ -25,7 +25,6 @@ function checkBoxes() {
|
||||
var pathTest = window.electronAPI.getFilePath(videoUpload.files[0]);
|
||||
var pathToLower = pathTest.toLowerCase();
|
||||
if(testEndings.some(e => pathToLower.endsWith(e))){
|
||||
document.getElementById("progressbar").style.visibility = "visible";
|
||||
//assembly of the json for the main
|
||||
|
||||
const selectedStyles = [checkedCounter];
|
||||
@@ -49,15 +48,15 @@ function checkBoxes() {
|
||||
const sendingPackage = {
|
||||
"video": {
|
||||
"module":"extraction-video-to-audio",
|
||||
"inputVideoPath": pathTest,
|
||||
"outputType": outputType.value
|
||||
"inputVideoPath": pathTest
|
||||
},
|
||||
"transcription": {
|
||||
"module": transcriptionType.value
|
||||
},
|
||||
"document": {
|
||||
"module":aiType.value,
|
||||
"styles": selectedStyles
|
||||
"styles": selectedStyles,
|
||||
"outputType": outputType.value
|
||||
}
|
||||
};
|
||||
window.submit.submit(sendingPackage)
|
||||
@@ -105,7 +104,6 @@ function changeLanguage(language) {
|
||||
function handleFiles(files) {
|
||||
try {
|
||||
if (files.length > 0) {
|
||||
document.getElementById("progressbar").style.visibility = "visible";
|
||||
const file = files[0];
|
||||
if (file.type.startsWith('video/')) {
|
||||
const filePath = window.explorer.onFileDrop(files[0])
|
||||
@@ -330,3 +328,10 @@ function sendSpeakerPackages(){
|
||||
}
|
||||
}
|
||||
|
||||
function fileDownload() {
|
||||
try {
|
||||
window.download.file_download();
|
||||
} catch (error) {
|
||||
console.error("Download failed:", error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user