update thingys

This commit is contained in:
2025-05-25 23:27:42 +02:00
parent 6058a96258
commit 5d8aa468e8
13 changed files with 891 additions and 944 deletions

View File

@@ -18,8 +18,8 @@ const fetchCollections = async () => {
if (isLoading.value) return;
isLoading.value = true;
const response = await api.musicBackendCollections(offset.value, limit.value);
let songs = mapApiToCollectionPreview(response.data.songs)
const response = await api.musicBackendSearchCollections("", limit.value, offset.value);
let songs = mapApiToCollectionPreview(response.data.collections)
collections.value = [...collections.value, ...songs];
offset.value += limit.value;
@@ -46,8 +46,8 @@ onMounted(async () => {
</script>
<template>
<main class="flex-1 text-center flex flex-col h-full overflow-y-scroll">
<div class="flex flex-col overflow-scroll collection-container">
<main class="flex-1 text-center flex flex-col h-full overflow-y-hidden">
<div class="flex flex-col overflow-y-scroll collection-container">
<CollectionListItem v-for="(collection, index) in collections" :key="index" :collection="collection" />
</div>
</main>

View File

@@ -1,7 +1,7 @@
<template>
<main class="flex-1 flex-col overflow-hidden">
<div class="flex-1 flex-col h-full overflow-y-scroll song-container">
<main class="flex-1 flex-col">
<div class="flex-1 flex-col h-full overflow-y-hidden song-container">
<p class="p-1 rounded-full backdrop--light shadow-xl text-center">History</p>
<p v-if="songs.length === 0">No songs found</p>
<SongItem v-for="(song, index) in songs" :key="song.hash" :song="song" />

View File

@@ -91,7 +91,7 @@ function reset() {
<div>
<p>{{ userStore.user.value.name }}</p>
<p>{{ userStore.user.value.endpoint == "" ? 'Not Connected' : 'Connected' }}</p>
<p>Sharing: <button @click="share" class="border bordercolor rounded-lg p-0.5">{{ userStore.user.value.share
<p>Sharing: <button @click="userStore.user.value.share" class="border bordercolor rounded-lg p-0.5">{{ userStore.user.value.share
}}</button></p>
<button @click="getMe" class="border bordercolor rounded-lg p-0.5"> Refresh
</button>

View File

@@ -27,11 +27,6 @@ async function fetchActiveSearch(term: string) {
const songData = mapApiToSongs(response.data.songs)
songData.forEach((song: Song) => {
song.previewimage = `${userStore.baseUrl.value}/api/v1/images/${song.previewimage}`
song.url = `${userStore.baseUrl.value}/api/v1/audio/${song.url}`
})
activesongs.value = songData
if (response.data.artist) artists.value = [response.data.artist]