diff --git a/appinfo/routes.php b/appinfo/routes.php
index 79bc45b..dcb9be0 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -68,10 +68,9 @@ return [
],
[
'name' => 'page#index',
- 'url' => '/search/{query}',
+ 'url' => '/search',
'verb' => 'GET',
'postfix' => 'search',
- 'requirements' => ['query' => '.+'],
],
// Settings
diff --git a/css/icons.scss b/css/icons.scss
index a8bf497..743e80a 100644
--- a/css/icons.scss
+++ b/css/icons.scss
@@ -23,3 +23,4 @@
@include icon-black-white('recent', 'radio', 1);
@include icon-black-white('radio', 'radio', 1);
+@include icon-black-white('radio-trans', 'radio', 1);
diff --git a/lib/Search/SearchProvider.php b/lib/Search/SearchProvider.php
index 06feb70..149d849 100644
--- a/lib/Search/SearchProvider.php
+++ b/lib/Search/SearchProvider.php
@@ -69,8 +69,8 @@ class SearchProvider implements IProvider {
$result['favicon'],
$result['name'],
str_replace(",",", ",$result['tags']),
- $this->url->linkToRouteAbsolute('radio.page.index') . 'search/'.$term.'#/search/'.$term,
- 'icon-radio'
+ $this->url->linkToRouteAbsolute('radio.page.index') . 'search#'.$term,
+ 'icon-radio-trans'
);
}, $parsed);
diff --git a/src/components/Main.vue b/src/components/Main.vue
index d723f3f..0120d8a 100644
--- a/src/components/Main.vue
+++ b/src/components/Main.vue
@@ -1,6 +1,7 @@
-
+
@@ -192,7 +193,7 @@ export default {
let queryURI = queryBase
if (menuState === 'SEARCH') {
- const searchQuery = vm.$route.params.query
+ const searchQuery = vm.$route.hash.substr(1)
queryURI = queryBase + '/byname/' + searchQuery
} else if (menuState === 'FAVORITES') {
queryURI = generateUrl('/apps/radio/api/favorites')
diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue
index 66829cf..71f2e85 100644
--- a/src/components/Navigation.vue
+++ b/src/components/Navigation.vue
@@ -26,8 +26,10 @@
:to="{ name: 'SEARCH' }"
icon="icon-search"
:title="t('radio', 'Search')">
-
- 99+
+
+ {{ stationData.length }}
@@ -52,6 +54,12 @@ export default {
AppNavigationCounter,
Player,
},
+ props: {
+ stationData: {
+ type: Array,
+ default() { return [] },
+ },
+ },
computed: {
isSearch() {
return this.$route.name === 'SEARCH'
@@ -59,3 +67,9 @@ export default {
},
}
+
+
diff --git a/src/router.js b/src/router.js
index 76e5268..d597b6d 100644
--- a/src/router.js
+++ b/src/router.js
@@ -39,7 +39,7 @@ const router = new Router({
name: 'CATEGORIES',
},
{
- path: '/search/:query',
+ path: '/search',
component: Main,
name: 'SEARCH',
},
@@ -48,12 +48,6 @@ 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()