mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 07:42:47 +01:00
Update top shows progress label on mobile
This commit is contained in:
@@ -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('');
|
||||
|
||||
@@ -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('');
|
||||
|
||||
Reference in New Issue
Block a user