diff --git a/views/admin/ApiKeysView.php b/views/admin/ApiKeysView.php index e1aecc1..f67f4d0 100644 --- a/views/admin/ApiKeysView.php +++ b/views/admin/ApiKeysView.php @@ -175,8 +175,9 @@ document.getElementById('generateKeyForm').addEventListener('submit', function ( function copyApiKey() { var val = document.getElementById('newKeyValue').value; - lt.copy(val).then(function () { - lt.toast.success('Copied to clipboard!'); + lt.clipboard.copy(val).then(function (ok) { + if (ok) lt.toast.success('Copied to clipboard!'); + else lt.toast.error('Copy failed — select the key manually'); }).catch(function () { lt.toast.error('Copy failed — select the key manually'); });