1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Changes after review

This commit is contained in:
h3llrais3r 2023-01-11 17:08:35 +01:00 committed by Bill Thornton
parent c74717cd6d
commit fb244080de
2 changed files with 7 additions and 5 deletions

View file

@ -81,13 +81,14 @@ export function getQueryPagingHtml (options) {
const limit = options.limit;
const totalRecordCount = options.totalRecordCount;
let html = '';
const recordsEnd = Math.min(startIndex + limit, totalRecordCount);
const showControls = limit < totalRecordCount;
const recordsStart = totalRecordCount ? startIndex + 1 : 0;
const recordsEnd = limit ? Math.min(startIndex + limit, totalRecordCount) : totalRecordCount;
const showControls = limit > 0 && limit < totalRecordCount;
html += '<div class="listPaging">';
html += '<span style="vertical-align:middle;">';
html += globalize.translate('ListPaging', totalRecordCount ? startIndex + 1 : 0, recordsEnd || totalRecordCount, totalRecordCount);
html += globalize.translate('ListPaging', recordsStart, recordsEnd, totalRecordCount);
html += '</span>';
if (showControls || options.viewButton || options.filterButton || options.sortButton || options.addLayoutButton) {