aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorfenn-cs <fenn25.fn@gmail.com>2023-11-10 16:51:03 +0100
committerfenn-cs <fenn25.fn@gmail.com>2023-11-14 20:26:58 +0100
commit5a4cc8c98aa66896a882d5a0254d95f3feb7e4d6 (patch)
treec0947352696c90d8d6b29e393bb9e269aebb34e2 /core
parent5c041122e847c02c60cb6bca480038a2a50f3331 (diff)
downloadnextcloud-server-5a4cc8c98aa66896a882d5a0254d95f3feb7e4d6.tar.gz
nextcloud-server-5a4cc8c98aa66896a882d5a0254d95f3feb7e4d6.zip
Global search : Fix basic functional issues
- Fixes remove person filter/chip when applied - Close person searchable filter via workaround - Person filter has no effect fixed, now uses user property instead of id - Left align filters - Reduce avatar size in user chip and make photo non-clickable Resolves : https://github.com/nextcloud/server/issues/41381 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/src/components/GlobalSearch/SearchFilterChip.vue4
-rw-r--r--core/src/components/GlobalSearch/SearchableList.vue2
-rw-r--r--core/src/views/GlobalSearchModal.vue35
3 files changed, 24 insertions, 17 deletions
diff --git a/core/src/components/GlobalSearch/SearchFilterChip.vue b/core/src/components/GlobalSearch/SearchFilterChip.vue
index c58f1f079a4..08e0dedfe14 100644
--- a/core/src/components/GlobalSearch/SearchFilterChip.vue
+++ b/core/src/components/GlobalSearch/SearchFilterChip.vue
@@ -52,6 +52,7 @@ export default {
width: 20px;
padding: 2px;
border-radius: 20px;
+ filter: var(--background-invert-if-bright);
}
}
@@ -63,8 +64,7 @@ export default {
cursor: pointer;
:hover {
- border-radius: 4px;
- padding: 1px;
+ filter: invert(20%);
}
}
}
diff --git a/core/src/components/GlobalSearch/SearchableList.vue b/core/src/components/GlobalSearch/SearchableList.vue
index fa4576af60e..98c4c2675d4 100644
--- a/core/src/components/GlobalSearch/SearchableList.vue
+++ b/core/src/components/GlobalSearch/SearchableList.vue
@@ -25,7 +25,7 @@
@show="opened = true"
@hide="opened = false">
<template #trigger>
- <slot name="trigger" />
+ <slot ref="popoverTrigger" name="trigger" />
</template>
<div class="searchable-list__wrapper">
<NcTextField :value.sync="searchTerm"
diff --git a/core/src/views/GlobalSearchModal.vue b/core/src/views/GlobalSearchModal.vue
index e150d1cc3cb..74382f6fa7d 100644
--- a/core/src/views/GlobalSearchModal.vue
+++ b/core/src/views/GlobalSearchModal.vue
@@ -75,6 +75,8 @@
<template #icon>
<NcAvatar v-if="filter.type === 'person'"
:user="filter.user"
+ :size="24"
+ :disable-menu="true"
:show-user-status="false"
:hide-favorite="false" />
<CalendarRangeIcon v-else-if="filter.type === 'date'" />
@@ -82,7 +84,7 @@
</template>
</FilterChip>
</div>
- <div v-if="searchQuery.length === 0">
+ <div v-if="searchQuery.length === 0" class="global-search-modal__no-search">
<NcEmptyContent :name="t('core', 'Start typing in search')">
<template #icon>
<MagnifyIcon />
@@ -257,7 +259,7 @@ export default {
if (filters.personFilterIsApplied) {
if (provider.filters.person) {
- params.person = this.personFilter.id
+ params.person = this.personFilter.user
} else {
// Person filter is applied but provider does not support it, no need to search provider
return
@@ -378,7 +380,7 @@ export default {
this.providerActionMenuIsOpen = false
const existingFilter = this.filteredProviders.find(existing => existing.id === providerFilter.id)
if (!existingFilter) {
- this.filteredProviders.push({ id: providerFilter.id, name: providerFilter.name, icon: providerFilter.icon, type: 'provider' })
+ this.filteredProviders.push({ id: providerFilter.id, name: providerFilter.name, icon: providerFilter.icon, type: 'provider', filters: providerFilter.filters })
}
this.filters = this.syncProviderFilters(this.filters, this.filteredProviders)
console.debug('Search filters (newly added)', this.filters)
@@ -397,9 +399,13 @@ export default {
} else {
for (let i = 0; i < this.filters.length; i++) {
- if (this.filters[i].id === 'date') {
+ // Remove date and person filter
+ if (this.filters[i].id === 'date' || this.filters[i].id === filter.id) {
this.dateFilterIsApplied = false
this.filters.splice(i, 1)
+ if (filter.type === 'person') {
+ this.personFilterIsApplied = false
+ }
break
}
}
@@ -520,27 +526,28 @@ $margin: 10px;
&__filters {
display: flex;
- padding-top: 5px;
- justify-content: space-between;
-
- >*:not(:last-child) {
- // flex: 1;
- margin-right: 0.5m;
- }
+ padding-top: 4px;
+ justify-content: left;
>* {
- button {
- min-width: 160px;
- }
+ margin-right: 4px;
+
}
}
&__filters-applied {
+ padding-top: 4px;
display: flex;
flex-wrap: wrap;
}
+ &__no-search {
+ display: flex;
+ align-items: center;
+ height: 100%;
+ }
+
&__results {
padding: 10px;