mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
fix playing tracks from search page
This commit is contained in:
committed by
Mungai Njoroge
parent
6adf5df4c6
commit
ffecfac8c7
@@ -77,12 +77,13 @@ function getSource() {
|
||||
name: Routes.search,
|
||||
params: {
|
||||
query: source.query,
|
||||
page: "tracks",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
default:
|
||||
return { name: "👻 Ghost source", location: {} };
|
||||
return { name: "👻 No source", location: {} };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
class="ellip"
|
||||
:style="{
|
||||
fontSize: small ? '0.85rem' : smaller ? 'small' : '',
|
||||
padding: '0 .25rem'
|
||||
}"
|
||||
>
|
||||
<div v-if="artists === null || artists.length === 0">
|
||||
|
||||
@@ -80,7 +80,7 @@ const routes = [
|
||||
{
|
||||
path: "/search/:page",
|
||||
name: "SearchView",
|
||||
component: () => import("@/views/SearchView/main.vue"),
|
||||
component: () => import("@/views/SearchView"),
|
||||
},
|
||||
{
|
||||
path: "/queue",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import SearchView from "./main.vue";
|
||||
|
||||
export default SearchView;
|
||||
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<div class="search-tracks-view">
|
||||
<div class="no-scroll">
|
||||
<Layout :no_header="true" :tracks="search.tracks.value" />
|
||||
<Layout
|
||||
:no_header="true"
|
||||
:tracks="search.tracks.value"
|
||||
@playFromPage="playFromSearch"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -9,8 +13,15 @@
|
||||
<script setup lang="ts">
|
||||
import Layout from "@/layouts/HeaderAndVList.vue";
|
||||
import useSearchStore from "@/stores/search";
|
||||
import useQueueStore from "@/stores/queue";
|
||||
|
||||
const search = useSearchStore();
|
||||
const queue = useQueueStore();
|
||||
|
||||
function playFromSearch(index: number) {
|
||||
queue.playFromSearch(search.query, search.tracks.value);
|
||||
queue.play(index);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user