mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
use virtual scroll page layout in album page
This commit is contained in:
committed by
Mungai Njoroge
parent
703ea71514
commit
74ea700d93
@@ -50,7 +50,7 @@ const source = computed(() => queue.tracklist);
|
||||
// import { focusElem } from "@/utils";
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<!-- <style lang="scss">
|
||||
.queue-view {
|
||||
}
|
||||
</style>
|
||||
</style> -->
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
<template>
|
||||
<Page>
|
||||
<Layout :tracks="album.tracks" @playFromPage="playFromAlbum">
|
||||
<template #header>
|
||||
<Header :album="album.info" :bio="album.bio" />
|
||||
</template>
|
||||
<template #content>
|
||||
<Content :discs="album.discs" :copyright="album.info.copyright" />
|
||||
</template>
|
||||
</Page>
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -18,10 +15,11 @@ import {
|
||||
} from "vue-router";
|
||||
|
||||
import Header from "./Header.vue";
|
||||
import Content from "./Content.vue";
|
||||
import Page from "@/layouts/HeaderContentBottom.vue";
|
||||
import Layout from "@/layouts/HeaderAndVList.vue";
|
||||
import useQueueStore from "@/stores/queue";
|
||||
|
||||
const album = useAStore();
|
||||
const queue = useQueueStore();
|
||||
|
||||
onBeforeRouteUpdate(async (to: RouteLocationNormalized) => {
|
||||
await album
|
||||
@@ -34,4 +32,10 @@ onBeforeRouteLeave(() => {
|
||||
album.resetQuery();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
function playFromAlbum(index: number) {
|
||||
const { title, artist, hash } = album.info;
|
||||
queue.playFromAlbum(title, artist, hash, album.allTracks);
|
||||
queue.play(index);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user