mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
feat: add option --allow-search (#62)
This commit is contained in:
@@ -10,7 +10,7 @@ body {
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.head {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<input type="file" id="file" name="file" multiple>
|
||||
</div>
|
||||
</div>
|
||||
<form class="searchbar">
|
||||
<form class="searchbar hidden">
|
||||
<div class="icon">
|
||||
<svg width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>
|
||||
</div>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user