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