feat: added cors for web-player-backend

This commit is contained in:
Boris Cherepanov
2026-03-23 12:34:27 +03:00
parent f26135ca25
commit 310f0061d3
10 changed files with 323 additions and 39 deletions
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from 'react'
import { API_ROOT } from '../furumiApi'
export type QueueItem = {
slug: string
@@ -9,7 +10,6 @@ export type QueueItem = {
}
type QueueListProps = {
apiRoot: string
queue: QueueItem[]
order: number[]
playingOrigIdx: number
@@ -43,7 +43,6 @@ function Cover({ src }: { src: string }) {
}
export function QueueList({
apiRoot,
queue,
order,
playingOrigIdx,
@@ -78,7 +77,7 @@ export function QueueList({
if (!t) return null
const isPlaying = origIdx === playingOrigIdx
const coverSrc = t.album_slug ? `${apiRoot}/tracks/${t.slug}/cover` : ''
const coverSrc = t.album_slug ? `${API_ROOT}/tracks/${t.slug}/cover` : ''
const dur = t.duration ? fmt(t.duration) : ''
const isDragging = draggingPos === pos
const isDragOver = dragOverPos === pos