From f4ac135246eaba051f833b462be9b363e5a3339b Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 10 Nov 2020 17:45:12 +0100 Subject: [PATCH] fix showing search results --- lib/Search/SearchProvider.php | 4 ++-- src/components/Navigation.vue | 8 +++++++- src/router.js | 8 ++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/Search/SearchProvider.php b/lib/Search/SearchProvider.php index 82fe405..436a1c3 100644 --- a/lib/Search/SearchProvider.php +++ b/lib/Search/SearchProvider.php @@ -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); diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 2f07ff5..66829cf 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -25,7 +25,11 @@ v-if="isSearch" :to="{ name: 'SEARCH' }" icon="icon-search" - :title="t('radio', 'Search')" /> + :title="t('radio', 'Search')"> + + 99+ + +