mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-12-23 22:46:44 +01:00
🚑 Fix nextcloud modal not showing if conf is empty
This commit is contained in:
parent
84c3027d97
commit
18657e37ce
@ -278,8 +278,16 @@ function getNextcloudSettings() {
|
||||
$('#username').val(data.username);
|
||||
$('#password').val(data.password);
|
||||
$('#back-dir').val(data.back_dir);
|
||||
loadingModal.hide();
|
||||
nextcloud_setting_modal.show();
|
||||
}).fail((error) => {
|
||||
if (error.status === 404)
|
||||
nextcloud_setting_modal.show();
|
||||
else {
|
||||
console.log(error);
|
||||
create_toast("error", "Fail to fetch Nextcloud config !", default_toast_timeout);
|
||||
}
|
||||
}).always(() => {
|
||||
loadingModal.hide();
|
||||
});
|
||||
}
|
||||
|
||||
@ -358,10 +366,14 @@ function getBackupSettings() {
|
||||
}
|
||||
$("#addons-div").html(addons_html);
|
||||
updateDropVisibility();
|
||||
loadingModal.hide();
|
||||
backup_setting_modal.show();
|
||||
|
||||
|
||||
}).fail((error) => {
|
||||
console.log(error);
|
||||
create_toast("error", "Fail to fetch Nextcloud config !", default_toast_timeout);
|
||||
}).always(() => {
|
||||
loadingModal.hide();
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -55,7 +55,7 @@
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<label for="back-dir" class="form-label">Backup Directory</label>
|
||||
<input id="back-dir" type="text" class="form-control" aria-describedby="dir-help">
|
||||
<input id="back-dir" type="text" class="form-control" aria-describedby="dir-help" placeholder="/Hassio Backup/">
|
||||
<div id="dir-help" class="form-text">Default: /Hassio Backup/</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user