mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
[web] Fix the search page source when clicking the search menu
This commit is contained in:
@@ -77,6 +77,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as types from '@/store/mutation_types'
|
||||
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
||||
import { GroupedList } from '@/lib/GroupedList'
|
||||
import ListAlbums from '@/components/ListAlbums.vue'
|
||||
@@ -146,6 +147,7 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$store.commit(types.SEARCH_SOURCE, this.$route.name)
|
||||
this.search(this.$route)
|
||||
},
|
||||
|
||||
@@ -155,7 +157,6 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$router.push({
|
||||
name: 'search-library',
|
||||
query: {
|
||||
limit: 3,
|
||||
offset: 0,
|
||||
@@ -171,7 +172,6 @@ export default {
|
||||
},
|
||||
open_search(type) {
|
||||
this.$router.push({
|
||||
name: 'search-library',
|
||||
query: { query: this.$route.query.query, type }
|
||||
})
|
||||
},
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as types from '@/store/mutation_types'
|
||||
import ContentWithHeading from '@/templates/ContentWithHeading.vue'
|
||||
import ListAlbumsSpotify from '@/components/ListAlbumsSpotify.vue'
|
||||
import ListArtistsSpotify from '@/components/ListArtistsSpotify.vue'
|
||||
@@ -134,6 +135,7 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$store.commit(types.SEARCH_SOURCE, this.$route.name)
|
||||
this.query = this.$route.query
|
||||
this.search()
|
||||
},
|
||||
@@ -144,12 +146,11 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$router.push({
|
||||
name: 'search-spotify',
|
||||
query: {
|
||||
limit: 3,
|
||||
offset: 0,
|
||||
query: this.search_query,
|
||||
type: 'track,artist,album,playlist,audiobook,podcast'
|
||||
type: this.search_types.join()
|
||||
}
|
||||
})
|
||||
this.$refs.search_field.blur()
|
||||
@@ -160,7 +161,6 @@ export default {
|
||||
},
|
||||
open_search(type) {
|
||||
this.$router.push({
|
||||
name: 'search-spotify',
|
||||
query: { query: this.$route.query.query, type }
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user