mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
fix removing tracks from queue
This commit is contained in:
committed by
Mungai Njoroge
parent
bb66ba70b3
commit
a496d68439
@@ -34,13 +34,13 @@ import { computed } from "@vue/reactivity";
|
||||
import { onBeforeRouteLeave, onBeforeRouteUpdate } from "vue-router";
|
||||
|
||||
import { Track } from "@/interfaces";
|
||||
import useQueueStore from "@/stores/queue";
|
||||
import { isMedium, isSmall } from "@/stores/content-width";
|
||||
import useLoaderStore from "@/stores/loader";
|
||||
import useFolderStore from "@/stores/pages/folder";
|
||||
import { isSmall, isMedium } from "@/stores/content-width";
|
||||
import useQueueStore from "@/stores/queue";
|
||||
|
||||
import SongItem from "@/components/shared/SongItem.vue";
|
||||
import FolderList from "@/components/FolderView/FolderList.vue";
|
||||
import SongItem from "@/components/shared/SongItem.vue";
|
||||
|
||||
const loader = useLoaderStore();
|
||||
const folder = useFolderStore();
|
||||
@@ -62,9 +62,9 @@ class songItem {
|
||||
this.props = {
|
||||
track,
|
||||
index: track.index + 1,
|
||||
isCurrent: queue.currenttrack?.hash === track.hash,
|
||||
isCurrent: queue.currentid === track.trackid,
|
||||
isCurrentPlaying:
|
||||
queue.currenttrack?.hash === track.hash && queue.playing,
|
||||
queue.currentid === track.trackid && queue.playing,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ const queue = useQueueStore();
|
||||
const playlist = usePlaylistStore();
|
||||
|
||||
interface ScrollerItem {
|
||||
id: string;
|
||||
id: string | number;
|
||||
component: typeof Header | typeof SongItem;
|
||||
props: Record<string, unknown>;
|
||||
size: number;
|
||||
@@ -56,7 +56,7 @@ const scrollerItems = computed(() => {
|
||||
header,
|
||||
...playlist.tracks.map((track) => {
|
||||
return {
|
||||
id: track.trackid,
|
||||
id: Math.random(),
|
||||
component: SongItem,
|
||||
props: {
|
||||
track: track,
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<SongItem
|
||||
:track="item.track"
|
||||
:index="index + 1"
|
||||
:isCurrent="queue.currenttrack?.hash === item.track.hash"
|
||||
:isCurrent="queue.currentid === item.trackid"
|
||||
:isCurrentPlaying="
|
||||
queue.currenttrack?.hash === item.track.hash && queue.playing
|
||||
queue.currentid === item.trackid && queue.playing
|
||||
"
|
||||
@playThis="playFromQueue(index)"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user