From 3324b10307c00609bdf2aa5a39ead2cf5770a5af Mon Sep 17 00:00:00 2001 From: nfebe Date: Thu, 30 Jan 2025 09:29:15 +0100 Subject: [PATCH] fix: Use `searchFrom` property for client side plugins The client-side plugin `in-folder` uses the `files` provider, this makes it overlap with the main files provider itself. This change follows eecda06f1ad2832cc2a7b31d646458f730c8412a after it was discovered that some apps/providers like `dav` use providers from another app like `contacts` Signed-off-by: nfebe Signed-off-by: nextcloud-command --- apps/files/src/plugins/search/folderSearch.ts | 2 ++ .../UnifiedSearch/UnifiedSearchModal.vue | 21 +++++++++++-------- .../store/unified-search-external-filters.js | 4 ++-- core/src/unified-search.ts | 5 +++-- dist/core-unified-search.js | 4 ++-- dist/core-unified-search.js.map | 2 +- dist/files-search.js | 4 ++-- dist/files-search.js.map | 2 +- 8 files changed, 25 insertions(+), 19 deletions(-) diff --git a/apps/files/src/plugins/search/folderSearch.ts b/apps/files/src/plugins/search/folderSearch.ts index 33dae31995c..626b1daa72b 100644 --- a/apps/files/src/plugins/search/folderSearch.ts +++ b/apps/files/src/plugins/search/folderSearch.ts @@ -23,6 +23,7 @@ function init() { OCA.UnifiedSearch.registerFilterAction({ id: 'in-folder', appId: 'files', + searchFrom: 'files', label: t('files', 'In folder'), icon: imagePath('files', 'app.svg'), callback: (showFilePicker: boolean = true) => { @@ -38,6 +39,7 @@ function init() { emit('nextcloud:unified-search:add-filter', { id: 'in-folder', appId: 'files', + searchFrom: 'files', payload: folder, filterUpdateText: t('files', 'Search in folder: {folder}', { folder: folder.basename }), filterParams: { path: folder.path }, diff --git a/core/src/components/UnifiedSearch/UnifiedSearchModal.vue b/core/src/components/UnifiedSearch/UnifiedSearchModal.vue index bfb7bd03484..08c3657ce78 100644 --- a/core/src/components/UnifiedSearch/UnifiedSearchModal.vue +++ b/core/src/components/UnifiedSearch/UnifiedSearchModal.vue @@ -121,7 +121,7 @@

- {{ providerResult.provider }} + {{ providerResult.name }}