diff --git a/CHANGELOG.md b/CHANGELOG.md index bdfc34f..1be19c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/js/domUtils.js b/js/domUtils.js index 0490cb4..9522fe0 100644 --- a/js/domUtils.js +++ b/js/domUtils.js @@ -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 `
@@ -99,7 +104,7 @@ export function buildSearchAndPaginationControls({ currentPage, totalPages, sear search
- +
diff --git a/js/i18n.js b/js/i18n.js index 2c5910c..0d2281c 100644 --- a/js/i18n.js +++ b/js/i18n.js @@ -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",