This commit is contained in:
arussac
2025-02-12 07:55:47 +01:00
parent 3b694ff751
commit b46d60a685
3 changed files with 19 additions and 21 deletions

View File

@@ -33,16 +33,16 @@
<option value="1280x720">1280x720</option> <option value="1280x720">1280x720</option>
</select> </select>
<br><br> <br><br>
<label for="duration">Durée (en minutes) :</label> <label for="duration">Durée (en secondes) :</label>
<div class="duration-input"> <div class="duration-input">
<button type="button" id="decrement-button">-</button> <button type="button" id="decrement-button">-</button>
<input type="number" id="duration" name="duration" value="0" min="0" required> <input type="number" id="duration" name="duration" value="0" min="0" required>
<button type="button" id="increment-button">+</button> <button type="button" id="increment-button">+</button>
</div> </div>
<label for="choice">Choose Option:</label> <label for="choice">Options :</label>
<select id="choice" name="choice"> <select id="choice" name="choice">
<option value="firstLast">First and Last</option> <option value="firstLast">première et dernière image</option>
<option value="oneByOne">One by One</option> <option value="oneByOne">sélectionner les images une par une</option>
</select> </select>
<br><br> <br><br>
<div id="first-last-container" style="display: block;"> <div id="first-last-container" style="display: block;">
@@ -114,9 +114,6 @@
See all images See all images
</button> </button>
</th> </th>
<th><button class="btn btn-primary">
sort images
</button></th>
<th><button class="btn btn-primary"> <th><button class="btn btn-primary">
export images export images
</button></th> </button></th>
@@ -130,7 +127,7 @@
</div> </div>
<footer> <footer>
<p>&copy; 2024 Timelapse. All rights reserved.</p> <p>&copy; 2025 Timelapse. All rights reserved.</p>
</footer> </footer>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

View File

@@ -31,7 +31,7 @@
</div> </div>
<footer class="text-center mt-5 py-3"> <footer class="text-center mt-5 py-3">
<p>&copy; 2024 Timelapse. All rights reserved.</p> <p>&copy; 2025 Timelapse. All rights reserved.</p>
</footer> </footer>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

View File

@@ -110,17 +110,18 @@ document.addEventListener("DOMContentLoaded", async () => {
const nameVideo = document.getElementById('name').value; const nameVideo = document.getElementById('name').value;
const videoDuration = durationInput.value; const videoDuration = durationInput.value;
if (videoDuration > 0) { if (videoDuration <= 0) {
if (checkVideoPath(data, nameVideo)) {
alert('Nouvelle vidéo enregistrée :\nNom : ' + nameVideo +
'\nRésolution : ' + document.getElementById('resolution').value +
'\nDurée : ' + videoDuration + ' secondes');
} else {
alert('Le nom : "' + nameVideo + '" est déjà pris ! \n' +
'veuillez en trouver un autre');
}
} else {
alert('La durée de la vidéo doit être supérieur à 0'); alert('La durée de la vidéo doit être supérieur à 0');
return 0;
}
if (checkVideoPath(data, nameVideo) && nameVideo.length>0) {
alert('Nouvelle vidéo enregistrée :\nNom : ' + nameVideo +
'\nRésolution : ' + document.getElementById('resolution').value +
'\nDurée : ' + videoDuration + ' secondes');
} else {
alert('Le nom : " ' + nameVideo + ' " est déjà pris ou vide ! \n' +
'veuillez en trouver un autre');
return 0;
} }
} }
@@ -256,5 +257,5 @@ async function generateViewMetric(projectId) {
}, },
}, },
}, },
}); })
} }