feat: add option --allow-search (#62)

This commit is contained in:
sigoden
2022-06-21 07:23:20 +08:00
committed by GitHub
parent 069cb64889
commit 4058a2db72
8 changed files with 37 additions and 9 deletions

View File

@@ -339,10 +339,14 @@ function ready() {
$uploadersTable = document.querySelector(".uploaders-table");
$emptyFolder = document.querySelector(".empty-folder");
if (params.q) {
document.getElementById('search').value = params.q;
if (DATA.allow_search) {
document.querySelector(".searchbar").classList.remove("hidden");
if (params.q) {
document.getElementById('search').value = params.q;
}
}
addBreadcrumb(DATA.href, DATA.uri_prefix);
if (Array.isArray(DATA.paths)) {
const len = DATA.paths.length;