mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-08-18 21:54:56 +02:00
🔨 Disable "Backup Now" button if a task is already running
This commit is contained in:
parent
c74a069ba1
commit
a2c93646a6
@ -396,18 +396,23 @@
|
|||||||
switch (data.status) {
|
switch (data.status) {
|
||||||
case "error":
|
case "error":
|
||||||
printStatus('Error', data.message);
|
printStatus('Error', data.message);
|
||||||
|
$('#btn-backup-now').removeClass("disabled");
|
||||||
break;
|
break;
|
||||||
case "idle":
|
case "idle":
|
||||||
printStatus('Idle', "Waiting for next backup.");
|
printStatus('Idle', "Waiting for next backup.");
|
||||||
|
$('#btn-backup-now').removeClass("disabled");
|
||||||
break;
|
break;
|
||||||
case "download":
|
case "download":
|
||||||
printStatusWithBar('Downloading Snapshot', data.progress);
|
printStatusWithBar('Downloading Snapshot', data.progress);
|
||||||
|
$('#btn-backup-now').addClass("disabled");
|
||||||
break;
|
break;
|
||||||
case "upload":
|
case "upload":
|
||||||
printStatusWithBar('Uploading Snapshot', data.progress);
|
printStatusWithBar('Uploading Snapshot', data.progress);
|
||||||
|
$('#btn-backup-now').addClass("disabled");
|
||||||
break;
|
break;
|
||||||
case "creating":
|
case "creating":
|
||||||
printStatusWithBar('Creating Snapshot', data.progress);
|
printStatusWithBar('Creating Snapshot', data.progress);
|
||||||
|
$('#btn-backup-now').addClass("disabled");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (data.last_backup != null) {
|
if (data.last_backup != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user