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+
+
+
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: {
diff --git a/src/router.js b/src/router.js
index f55923d..76e5268 100644
--- a/src/router.js
+++ b/src/router.js
@@ -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