mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
fix scrollbars being hidden when sidebar is disabled on firefox
+ rename components, to follow vue style guides
This commit is contained in:
committed by
Mungai Njoroge
parent
62b9aa7a3e
commit
6fb9c0fc4a
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<Layout :tracks="playlist.tracks" @playFromPage="playFromPlaylistPage">
|
||||
<template #header>
|
||||
<Header :info="playlist.info" />
|
||||
</template>
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onBeforeRouteLeave } from "vue-router";
|
||||
|
||||
import useQueueStore from "@/stores/queue";
|
||||
import usePlaylistStore from "@/stores/pages/playlist";
|
||||
|
||||
import Layout from "@/layouts/HeaderAndVList.vue";
|
||||
import Header from "@/components/PlaylistView/Header.vue";
|
||||
|
||||
const queue = useQueueStore();
|
||||
const playlist = usePlaylistStore();
|
||||
|
||||
function playFromPlaylistPage(index: number) {
|
||||
const { name, playlistid } = playlist.info;
|
||||
queue.playFromPlaylist(name, playlistid, playlist.allTracks);
|
||||
queue.play(index);
|
||||
}
|
||||
|
||||
onBeforeRouteLeave(() => {
|
||||
setTimeout(() => {
|
||||
playlist.resetQuery();
|
||||
}, 500);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user