Add playlistTitle
This commit is contained in:
@ -18,6 +18,15 @@ const currentPlaylistStore = useCurrentPlaylistStore();
|
||||
const progressEntries = ref<Map<string, StreamProgress200Item>>(new Map());
|
||||
let listener: EventSourceListener<StreamProgress200Item> | null = null;
|
||||
|
||||
const sortedProgressEntries = computed(() => {
|
||||
return Array.from(progressEntries.value.values())
|
||||
.sort((a, b) => {
|
||||
const timeA = a.timestamp || 0;
|
||||
const timeB = b.timestamp || 0;
|
||||
return timeB - timeA;
|
||||
});
|
||||
});
|
||||
|
||||
const unwatch = watch(() => currentPlaylistStore.id, (newId, oldId) => {
|
||||
if (newId !== -1 && newId !== oldId) {
|
||||
listenImports();
|
||||
@ -91,8 +100,7 @@ onUnmounted(() => {
|
||||
Uploaded files
|
||||
</h3>
|
||||
<div class="space-y-2">
|
||||
<UploadEntry v-for="entry in Array.from(progressEntries.values())" :key="entry.id"
|
||||
:entry="entry" />
|
||||
<UploadEntry v-for="entry in sortedProgressEntries" :key="entry.id" :entry="entry" />
|
||||
<Empty class="border border-dashed" v-if="progressEntries.size === 0">
|
||||
<EmptyHeader>
|
||||
<EmptyMedia variant="icon">
|
||||
|
||||
Reference in New Issue
Block a user