mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 09:12:58 +01:00
✏️ Hide auto-clean settings if disabled
This commit is contained in:
parent
f4e62a4a14
commit
61ddd73a8c
@ -6,9 +6,8 @@ const logger = winston.createLogger({
|
||||
winston.format.timestamp({
|
||||
format: "YYYY-MM-DD HH:mm:ss",
|
||||
}),
|
||||
// winston.format.errors({ stack: true }),
|
||||
winston.format.errors({ stack: true }),
|
||||
// winston.format.splat(),
|
||||
|
||||
winston.format.colorize(),
|
||||
winston.format.align(),
|
||||
winston.format.printf(({ level, message, timestamp }) => {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -183,6 +183,21 @@ function listeners() {
|
||||
$('#trigger-backup-settings').click(getBackupSettings);
|
||||
$('#cron-drop-settings').change(updateDropVisibility);
|
||||
$('#save-backup-settings').click(sendBackupSettings);
|
||||
$('#auto_clean_local').change(function () {
|
||||
if (!$(this).is(':checked')) {
|
||||
$('#local-snap-keep').parent().parent().addClass("d-none");
|
||||
} else {
|
||||
$('#local-snap-keep').parent().parent().removeClass("d-none");
|
||||
}
|
||||
});
|
||||
$('#auto_clean_backup').change(function () {
|
||||
if (!$(this).is(':checked')) {
|
||||
$('#backup-snap-keep').parent().parent().addClass("d-none");
|
||||
} else {
|
||||
$('#backup-snap-keep').parent().parent().removeClass("d-none");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#trigger-nextcloud-settings').click(getNextcloudSettings);
|
||||
$('#save-nextcloud-settings').click(sendNextcloudSettings);
|
||||
@ -347,9 +362,19 @@ function getBackupSettings() {
|
||||
|
||||
|
||||
$('#auto_clean_local').prop('checked', data.settings.auto_clean_local === "true");
|
||||
$('#local-snap-keep').val(data.settings.auto_clean_local_keep);
|
||||
let local_snap_keep = $('#local-snap-keep');
|
||||
if (data.settings.auto_clean_local === "true")
|
||||
local_snap_keep.parent().parent().removeClass("d-none");
|
||||
else
|
||||
local_snap_keep.parent().parent().addClass("d-none");
|
||||
local_snap_keep.val(data.settings.auto_clean_local_keep);
|
||||
$('#auto_clean_backup').prop('checked', data.settings.auto_clean_backup === "true");
|
||||
$('#backup-snap-keep').val(data.settings.auto_clean_backup_keep);
|
||||
let backup_snap_keep = $('#backup-snap-keep');
|
||||
if (data.settings.auto_clean_backup === "true")
|
||||
backup_snap_keep.parent().parent().removeClass("d-none");
|
||||
else
|
||||
backup_snap_keep.parent().parent().addClass("d-none");
|
||||
backup_snap_keep.val(data.settings.auto_clean_backup_keep);
|
||||
|
||||
$('#cron-drop-day').val(data.settings.cron_weekday);
|
||||
let folder_html = ""
|
||||
|
@ -96,7 +96,7 @@
|
||||
<h4>Auto Clean Settings</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="row my-3">
|
||||
<div class="col-12 col-md-5 offset-md-1">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
Loading…
Reference in New Issue
Block a user