fix(admin): pre-compute pagination in Java, remove arithmetic from Qute template
Deploy to Production / deploy (push) Successful in 3m12s
Deploy to Production / deploy (push) Successful in 3m12s
Qute cannot evaluate + and * as arithmetic operators at runtime even with requireTypeSafeExpressions=false — it tries to look them up as map keys. Pre-compute hasPrev/hasNext/displayPage/prevPage/nextPage in the resource. Co-Authored-By: Mira Rehfeld <noreply@anthropic.com>
This commit is contained in:
@@ -103,12 +103,12 @@ tr:hover td { background: #161b22; }
|
||||
</table>
|
||||
|
||||
<div class="pagination">
|
||||
{#if page > 0}
|
||||
<a class="page-link" href="/sandboxes?page={page - 1}&size={size}&tier={tier}">← Previous</a>
|
||||
{#if hasPrev}
|
||||
<a class="page-link" href="/sandboxes?page={prevPage}&size={size}&tier={tier}">← Previous</a>
|
||||
{/if}
|
||||
<span class="page-info">Page {page + 1} · {result.sandboxes.size} of {result.total}</span>
|
||||
{#if (page + 1) * size < result.total}
|
||||
<a class="page-link" href="/sandboxes?page={page + 1}&size={size}&tier={tier}">Next →</a>
|
||||
<span class="page-info">Page {displayPage} · {result.sandboxes.size} of {result.total}</span>
|
||||
{#if hasNext}
|
||||
<a class="page-link" href="/sandboxes?page={nextPage}&size={size}&tier={tier}">Next →</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user