mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 23:40:05 +00:00
update thingys
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user