diff --git a/services/jupyterhub/templates_enhanced/admin.html b/services/jupyterhub/templates_enhanced/admin.html index bbde9d7..a7a8297 100644 --- a/services/jupyterhub/templates_enhanced/admin.html +++ b/services/jupyterhub/templates_enhanced/admin.html @@ -37,6 +37,7 @@ Username Password + @@ -223,7 +224,22 @@ row.innerHTML = ` ${escapeHtml(cred.username)} ${escapeHtml(cred.password)} + `; + // Add click handler for row copy + row.querySelector('.copy-row-btn').addEventListener('click', function() { + const text = 'Username: ' + cred.username + '\nPassword: ' + cred.password; + navigator.clipboard.writeText(text).then(() => { + this.classList.remove('fa-copy'); + this.classList.add('fa-check'); + this.style.opacity = '1'; + setTimeout(() => { + this.classList.remove('fa-check'); + this.classList.add('fa-copy'); + this.style.opacity = '0.4'; + }, 1500); + }); + }); tbody.appendChild(row); });