fix cloudflare fr?

This commit is contained in:
2026-03-12 20:51:59 +01:00
parent c6f2f9cc5a
commit dba1fda6ca
10 changed files with 45 additions and 39 deletions

View File

@@ -3,8 +3,9 @@ import type { Song, CollectionPreview } from "../script/types";
import { useAudio } from "@/composables/useAudio";
import { ref } from "vue";
import { RouterLink } from "vue-router";
import { useUser } from "@/composables/useUser";
const audioStore = useAudio();
const userStore = useUser();
const props = defineProps<{
songs: Song[];
@@ -39,7 +40,7 @@ function highlightText(text: string, searchterm: string) {
<ul>
<li v-for="(song, index) in props.songs" :key="index" class="rounded-lg">
<button @click="update(song.hash)" class="flex">
<img :src="encodeURI(song.previewimage + '?h=120&w=120')" class="w-12 h-12" />
<img :src="encodeURI(`${userStore.cloudflareUrl.value}/${song.previewimage ? song.previewimage + '?h=120&w=120' : '/default-bg.png'}`)" class="w-12 h-12" />
<p class="ml-2 overflow-hidden text-ellipsis text-nowrap">
<span v-html="highlightText(song.name, search)"></span> -
<span v-html="highlightText(song.artist, props.search)"></span>