mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 03:16:22 -05:00
Only files that have been tagged will be returned when new 'Any' tag button is used to filter file search results.
This commit is contained in:
parent
f3439c2bd5
commit
53d2402d32
31 changed files with 303 additions and 146 deletions
|
|
@ -627,8 +627,8 @@ export async function deleteDownload(downloadId) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function filesSearch(offset, limit, searchStr, mimetypes, model, tagNames, headline, months, fromYear, toYear) {
|
||||
const body = {search_str: searchStr, offset: parseInt(offset), limit: parseInt(limit)};
|
||||
export async function filesSearch(offset, limit, searchStr, mimetypes, model, tagNames, headline, months, fromYear, toYear, anyTag) {
|
||||
const body = {search_str: searchStr, offset: parseInt(offset), limit: parseInt(limit), any_tag: anyTag};
|
||||
if (mimetypes) {
|
||||
body['mimetypes'] = mimetypes;
|
||||
}
|
||||
|
|
@ -1183,10 +1183,10 @@ export async function searchSuggestions(search_str) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function searchEstimateFiles(search_str, tagNames, mimetypes, months, dateRange) {
|
||||
export async function searchEstimateFiles(search_str, tagNames, mimetypes, months, dateRange, anyTag) {
|
||||
months = months ? months.map(i => parseInt(i)) : [];
|
||||
|
||||
const body = {search_str, tag_names: tagNames, mimetypes, months};
|
||||
const body = {search_str, tag_names: tagNames, mimetypes, months, any_tag: anyTag};
|
||||
if (dateRange) {
|
||||
body['from_year'] = dateRange[0];
|
||||
body['to_year'] = dateRange[1];
|
||||
|
|
@ -1198,6 +1198,8 @@ export async function searchEstimateFiles(search_str, tagNames, mimetypes, month
|
|||
return {
|
||||
fileGroups: content.file_groups,
|
||||
}
|
||||
} else {
|
||||
console.error('Failed to get file search estimates!');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue