surface a clear message when copying the restic password fails
This commit is contained in:
1 file changed
+8
-4
@@ -393,10 +393,14 @@
|
|||||||
setTimeout(() => { generatedOk = false; }, 1500);
|
setTimeout(() => { generatedOk = false; }, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyPassword() {
|
async function copyPassword() {
|
||||||
copyToClipboard(formPassword);
|
const ok = await copyToClipboard(formPassword);
|
||||||
copiedOk = true;
|
if (ok) {
|
||||||
setTimeout(() => { copiedOk = false; }, 1500);
|
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) {
|
function handleBackendChange(value: string) {
|
||||||
|
|||||||
Reference in new issue
Block a user