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