Update top shows progress label on mobile

This commit is contained in:
HighImKevin
2026-10-17 18:31:53 -04:00
parent 9c4428c744
commit fa323e3cc1
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -720,11 +720,13 @@
const rankClass = rank <= 3 ? ` rank-${rank}` : '';
const episodesText = show.episodesWatched === 1 ? 'episode' : 'episodes';
const timeLabel = formatHours(show.watchedRuntimeTicks || 0);
const progressLabel = window.innerWidth >= 900 ? `${timeLabel} · ${show.episodesWatched} of ${show.totalEpisodes} ${episodesText} (${show.percentage}%)` : `${timeLabel}`;
return `
<div class="top-show-item${rankClass}">
<div class="show-rank">${rank}</div>
<div class="top-show-name" title="${escapeHtml(show.name)}">${escapeHtml(show.name)}</div>
<div class="top-show-episodes">${timeLabel} · ${show.episodesWatched} of ${show.totalEpisodes} ${episodesText} (${show.percentage}%)</div>
<div class="top-show-episodes">${progressLabel}</div>
</div>
`;
}).join('');
+2 -1
View File
@@ -2898,12 +2898,13 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
const rankClass = rank <= 3 ? ` rank-${rank}` : '';
const episodesText = show.episodesWatched === 1 ? 'episode' : 'episodes';
const timeLabel = formatWatchedRuntimeLabel(show.watchedRuntimeTicks);
const progressLabel = window.innerWidth >= 900 ? `${timeLabel} · ${show.episodesWatched} of ${show.totalEpisodes} ${episodesText} (${show.percentage}%)` : `${timeLabel}`;
return `
<div class="top-show-item${rankClass}">
<div class="show-rank">${rank}</div>
<div class="top-show-name" title="${escapeHtmlWatchlist(show.name)}">${escapeHtmlWatchlist(show.name)}</div>
<div class="top-show-episodes">${timeLabel} · ${show.episodesWatched} of ${show.totalEpisodes} ${episodesText} (${show.percentage}%)</div>
<div class="top-show-episodes">${progressLabel}</div>
</div>
`;
}).join('');