diff --git a/src/scripts/list.js b/src/scripts/list.js index 8e41c44..fd6dd40 100644 --- a/src/scripts/list.js +++ b/src/scripts/list.js @@ -294,13 +294,12 @@ function createListItem(item) { } const statusLabels = { - 'CURRENT': entryType === 'ANIME' ? 'Watching' : 'Reading', - 'WATCHING': entryType === 'ANIME' ? 'Watching' : 'Reading', 'COMPLETED': 'Completed', 'PLANNING': 'Planning', 'PAUSED': 'Paused', - 'DROPPED': 'Dropped' + 'DROPPED': 'Dropped', + 'REPEATING': entryType === 'ANIME' ? 'Rewatching' : 'Rereading' }; const extraInfo = []; diff --git a/src/scripts/utils/list-modal-manager.js b/src/scripts/utils/list-modal-manager.js index 6742115..be33a4a 100644 --- a/src/scripts/utils/list-modal-manager.js +++ b/src/scripts/utils/list-modal-manager.js @@ -5,7 +5,7 @@ const ListModalManager = { currentEntry: null, STATUS_MAP: { - WATCHING: 'CURRENT', + CURRENT: 'CURRENT', COMPLETED: 'COMPLETED', PLANNING: 'PLANNING', PAUSED: 'PAUSED', @@ -15,17 +15,7 @@ const ListModalManager = { getEntryType(data) { if (!data) return 'ANIME'; - - if (data.format) { - const format = data.format.toUpperCase(); - if (['MANGA', 'ONE_SHOT', 'MANHWA'].includes(format)) { - return 'MANGA'; - } - if (['NOVEL', 'LIGHT_NOVEL'].includes(format)) { - return 'NOVEL'; - } - } - + if (data.entry_type) return data.entry_type.toUpperCase(); return 'ANIME'; }, @@ -118,6 +108,15 @@ const ListModalManager = { deleteBtn.style.display = 'none'; } + const statusSelect = document.getElementById('entry-status'); + + [...statusSelect.options].forEach(opt => { + if (opt.value === 'CURRENT') { + opt.textContent = entryType === 'ANIME' ? 'Watching' : 'Reading'; + } + }); + + if (progressLabel) { if (entryType === 'ANIME') { progressLabel.textContent = 'Episodes Watched'; @@ -128,13 +127,6 @@ const ListModalManager = { } } - const statusSelect = document.getElementById('entry-status'); - [...statusSelect.options].forEach(opt => { - if (opt.value === 'WATCHING') { - opt.textContent = entryType === 'ANIME' ? 'Watching' : 'Reading'; - } - }); - document.getElementById('entry-progress').max = totalUnits; document.getElementById('add-list-modal').classList.add('active'); }, diff --git a/views/anime/anime.html b/views/anime/anime.html index 742c4e7..4d61863 100644 --- a/views/anime/anime.html +++ b/views/anime/anime.html @@ -47,9 +47,10 @@ diff --git a/views/anime/animes.html b/views/anime/animes.html index 907248c..0a0d16d 100644 --- a/views/anime/animes.html +++ b/views/anime/animes.html @@ -134,11 +134,12 @@