fix(admin): relax Qute type-safety for arithmetic in list.html, fix JS template literals
Deploy to Production / deploy (push) Successful in 3m14s

requireTypeSafeExpressions=false allows {page+1} and (page+1)*size
in pagination conditions. JS template literals with ${days} replaced
with string concatenation to avoid Qute consuming the {days} token.

Co-Authored-By: Mira Rehfeld <noreply@anthropic.com>
This commit is contained in:
Carsten Rehfeld
2026-05-16 21:30:29 +02:00
parent 82a379e536
commit ad19c8f20f
2 changed files with 2 additions and 2 deletions
@@ -26,7 +26,7 @@ public class SandboxListResource {
@ConfigProperty(name = "apix.admin.key")
String adminKey;
@CheckedTemplate
@CheckedTemplate(requireTypeSafeExpressions = false)
static class Templates {
static native TemplateInstance list(AdminSandboxListResponse result, int page, int size, String tier);
static native TemplateInstance error(String message);
@@ -117,7 +117,7 @@ document.querySelectorAll('[data-expires]').forEach(td => {
const d = new Date(td.dataset.expires);
const now = new Date();
const days = Math.round((d - now) / 86400000);
td.textContent = days < 0 ? `expired ${-days}d ago` : `in ${days}d`;
td.textContent = days < 0 ? ('expired ' + (-days) + 'd ago') : ('in ' + days + 'd');
});
</script>
</body>