Merge pull request #28682 from nextcloud/NMC-464

NMC-464 Highlight the search term on no results
This commit is contained in:
szaimen 2021-09-01 13:25:37 +02:00 committed by GitHub
commit 1a4e4b87aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 85 additions and 82 deletions

File diff suppressed because one or more lines are too long

10
core/js/dist/login.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

28
core/js/dist/main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -76,7 +76,7 @@
<SearchResultPlaceholders v-if="isLoading" />
<EmptyContent v-else-if="isValidQuery" icon="icon-search">
{{ t('core', 'No results for {query}', {query}) }}
<Highlight :text="t('core', 'No results for {query}', { query })" :search="query" />
</EmptyContent>
<EmptyContent v-else-if="!isLoading || isShortQuery" icon="icon-search">
@ -126,10 +126,12 @@
import { emit } from '@nextcloud/event-bus'
import { minSearchLength, getTypes, search, defaultLimit, regexFilterIn, regexFilterNot } from '../services/UnifiedSearchService'
import { showError } from '@nextcloud/dialogs'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import Actions from '@nextcloud/vue/dist/Components/Actions'
import debounce from 'debounce'
import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent'
import Highlight from '@nextcloud/vue/dist/Components/Highlight'
import Magnify from 'vue-material-design-icons/Magnify'
import HeaderMenu from '../components/HeaderMenu'
@ -148,6 +150,7 @@ export default {
Actions,
EmptyContent,
HeaderMenu,
Highlight,
Magnify,
SearchResult,
SearchResultPlaceholders,