From 47cd940871f863238d79b765bf64c6224b545037 Mon Sep 17 00:00:00 2001 From: fenn-cs Date: Mon, 27 Nov 2023 23:30:00 +0100 Subject: Fix date filter wording & improve search feedback - Show loading when actually loading, instead of no content - Change modified label to `Date` as it applies to a bunch of things. Signed-off-by: fenn-cs Signed-off-by: nextcloud-command --- core/src/views/GlobalSearchModal.vue | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'core/src') diff --git a/core/src/views/GlobalSearchModal.vue b/core/src/views/GlobalSearchModal.vue index cfed7543e0d..e764800cfc2 100644 --- a/core/src/views/GlobalSearchModal.vue +++ b/core/src/views/GlobalSearchModal.vue @@ -30,26 +30,26 @@ {{ t('core', provider.name) }} - + - + {{ t('core', 'Today') }} - + {{ t('core', 'Last 7 days') }} - + {{ t('core', 'Last 30 days') }} - + {{ t('core', 'This year') }} - + {{ t('core', 'Last year') }} - + {{ t('core', 'Custom date range') }} @@ -136,7 +136,6 @@ import CustomDateRangeModal from '../components/GlobalSearch/CustomDateRangeModa import DotsHorizontalIcon from 'vue-material-design-icons/DotsHorizontal.vue' import FilterIcon from 'vue-material-design-icons/Filter.vue' import FilterChip from '../components/GlobalSearch/SearchFilterChip.vue' -import FlaskEmpty from 'vue-material-design-icons/FlaskEmpty.vue' import ListBox from 'vue-material-design-icons/ListBox.vue' import NcActions from '@nextcloud/vue/dist/Components/NcActions.js' import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' @@ -163,7 +162,6 @@ export default { DotsHorizontalIcon, FilterIcon, FilterChip, - FlaskEmpty, ListBox, NcActions, NcActionButton, @@ -193,6 +191,7 @@ export default { dateFilterIsApplied: false, personFilterIsApplied: false, filteredProviders: [], + searching: false, searchQuery: '', placesFilter: '', dateTimeFilter: null, @@ -218,8 +217,8 @@ export default { return { show: isEmptySearch || hasNoResults, - text: isEmptySearch ? t('core', 'Start typing in search') : t('core', 'No matching results'), - icon: isEmptySearch ? MagnifyIcon : FlaskEmpty, + text: this.searching && hasNoResults ? t('core', 'Searching …') : (isEmptySearch ? t('core', 'Start typing in search') : t('core', 'No matching results')), + icon: MagnifyIcon, } }, }, @@ -250,8 +249,10 @@ export default { }, methods: { find(query) { + this.searching = true if (query.length === 0) { this.results = [] + this.searching = false return } // Event should probably be refactored at some point to used nextcloud:global-search.search @@ -302,6 +303,7 @@ export default { console.debug('Global search results:', this.results) this.updateResults(newResults) + this.searching = false }) } providersToSearch.forEach(provider => { @@ -601,7 +603,7 @@ div.v-popper__wrapper { align-items: center !important; img { - width: 24px; + width: 20px; margin: 0 4px; filter: var(--background-invert-if-bright); } -- cgit v1.2.3