Statistics page redesign (#60)
* feat: Add modal to display watched movies with details Co-authored-by: mathieumoran1 <[email protected]> * Refactor movie modal: remove search, improve category display Co-authored-by: mathieumoran1 <[email protected]> * Refactor movie category display to use details element Co-authored-by: mathieumoran1 <[email protected]> * Refactor movie playback and add clickability to stats Co-authored-by: mathieumoran1 <[email protected]> * Refactor: Improve movie linking and player logic Co-authored-by: mathieumoran1 <[email protected]> * Prevent caching of sensitive and dynamic API data Co-authored-by: mathieumoran1 <[email protected]> * feat: Prevent caching of sensitive admin data Co-authored-by: mathieumoran1 <[email protected]> * feat: Add no-cache headers to API requests Co-authored-by: mathieumoran1 <[email protected]> * Remove unused movie sorting functionality The movie sorting dropdown and its associated logic were removed as they are no longer needed. Co-authored-by: mathieumoran1 <[email protected]> * Refactor admin settings to use tabs instead of accordion Co-authored-by: mathieumoran1 <[email protected]> * Refactor: Adjust button layout for active year selection Co-authored-by: mathieumoran1 <[email protected]> * Refactor active year selection UI Co-authored-by: mathieumoran1 <[email protected]> * Refactor: Improve admin settings layout for better responsiveness Co-authored-by: mathieumoran1 <[email protected]> * Remove redundant completion explanation from user-stat.html Co-authored-by: mathieumoran1 <[email protected]> * Refactor user stats page to display year in ranking tab badge Co-authored-by: mathieumoran1 <[email protected]> * Refactor: Rename 'Finisseur(s)' column to 'Nombre' Co-authored-by: mathieumoran1 <[email protected]> * Refactor: Remove redundant completer count column Co-authored-by: mathieumoran1 <[email protected]> --------- Co-authored-by: Cursor Agent <[email protected]>
This commit was merged in pull request #60.
This commit is contained in:
co-authored by
Cursor Agent
parent
82f9462dda
commit
79b9f4a5a3
@@ -159,7 +159,7 @@ window.addEventListener('DOMContentLoaded', async function () {
|
||||
|
||||
async function fetchCompletionModalContent() {
|
||||
try {
|
||||
const res = await fetch('/api/settings/completion-modal', { method: 'GET' });
|
||||
const res = await fetch('/api/settings/completion-modal', { method: 'GET', cache: 'no-cache' });
|
||||
if (!res.ok) throw new Error('Failed to fetch completion modal');
|
||||
const data = await res.json();
|
||||
return {
|
||||
@@ -217,7 +217,7 @@ window.addEventListener('DOMContentLoaded', async function () {
|
||||
|
||||
async function fetchActiveYear() {
|
||||
try {
|
||||
const res = await fetch('/api/settings/year', { method: 'GET' });
|
||||
const res = await fetch('/api/settings/year', { method: 'GET', cache: 'no-cache' });
|
||||
if (!res.ok) throw new Error('Failed to fetch active year');
|
||||
const data = await res.json();
|
||||
const year = Number(data?.year);
|
||||
@@ -229,7 +229,7 @@ window.addEventListener('DOMContentLoaded', async function () {
|
||||
|
||||
async function fetchOscarEffectiveDate(year) {
|
||||
try {
|
||||
const res = await fetch(`/api/settings/oscar-date?year=${encodeURIComponent(String(year))}`, { method: 'GET' });
|
||||
const res = await fetch(`/api/settings/oscar-date?year=${encodeURIComponent(String(year))}`, { method: 'GET', cache: 'no-cache' });
|
||||
if (!res.ok) throw new Error('Failed to fetch oscar date');
|
||||
const data = await res.json();
|
||||
const effectiveDate = typeof data?.effectiveDate === 'string' ? data.effectiveDate : null;
|
||||
@@ -247,7 +247,8 @@ window.addEventListener('DOMContentLoaded', async function () {
|
||||
async function fetchMoviesSummary(year) {
|
||||
const res = await fetch(`/api/movies/summary?year=${encodeURIComponent(String(year))}`, {
|
||||
method: 'GET',
|
||||
headers: { 'Authorization': `Bearer ${token}` }
|
||||
headers: { 'Authorization': `Bearer ${token}` },
|
||||
cache: 'no-cache',
|
||||
});
|
||||
if (!res.ok) throw new Error('Failed to fetch movies summary');
|
||||
return await res.json();
|
||||
@@ -346,7 +347,8 @@ window.addEventListener('DOMContentLoaded', async function () {
|
||||
fetchCompletionModalContent(),
|
||||
fetch(`/api/movies?year=${encodeURIComponent(String(activeYear))}&view=checklist`, {
|
||||
method: 'GET',
|
||||
headers: { 'Authorization': `Bearer ${token}` }
|
||||
headers: { 'Authorization': `Bearer ${token}` },
|
||||
cache: 'no-cache',
|
||||
})
|
||||
]);
|
||||
|
||||
@@ -498,7 +500,8 @@ window.addEventListener('DOMContentLoaded', async function () {
|
||||
|
||||
const updatedWatchedMoviesRes = await fetch('/api/movies/watchedMovies', {
|
||||
method: 'GET',
|
||||
headers: { 'Authorization': `Bearer ${token}` }
|
||||
headers: { 'Authorization': `Bearer ${token}` },
|
||||
cache: 'no-cache',
|
||||
});
|
||||
|
||||
if (updatedWatchedMoviesRes.ok) {
|
||||
|
||||
Reference in New Issue
Block a user