diff --git a/web-src/src/components/TabsSearch.vue b/web-src/src/components/TabsSearch.vue index 6b580588..5f6a9744 100644 --- a/web-src/src/components/TabsSearch.vue +++ b/web-src/src/components/TabsSearch.vue @@ -5,18 +5,18 @@
@@ -29,10 +29,46 @@ export default { name: 'TabsSearch', + props: ['query'], + computed: { spotify_enabled () { return this.$store.state.spotify.webapi_token_valid } + }, + + methods: { + search_library: function () { + if (!this.query) { + return + } + + this.$router.push({ + path: '/search/library', + query: { + type: 'track,artist,album,playlist,audiobook,podcast', + query: this.query, + limit: 3, + offset: 0 + } + }) + }, + + search_spotify: function () { + if (!this.query) { + return + } + + this.$router.push({ + path: '/search/spotify', + query: { + type: 'track,artist,album,playlist,audiobook,podcast', + query: this.query, + limit: 3, + offset: 0 + } + }) + } } } diff --git a/web-src/src/pages/PageSearch.vue b/web-src/src/pages/PageSearch.vue index dd52e80e..c4d86215 100644 --- a/web-src/src/pages/PageSearch.vue +++ b/web-src/src/pages/PageSearch.vue @@ -26,7 +26,7 @@ -