diff --git a/changelog/unreleased/enhancement-search-tag-filter b/changelog/unreleased/enhancement-search-tag-filter new file mode 100644 index 00000000000..c254cabaedd --- /dev/null +++ b/changelog/unreleased/enhancement-search-tag-filter @@ -0,0 +1,6 @@ +Enhancement: Search tag filter + +The search result page now has a tag filter which can be used to filter the displayed search result by tags. + +https://github.com/owncloud/web/pull/9044 +https://github.com/owncloud/web/issues/9054 diff --git a/packages/web-app-files/src/components/FilesList/ResourceTable.vue b/packages/web-app-files/src/components/FilesList/ResourceTable.vue index 530b06a683a..72174602f8a 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTable.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTable.vue @@ -632,9 +632,10 @@ export default defineComponent({ shouldDisplayThumbnails(item) { return this.areThumbnailsDisplayed && !isResourceTxtFileAlmostEmpty(item) }, - getTagLink(tag) { + getTagLink(tag: string) { + const currentTerm = unref(this.$router.currentRoute).query?.term return createLocationCommon('files-common-search', { - query: { term: `Tags:"${tag}"`, provider: 'files.sdk' } + query: { provider: 'files.sdk', q_tags: tag, ...(currentTerm && { term: currentTerm }) } }) }, getTagComponentAttrs(tag) { diff --git a/packages/web-app-files/src/components/Search/List.vue b/packages/web-app-files/src/components/Search/List.vue index c31c0ba814c..ab545f33654 100644 --- a/packages/web-app-files/src/components/Search/List.vue +++ b/packages/web-app-files/src/components/Search/List.vue @@ -2,6 +2,28 @@
+
+ + + + +