feat: Allow deletion of music files to be disabled in the config file. Implement #202.

This commit is contained in:
Terry Geng
2020-10-24 22:13:20 +08:00
parent a1e37629a5
commit 312599e8b3
4 changed files with 29 additions and 14 deletions

View File

@ -528,6 +528,14 @@ function displayLibraryControls(data){
$("#upload").hide();
}
if (data.delete_allowed) {
$("#deleteAllowed").val("true");
$(".library-delete").show();
} else {
$("#uploadDisabled").val("false");
$(".library-delete").hide();
}
let select = $("#filter-dir");
let dataList = $("#upload-target-dirs");
select.find("option").remove();