update things

This commit is contained in:
quoije
2025-01-26 23:27:10 -05:00
parent 7dcdd1b6fb
commit 6e96fd2609
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -84,7 +84,7 @@
<table class="table table-hover movie-table"> <table class="table table-hover movie-table">
<thead> <thead>
<tr> <tr>
<th scope="col">Regardé</th> <th scope="col">Vu</th>
<th scope="col">Titre</th> <th scope="col">Titre</th>
<th scope="col">Date du visionnage</th> <th scope="col">Date du visionnage</th>
</tr> </tr>
@@ -149,7 +149,7 @@
const totalMoviesCount = movies.length; const totalMoviesCount = movies.length;
const watchedMoviesCount = watchedMovies.length; const watchedMoviesCount = watchedMovies.length;
document.getElementById('watched-ratio').innerText = `Regardé: ${watchedMoviesCount} / ${totalMoviesCount} (${((watchedMoviesCount / totalMoviesCount) * 100).toFixed(1)}%)`; document.getElementById('watched-ratio').innerText = `Vu: ${watchedMoviesCount} / ${totalMoviesCount} (${((watchedMoviesCount / totalMoviesCount) * 100).toFixed(1)}%)`;
function updateProgressBar(watchedCount, totalCount) { function updateProgressBar(watchedCount, totalCount) {
const progressBar = document.getElementById('progress-bar'); const progressBar = document.getElementById('progress-bar');
@@ -217,7 +217,7 @@
if (updatedWatchedMoviesRes.ok) { if (updatedWatchedMoviesRes.ok) {
const updatedWatchedMovies = await updatedWatchedMoviesRes.json(); const updatedWatchedMovies = await updatedWatchedMoviesRes.json();
const updatedWatchedCount = updatedWatchedMovies.length; const updatedWatchedCount = updatedWatchedMovies.length;
document.getElementById('watched-ratio').innerText = `Regardé: ${updatedWatchedCount} / ${totalMoviesCount} (${((updatedWatchedCount / totalMoviesCount) * 100).toFixed(1)}%)`; document.getElementById('watched-ratio').innerText = `Vu: ${updatedWatchedCount} / ${totalMoviesCount} (${((updatedWatchedCount / totalMoviesCount) * 100).toFixed(1)}%)`;
updateProgressBar(updatedWatchedCount, totalMoviesCount); updateProgressBar(updatedWatchedCount, totalMoviesCount);
} }
}); });
+3 -3
View File
@@ -27,7 +27,7 @@
font-weight: bold; font-weight: bold;
position: absolute; position: absolute;
top: 10px; top: 10px;
right: 10px; width: 100%;
z-index: 1; z-index: 1;
} }
@@ -162,7 +162,7 @@
const moviesList = document.getElementById('movies-list'); const moviesList = document.getElementById('movies-list');
const totalMoviesCount = movies.length; const totalMoviesCount = movies.length;
const watchedMoviesCount = watchedMovies.length; const watchedMoviesCount = watchedMovies.length;
const ratioText = `Regardé: ${watchedMoviesCount} / ${totalMoviesCount} (${((watchedMoviesCount / totalMoviesCount) * 100).toFixed(1)}%)`; const ratioText = `Vu: ${watchedMoviesCount} / ${totalMoviesCount} (${((watchedMoviesCount / totalMoviesCount) * 100).toFixed(1)}%)`;
document.getElementById('watched-ratio').innerText = ratioText; document.getElementById('watched-ratio').innerText = ratioText;
movies.forEach(movie => { movies.forEach(movie => {
@@ -175,7 +175,7 @@
movieDiv.setAttribute('data-imdb-id', movie.imdb_id); movieDiv.setAttribute('data-imdb-id', movie.imdb_id);
movieDiv.innerHTML = ` movieDiv.innerHTML = `
<div class="card"> <div class="card">
${isChecked ? '<div class="watched-banner">REGARDÉ</div>' : ''} ${isChecked ? '<div class="watched-banner">VISIONNÉ</div>' : ''}
<a href="${movie.vod_link}"><img src="${movie.poster}" class="card-img-top" alt="${movie.title}" style="width: 75%; display: block; margin: 0 auto; padding: 10px;"></a> <a href="${movie.vod_link}"><img src="${movie.poster}" class="card-img-top" alt="${movie.title}" style="width: 75%; display: block; margin: 0 auto; padding: 10px;"></a>
<div class="card-body"> <div class="card-body">
<h5 class="card-title d-flex justify-content-between align-items-center"> <h5 class="card-title d-flex justify-content-between align-items-center">