fix showing search results
This commit is contained in:
parent
c15932c590
commit
f4ac135246
@ -64,12 +64,12 @@ class SearchProvider implements IProvider {
|
||||
$body = $response->getBody();
|
||||
$parsed = json_decode($body, true);
|
||||
|
||||
$result = array_map(function (array $result) {
|
||||
$result = array_map(function (array $result) use ($term) {
|
||||
return new SearchResultEntry(
|
||||
$result['favicon'],
|
||||
$result['name'],
|
||||
str_replace(",",", ",$result['tags']),
|
||||
'#/search/virus',
|
||||
$this->url->linkToRouteAbsolute('radio.page.index') . 'search/'.$term.'#/search/'.$term,
|
||||
'icon-radio'
|
||||
);
|
||||
}, $parsed);
|
||||
|
@ -25,7 +25,11 @@
|
||||
v-if="isSearch"
|
||||
:to="{ name: 'SEARCH' }"
|
||||
icon="icon-search"
|
||||
:title="t('radio', 'Search')" />
|
||||
:title="t('radio', 'Search')">
|
||||
<AppNavigationCounter slot="counter" :highlighted="true">
|
||||
99+
|
||||
</AppNavigationCounter>
|
||||
</AppNavigationItem>
|
||||
</template>
|
||||
<template #footer>
|
||||
<Player
|
||||
@ -37,6 +41,7 @@
|
||||
<script>
|
||||
import AppNavigation from '@nextcloud/vue/dist/Components/AppNavigation'
|
||||
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
|
||||
import AppNavigationCounter from '@nextcloud/vue/dist/Components/AppNavigationCounter'
|
||||
import Player from './Player'
|
||||
|
||||
export default {
|
||||
@ -44,6 +49,7 @@ export default {
|
||||
components: {
|
||||
AppNavigation,
|
||||
AppNavigationItem,
|
||||
AppNavigationCounter,
|
||||
Player,
|
||||
},
|
||||
computed: {
|
||||
|
@ -47,6 +47,13 @@ const router = new Router({
|
||||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
||||
if (to.hash) {
|
||||
const hashPath = to.hash.substr(1)
|
||||
next(hashPath)
|
||||
return
|
||||
}
|
||||
|
||||
if (to.name) {
|
||||
store.dispatch('setMenuState', to.name)
|
||||
next()
|
||||
@ -60,6 +67,7 @@ router.beforeEach((to, from, next) => {
|
||||
next({ name: value })
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
export default router
|
||||
|
Loading…
Reference in New Issue
Block a user