mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-05 10:48:09 -05:00
Search page: remember whether library or spotify is selected
This commit is contained in:
parent
a5dd6c4968
commit
f484f1194b
@ -5,7 +5,7 @@
|
||||
<div class="column is-four-fifths">
|
||||
<div class="tabs is-centered is-small is-toggle is-toggle-rounded">
|
||||
<ul>
|
||||
<li :class="{ 'is-active': $route.path === '/search/library' }">
|
||||
<li :class="{ 'is-active': $store.state.search_path === '/search/library' }">
|
||||
<a @click="search_library">
|
||||
<span class="icon is-small"
|
||||
><i class="mdi mdi-library-books"
|
||||
@ -13,7 +13,7 @@
|
||||
<span class="">Library</span>
|
||||
</a>
|
||||
</li>
|
||||
<li :class="{ 'is-active': $route.path === '/search/spotify' }">
|
||||
<li :class="{ 'is-active': $store.state.search_path === '/search/spotify' }">
|
||||
<a @click="search_spotify">
|
||||
<span class="icon is-small"
|
||||
><i class="mdi mdi-spotify"
|
||||
@ -56,15 +56,17 @@ export default {
|
||||
|
||||
methods: {
|
||||
search_library: function () {
|
||||
this.$store.state.search_path = '/search/library'
|
||||
this.$router.push({
|
||||
path: '/search/library',
|
||||
path: this.$store.state.search_path,
|
||||
query: this.route_query
|
||||
})
|
||||
},
|
||||
|
||||
search_spotify: function () {
|
||||
this.$store.state.search_path = '/search/spotify'
|
||||
this.$router.push({
|
||||
path: '/search/spotify',
|
||||
path: this.$store.state.search_path,
|
||||
query: this.route_query
|
||||
})
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ export default {
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
path: '/search/library',
|
||||
path: this.$store.state.search_path,
|
||||
query: {
|
||||
type: 'track,artist,album,playlist,audiobook,podcast,composer',
|
||||
query: this.search_query,
|
||||
|
@ -49,6 +49,8 @@ export default createStore({
|
||||
next_id: 1,
|
||||
list: []
|
||||
},
|
||||
|
||||
search_path: '/search/library',
|
||||
recent_searches: [],
|
||||
|
||||
hide_singles: false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user