🔨 Disable "Backup Now" button if a task is already running

This commit is contained in:
Sebastien Clement 2020-01-05 21:02:30 +01:00
parent c74a069ba1
commit a2c93646a6

View File

@ -396,18 +396,23 @@
switch (data.status) {
case "error":
printStatus('Error', data.message);
$('#btn-backup-now').removeClass("disabled");
break;
case "idle":
printStatus('Idle', "Waiting for next backup.");
$('#btn-backup-now').removeClass("disabled");
break;
case "download":
printStatusWithBar('Downloading Snapshot', data.progress);
$('#btn-backup-now').addClass("disabled");
break;
case "upload":
printStatusWithBar('Uploading Snapshot', data.progress);
$('#btn-backup-now').addClass("disabled");
break;
case "creating":
printStatusWithBar('Creating Snapshot', data.progress);
$('#btn-backup-now').addClass("disabled");
break;
}
if (data.last_backup != null) {