diff --git a/llm-gateway/internal/dashboard/templates/partials/tokens.html b/llm-gateway/internal/dashboard/templates/partials/tokens.html index 9324c2a..974f5e4 100644 --- a/llm-gateway/internal/dashboard/templates/partials/tokens.html +++ b/llm-gateway/internal/dashboard/templates/partials/tokens.html @@ -119,13 +119,13 @@ document.getElementById('modal-create-token').addEventListener('click', function if (e.target === this) closeModal(); }); -// After token creation: show key, close modal, refresh token list +// After token creation: show key, close modal, refresh token table only document.body.addEventListener('tokenCreated', function() { closeModal(); document.getElementById('new-token-display').style.display = 'block'; - // Refresh the token list after a short delay + // Refresh only the token table body, preserving the new-token-display setTimeout(function() { - htmx.ajax('GET', '/tokens', {target: '#content', swap: 'innerHTML'}); + htmx.ajax('GET', '/tokens', {target: '#tokens-tbody', select: '#tokens-tbody', swap: 'outerHTML'}); }, 100); });