Fix COPY button on API Keys page

lt.copy() does not exist — the correct API is lt.clipboard.copy().
Also added ok-check since clipboardCopy() returns a boolean promise,
not a rejection on failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-12 00:03:37 -04:00
parent 3b0b7621e0
commit f42ee8070f
+3 -2
View File
@@ -175,8 +175,9 @@ document.getElementById('generateKeyForm').addEventListener('submit', function (
function copyApiKey() { function copyApiKey() {
var val = document.getElementById('newKeyValue').value; var val = document.getElementById('newKeyValue').value;
lt.copy(val).then(function () { lt.clipboard.copy(val).then(function (ok) {
lt.toast.success('Copied to clipboard!'); if (ok) lt.toast.success('Copied to clipboard!');
else lt.toast.error('Copy failed — select the key manually');
}).catch(function () { }).catch(function () {
lt.toast.error('Copy failed — select the key manually'); lt.toast.error('Copy failed — select the key manually');
}); });