Change search box text when enabling advanced search.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
- Moved Gallery view toggle button into header.
|
||||
- Removed css entries that are not needed anymore for Gallery View Toggle.
|
||||
- Change search box text when enabling advanced search.
|
||||
|
||||
### Advanced Search Implementation
|
||||
|
||||
|
||||
@@ -90,6 +90,11 @@ export function showToast(message, duration = 3000) {
|
||||
|
||||
export function buildSearchAndPaginationControls({ currentPage, totalPages, searchTerm }) {
|
||||
const safeSearchTerm = escapeHTML(searchTerm);
|
||||
// Choose the placeholder text based on advanced search mode
|
||||
const placeholderText = window.advancedSearchEnabled
|
||||
? t("search_placeholder_advanced")
|
||||
: t("search_placeholder");
|
||||
|
||||
return `
|
||||
<div class="row align-items-center mb-3">
|
||||
<div class="col-12 col-md-8 mb-2 mb-md-0">
|
||||
@@ -99,7 +104,7 @@ export function buildSearchAndPaginationControls({ currentPage, totalPages, sear
|
||||
<i class="material-icons">search</i>
|
||||
</span>
|
||||
</div>
|
||||
<input type="text" id="searchInput" class="form-control" placeholder="${t("search_placeholder")}" value="${safeSearchTerm}" aria-describedby="searchIcon">
|
||||
<input type="text" id="searchInput" class="form-control" placeholder="${placeholderText}" value="${safeSearchTerm}" aria-describedby="searchIcon">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-left">
|
||||
|
||||
@@ -5,7 +5,8 @@ const translations = {
|
||||
"no_files_selected": "No files selected.",
|
||||
"confirm_delete_files": "Are you sure you want to delete {count} selected file(s)?",
|
||||
"element_not_found": "Element with id \"{id}\" not found.",
|
||||
"search_placeholder": "Search files, tags, or uploader...",
|
||||
"search_placeholder": "Search files, tags, & uploader...",
|
||||
"search_placeholder_advanced": "Advanced Search: files, tags, uploader & content...",
|
||||
"file_name": "File Name",
|
||||
"date_modified": "Date Modified",
|
||||
"upload_date": "Upload Date",
|
||||
|
||||
Reference in New Issue
Block a user