surface a clear message when copying the restic password fails

This commit is contained in:
Jarek Krochmalski committed 2026-09-06 17:04:18 +05:30
1 parent 84c959910a
commit 2b7958cb25
1 file changed
+8 -4
@@ -393,10 +393,14 @@
setTimeout(() => { generatedOk = false; }, 1500);
}
function copyPassword() {
copyToClipboard(formPassword);
copiedOk = true;
setTimeout(() => { copiedOk = false; }, 1500);
async function copyPassword() {
const ok = await copyToClipboard(formPassword);
if (ok) {
copiedOk = true;
setTimeout(() => { copiedOk = false; }, 1500);
} else {
toast.error('Could not copy to clipboard. Copy it manually, or use HTTPS to enable one-click copy.');
}
}
function handleBackendChange(value: string) {