mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
feature: sum search results added, Enter closes the preview search field, language file EN, DE adjusted
This commit is contained in:
parent
e03d209c45
commit
9fe882b39b
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="search-results">
|
||||
<div class="search-results">{{$t('search.results', { searchCount:searchCount, search:search })}}</div>
|
||||
<tab-navigation :tabs="tabOptions" :activeTab="activeTab" @switchTab="switchTab" />
|
||||
<section
|
||||
:class="['results', activeTab === 'User' && '--user', !activeResourceCount > 0 && '--empty']"
|
||||
@ -100,6 +101,7 @@ export default {
|
||||
postsOffset: 0,
|
||||
usersOffset: 0,
|
||||
hashtagsOffset: 0,
|
||||
searchCount: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -202,6 +204,7 @@ export default {
|
||||
this.posts = searchPosts.posts
|
||||
this.postCount = searchPosts.postCount
|
||||
if (this.postCount > 0) this.activeTab = 'Post'
|
||||
this.searchCount = ( this.postCount + this.userCount + this.hashtagCount )
|
||||
},
|
||||
fetchPolicy: 'cache-and-network',
|
||||
},
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
@keyup.esc.native="clear"
|
||||
@blur.capture.native="onBlur"
|
||||
@input.exact="onSelect"
|
||||
|
||||
>
|
||||
<template #option="{ option }">
|
||||
<search-heading v-if="isFirstOfType(option)" :resource-type="option.__typename" />
|
||||
@ -112,6 +113,7 @@ export default {
|
||||
path: '/search/search-results',
|
||||
query: { search: this.unprocessedSearchInput },
|
||||
})
|
||||
this.$emit('clearSearch')
|
||||
},
|
||||
onDelete(event) {
|
||||
clearTimeout(this.searchProcess)
|
||||
|
||||
@ -595,6 +595,7 @@
|
||||
"User": "Benutzer"
|
||||
},
|
||||
"hint": "Wonach suchst Du?",
|
||||
"results": " \"{searchCount}\" Ergebnisse für \"{search}\" gefunden ",
|
||||
"no-results": "Keine Ergebnisse für \"{search}\" gefunden. Versuch' es mit einem anderen Begriff!",
|
||||
"placeholder": "Suchen"
|
||||
},
|
||||
|
||||
@ -595,6 +595,7 @@
|
||||
"User": "Users"
|
||||
},
|
||||
"hint": "What are you searching for?",
|
||||
"results": " \"{searchCount}\" Results found for \"{search}\" ",
|
||||
"no-results": "No results found for \"{search}\". Try a different search term!",
|
||||
"placeholder": "Search"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user