Compare commits

..

6 Commits

Author SHA1 Message Date
MikeHughes-BIN 8f6ffa702c Add documentation folder 2026-01-17 14:42:36 +01:00
Hughes, Mike d09b75a6cd Merge branch 'feature/ui-test' into 'develop'
Feature/ui test

See merge request proj-wise2526-video2document/video2document!95
2026-01-17 14:35:38 +01:00
Verena Schulz 0427056f65 Small changes 2026-01-17 00:11:57 +01:00
Verena Schulz 8076fe92f5 Integrated customDocBtn better with css into the menu 2026-01-17 00:11:37 +01:00
Verena Schulz c2e6c4a186 Style changes for custom document css 2026-01-16 23:59:30 +01:00
Verena Schulz 826381d858 Added hover effects for other document types 2026-01-16 23:54:31 +01:00
7 changed files with 256 additions and 195 deletions
+172 -161
View File
@@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="de"> <html lang="de">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -7,217 +8,227 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/themes/light.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/themes/light.css">
</head> </head>
<body> <body>
<div id="h1-wrapper"> <div id="h1-wrapper">
<section class="p-menu1"> <section class="p-menu1">
<nav id="navbar" class="navigation" role="navigation"> <nav id="navbar" class="navigation" role="navigation">
<input id="toggle1" type="checkbox" /> <input id="toggle1" type="checkbox" />
<label class="hamburger1" for="toggle1"> <label class="hamburger1" for="toggle1">
<div class="top"></div> <div class="top"></div>
<div class="meat"></div> <div class="meat"></div>
<div class="bottom"></div> <div class="bottom"></div>
</label> </label>
<nav class="menu1"> <nav class="menu1">
<button id="customDocBtn" onclick="showCD()">Manage document types</button> <button id="customDocBtn" onclick="showCD()">Manage document types</button>
<a href="help_page.html" class="li1">Help</a> <a href="help_page.html" class="li1">Help</a>
</nav>
</nav> </nav>
</nav> </section>
</section>
<h1 id="h1">Video to document</h1> <h1 id="h1">Video to document</h1>
<div class="gui-language"> <div class="gui-language">
<!-- to do: Ausprobieren mit li, a oder button, im Notfall ohne Flaggen Icons, kein hover--> <select name="language_option" id="language_option"></select>
<select name="language_option" id="language_option"></select> </div>
</div>
</div> </div>
<div class="step-nav"> <div class="step-nav">
<div class="step-item active" data-step="1" id="step_nav1">1. Step</div> <div class="step-item active" data-step="1" id="step_nav1">1. Step</div>
<div class="step-item" data-step="2" id="step_nav2">2. Step</div> <div class="step-item" data-step="2" id="step_nav2">2. Step</div>
<div class="step-item" data-step="3" id="step_nav3">3. Step</div> <div class="step-item" data-step="3" id="step_nav3">3. Step</div>
<div class="step-item" data-step="4" id="step_nav4">4. Step</div> <div class="step-item" data-step="4" id="step_nav4">4. Step</div>
<div class="step-item" data-step="5" id="step_nav5">5. Step</div> <div class="step-item" data-step="5" id="step_nav5">5. Step</div>
<div class="step-item" data-step="6" id="step_nav6">6. Step</div> <div class="step-item" data-step="6" id="step_nav6">6. Step</div>
</div> </div>
<div id="middleContainerWrapper" class="middle-container-wrapper"> <div id="middleContainerWrapper" class="middle-container-wrapper">
<button id="prevBtn" class="navBtn" disabled>&larr;</button> <button id="prevBtn" class="navBtn" disabled>&larr;</button>
<!-- Visible middle part--> <!-- Visible middle part-->
<div class="mitte" id="mitte"> <div class="mitte" id="mitte">
<!--Costum document section--> <!--Costum document section-->
<div class="container" id="cdContainer" style="display:none;"> <div class="container" id="cdContainer" style="display:none;">
<h1 id="cd_h1">Manage document types</h1> <h1 id="cd_h1">Manage document types</h1>
<label for="existingDocs" id="cd_existingDocs">Select existing documents (optional):</label> <label for="existingDocs" id="cd_existingDocs">Select existing documents (optional):</label>
<!--Drop Down--> <!--Drop Down-->
<select name="existingDocs" id="existingDocs"> <select name="existingDocs" id="existingDocs">
<option value="newDoc" id="newDoc">-- Create new document --</option> <option value="newDoc" id="newDoc">-- Create new document --</option>
</select> </select>
<div id="docNameWrapper"> <div id="docNameWrapper">
<label for="docName" id="cd_docName">Document name:</label> <label for="docName" id="cd_docName">Document name:</label>
<input type="text" id="docName" placeholder="Enter the document name here"> <input type="text" id="docName" placeholder="Enter the document name here">
</div> </div>
<label for="prompt" id="cd_promt">Your prompt:</label> <label for="prompt" id="cd_promt">Your prompt:</label>
<textarea id="prompt" placeholder="Type the prompt for your document here..."></textarea> <textarea id="prompt" placeholder="Type the prompt for your document here..."></textarea>
<div class="buttons"> <div class="buttons">
<button id="goBackBtn">Return</button> <button id="goBackBtn">Return</button>
<button id="deleteBtn">Delete document</button> <button id="deleteBtn">Delete document</button>
<button id="generateBtn">Save document</button> <button id="generateBtn">Save document</button>
</div> </div>
<div id="result"></div> <div id="result"></div>
</div>
<!-- Here starts code from step 1-->
<div class="step" id="step1">
<h2 class="h2">Upload your video here:</h2>
<div class="upload-container" id="uploadContainer">
<p id="p1">Drag and drop video file</p>
<video id="previewThumbnail" autoplay="false">
</video>
<div class="file-name" id="fileName">No video chosen</div>
<div id="thumbnailContainer">
<img id="thumbnailImage" style="display:none;">
</div>
<button class="custom-btn" id="manualUploadBtn">Search video</button>
<input type="file" id="videoUpload" accept="video/*">
</div>
</div>
<!-- Here starts code from step 2-->
<div class="step" id="step2" style="display:none;">
<h2 class="h2">Choose your preferences:</h2>
<div class="KI-wrapper">
<label id="labelKI">Select ki:</label>
<select name="ai_type" id="ai_type"></select>
</div> </div>
<div class="transcript-wrap"> <!-- Here starts code from step 1-->
<label id="labelTranscription">Select transcription:</label> <div class="step" id="step1">
<select name="transkript_type" id="transkript_type"></select> <h2 class="h2">Upload your video here:</h2>
</div> <div class="upload-container" id="uploadContainer">
<p id="p1">Drag and drop video file</p>
<div class="type-wrapper"> <video id="previewThumbnail" autoplay="false">
<label id="labelType">Select type:</label> </video>
<select name="output_type" id="output_type"> <div class="file-name" id="fileName">No video chosen</div>
<option value="pdf">.pdf</option> <div id="thumbnailContainer">
<option value="word">.docx</option> <img id="thumbnailImage" style="display:none;">
<option value="txt">.txt</option>
</select>
</div>
<div class="language-wrapper">
<label id="labelLanguage">Select language:</label>
<select name="document_language_option" id="document_language_option">
</select>
</div>
</div>
<!-- Here starts code from step 3-->
<!-- Hover Effekt für Dokumentenvorschau, Fragezeichen hinter Text, drüber hoven zeigt Beispieldokument -->
<div class="step" id="step3" style="display:none;">
<div class="checkbox-group">
<h2 class="h2">Choose prefered document style:</h2>
<div class="checkbox-container">
<input type="checkbox" name ="docFormat" id="docFormat" value="followup-report">
<label id="label_format" for="docFormat">Follow-up Report</label>
<div class="figure1">
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
<img class="img-hover1" src="flags/germany-flag-png-large.jpg">
</div> </div>
<button class="custom-btn" id="manualUploadBtn">Search video</button>
<input type="file" id="videoUpload" accept="video/*">
</div> </div>
<div class="checkbox-container"> </div>
<input type="checkbox" name="docFormat" id="docFormatSummary1" value="agenda">
<label id="label_summary" for="docFormatSummary">Agenda</label> <!-- Here starts code from step 2-->
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png"> <div class="step" id="step2" style="display:none;">
<h2 class="h2">Choose your preferences:</h2>
<div class="KI-wrapper">
<label id="labelKI">Select ki:</label>
<select name="ai_type" id="ai_type"></select>
</div> </div>
<div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary2" value="result-protocol"> <div class="transcript-wrap">
<label id="label_summary" for="docFormatSummary">Resultprotocol</label> <label id="labelTranscription">Select transcription:</label>
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png"> <select name="transkript_type" id="transkript_type"></select>
</div> </div>
<div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary3" value="sprint-planning"> <div class="type-wrapper">
<label id="label_summary" for="docFormatSummary">Sprint Planning Note</label> <label id="labelType">Select type:</label>
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png"> <select name="output_type" id="output_type">
<option value="pdf">.pdf</option>
<option value="word">.docx</option>
<option value="txt">.txt</option>
</select>
</div> </div>
<div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatCustom" value="custom"> <div class="language-wrapper">
<select name="customDocumentTypes" id="customDocumentTypes"> <label id="labelLanguage">Select language:</label>
<select name="document_language_option" id="document_language_option">
</select> </select>
</div> </div>
</div> </div>
</div>
<!-- Here starts code from step 4--> <!-- Here starts code from step 3-->
<div class="step" id="step4" style="display:none;">
<h2 class="h2">Click to submit:</h2>
<button class="submit-btn" id="submitButton" onclick="checkBoxes()" disabled>Submit</button>
<div class="testy" id="testy"> <!-- Hover Effekt für Dokumentenvorschau, Fragezeichen hinter Text, drüber hoven zeigt Beispieldokument -->
<div class="box2" id="box1"> <div class="step" id="step3" style="display:none;">
</div> <div class="checkbox-group">
<p id="box1_p1">---Starting---</p> <h2 class="h2">Choose prefered document style:</h2>
<div class="box2" id="box2"> <div class="checkbox-container">
</div> <input type="checkbox" name="docFormat" id="docFormat" value="followup-report">
<p id="box2_p2">---Transkribing---</p> <label id="label_format" for="docFormat">Follow-up Report</label>
<div class="box2" id="box3"> <div class="figure1">
</div> <img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
<p id="box3_p3">---Document creation---</p> <img class="img-hover1" src="flags/germany-flag-png-large.jpg">
<div class="box2" id="box4"> </div>
</div>
<div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary1" value="agenda">
<label id="label_summary" for="docFormatSummary">Agenda</label>
<div class="figure2">
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
<img class="img-hover2" src="flags/india-flag-png-large.png">
</div>
</div>
<div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary2" value="result-protocol">
<label id="label_summary" for="docFormatSummary">Resultprotocol</label>
<div class="figure3">
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
<img class="img-hover3" src="flags/united-kingdom-flag-png-large.jpg">
</div>
</div>
<div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatSummary3" value="sprint-planning">
<label id="label_summary" for="docFormatSummary">Sprint Planning Note</label>
<div class="figure4">
<img class="img-icon" src="icons/question-mark-button-icon--free-clip-art-30.png">
<img class="img-hover4" src="flags/germany-flag-png-large.jpg">
</div>
</div>
<div class="checkbox-container">
<input type="checkbox" name="docFormat" id="docFormatCustom" value="custom">
<select name="customDocumentTypes" id="customDocumentTypes">
</select>
</div>
</div> </div>
</div> </div>
</div>
<!-- Here starts code from step 5--> <!-- Here starts code from step 4-->
<div class="step" id="step5" style="display:none;"> <div class="step" id="step4" style="display:none;">
<h2 class="h2">Change names of the speakers:</h2> <h2 class="h2">Click to submit:</h2>
<div class="speakerView" id="speakerView"> <button class="submit-btn" id="submitButton" onclick="checkBoxes()" disabled>Submit</button>
<label id="labelSpeaker">Select Speaker:</label>
<select name="cur_speaker" id="cur_speaker"> <div class="testy" id="testy">
</select> <div class="box2" id="box1">
</div> </div>
<div class="speakerAudio" id="speakerAutio"> <p id="box1_p1">---Starting---</p>
<label id="labelSpeakerAudio">Selected Speaker:</label> <div class="box2" id="box2">
<audio controls id="speakerAudioViewer"> </div>
Currently there is no audio file here. <p id="box2_p2">---Transkribing---</p>
</audio> <div class="box2" id="box3">
</div> </div>
<div class="speakerWrite" id="speakerWrite"> <p id="box3_p3">---Document creation---</p>
<label id="labelSpeakerWriter">Write name:</label> <div class="box2" id="box4">
<input type="text" id="newSpeaker"> </div>
</div>
</div> </div>
<!-- Here starts code from step 5-->
<div class="step" id="step5" style="display:none;">
<h2 class="h2">Change names of the speakers:</h2>
<div class="speakerView" id="speakerView">
<label id="labelSpeaker">Select Speaker:</label>
<select name="cur_speaker" id="cur_speaker">
</select>
</div>
<div class="speakerAudio" id="speakerAutio">
<label id="labelSpeakerAudio">Selected Speaker:</label>
<audio controls id="speakerAudioViewer">
Currently there is no audio file here.
</audio>
</div>
<div class="speakerWrite" id="speakerWrite">
<label id="labelSpeakerWriter">Write name:</label>
<input type="text" id="newSpeaker">
</div>
<div class="speakerButton-group"> <div class="speakerButton-group">
<button id="speakerLocker" onclick="rewriteSpeakerName()">Rename Speaker</button> <button id="speakerLocker" onclick="rewriteSpeakerName()">Rename Speaker</button>
<button id="speakerResender" onclick="sendSpeakerPackages()">Rewrite document</button> <button id="speakerResender" onclick="sendSpeakerPackages()">Rewrite document</button>
</div> </div>
</div>
<!-- Here starts code from step 6-->
<div class="step" id="step6" style="display:none;">
<h2 class="h2">Klick to download your document:</h2>
<button class="download-btn" id="downloadButton" onclick="fileDownload()">Download</button>
</div>
</div> </div>
<!-- Here starts code from step 6--> <button id="nextBtn" class="navBtn">&rarr;</button>
<div class="step" id="step6" style="display:none;">
<h2 class="h2">Klick to download your document:</h2>
<button class="download-btn" id="downloadButton" onclick="fileDownload()">Download</button>
</div>
</div> </div>
<script src="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/lc_select.min.js"></script>
<button id ="nextBtn" class="navBtn">&rarr;</button> <script src="languages.js"></script>
<script src="script.js"></script>
</div> <script src="./renderer.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lc-select@1.3.0/lc_select.min.js"></script>
<script src="languages.js"></script>
<script src="script.js"></script>
<script src="./renderer.js"></script>
</body> </body>
</html> </html>
+82 -6
View File
@@ -186,6 +186,8 @@ input[type="file"] {
gap: 5px; gap: 5px;
} }
/* Hover effects for all different document options (with placeholders)*/
.figure1 { .figure1 {
position: relative; position: relative;
} }
@@ -201,12 +203,79 @@ input[type="file"] {
object-fit: contain; object-fit: contain;
display: none; display: none;
transition: opacity .2s; transition: opacity .2s;
z-index: 999;
} }
.figure1:hover .img-hover1 { .figure1:hover .img-hover1 {
display: flex; display: flex;
} }
.figure2 {
position: relative;
}
.img-hover2 {
position: absolute;
width: 200px;
height: 200px;
top: 0;
right: 40%;
left: 0;
bottom: 0;
object-fit: contain;
display: none;
transition: opacity .2s;
z-index: 999;
}
.figure2:hover .img-hover2 {
display: flex;
}
.figure3 {
position: relative;
}
.img-hover3 {
position: absolute;
width: 200px;
height: 200px;
top: 0;
right: 40%;
left: 0;
bottom: 0;
object-fit: contain;
display: none;
transition: opacity .2s;
z-index: 999;
}
.figure3:hover .img-hover3 {
display: flex;
}
.figure4 {
position: relative;
}
.img-hover4 {
position: absolute;
width: 200px;
height: 200px;
top: 0;
right: 40%;
left: 0;
bottom: 0;
object-fit: contain;
display: none;
transition: opacity .2s;
z-index: 999;
}
.figure4:hover .img-hover4 {
display: flex;
}
.img-icon { .img-icon {
width: 15px; width: 15px;
height: 15px; height: 15px;
@@ -236,7 +305,7 @@ input[type="file"] {
background-color: #FFF; background-color: #FFF;
display: flex; display: flex;
width: 780px; width: 780px;
height: 500px; height: 550px;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
@@ -245,6 +314,7 @@ input[type="file"] {
border-style: solid; border-style: solid;
border-radius: 6px; border-radius: 6px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
padding-top: 50px;
} }
.progressbar { .progressbar {
@@ -477,7 +547,14 @@ li {
-webkit-transition: all 0.3s ease; -webkit-transition: all 0.3s ease;
} }
.menu1 a:first-child { #customDocBtn {
border: none;
background-color:#1C3B69;
font: 700 20px 'Oswald', sans-serif;
border-radius: 0%;
}
.menu1 button:first-child {
margin-top: 30px; margin-top: 30px;
} }
@@ -494,7 +571,7 @@ li {
text-decoration: none; text-decoration: none;
} }
.li1:hover { .li1:hover, #customDocBtn:hover{
background-color: #FFF; background-color: #FFF;
color: rgb(61, 61, 61); color: rgb(61, 61, 61);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
@@ -562,10 +639,9 @@ li {
.container { .container {
background: white; background: white;
padding: 30px; padding: 10px;
margin-top: 50px; margin-top: 30px;
border-radius: 12px; border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
width: 90%; width: 90%;
max-width: 650px; max-width: 650px;
} }
+1 -1
View File
@@ -253,7 +253,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
.function(args.document.module, { .function(args.document.module, {
inputTranscriptPath: transcriptpath, inputTranscriptPath: transcriptpath,
documentTypePath: "./storage/documentType/" + templateFile, documentTypePath: "./storage/documentType/" + templateFile,
language: args.document.outputLanguage language: "en",
}) })
.then((resp) => { .then((resp) => {
console.log(resp); console.log(resp);
-10
View File
@@ -1,8 +1,6 @@
// const fs = require('fs'); // const fs = require('fs');
// const path = require('path'); // const path = require('path');
const e = require("express");
const outputDir = path.join(__dirname, "../../../storage/documents"); // path for output directory const outputDir = path.join(__dirname, "../../../storage/documents"); // path for output directory
if (!fs.existsSync(outputDir)) { if (!fs.existsSync(outputDir)) {
@@ -42,14 +40,6 @@ const module_exports = {
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
return new Promise(async(resolve, reject) => { return new Promise(async(resolve, reject) => {
try { try {
if (language.toLowerCase() === "de") {
language = "German"
}else if (language.toLowerCase() === "in") {
language = "Indish"
} else {
language = "English"
}
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
-8
View File
@@ -40,14 +40,6 @@ const module_exports = {
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
return new Promise(async(resolve, reject) => { return new Promise(async(resolve, reject) => {
try { try {
if (language.toLowerCase() === "de") {
language = "German"
}else if (language.toLowerCase() === "in") {
language = "Indish"
} else {
language = "English"
}
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed
-8
View File
@@ -40,14 +40,6 @@ const module_exports = {
createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English createDocumentFromTranscript: async function(transcriptPath, documentTypePath, language = "en") { // default language is English
return new Promise(async(resolve, reject) => { return new Promise(async(resolve, reject) => {
try { try {
if (language.toLowerCase() === "de") {
language = "German"
}else if (language.toLowerCase() === "in") {
language = "Indish"
} else {
language = "English"
}
const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path const transcript = await fs.promises.readFile(transcriptPath, "utf-8"); //read transcript file from Path
const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path const documentType = await fs.promises.readFile(documentTypePath, "utf-8"); //read document type from Path
const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed const promptText = `${documentType}, in language ${language}, transcript:\n\n${transcript}`; //combine doc type, language and transcript - Change prompt here if needed