diff --git a/web/src/components/layout/NowPlaying.tsx b/web/src/components/layout/NowPlaying.tsx
index 35566c6..40b1cd1 100644
--- a/web/src/components/layout/NowPlaying.tsx
+++ b/web/src/components/layout/NowPlaying.tsx
@@ -1,7 +1,8 @@
-import { X } from 'lucide-react'
-import { useEffect } from 'react'
+import { ChevronDown, ListMusic, X } from 'lucide-react'
+import { useEffect, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import { Link } from 'react-router-dom'
+import { useFriends } from '@/api/friends'
import { usePeaks } from '@/api/peaks'
import Cover from '@/components/Cover'
import FriendChip from '@/components/FriendChip'
@@ -37,6 +38,14 @@ function NowPlayingSeek({ track }: { track: QueuedTrack }) {
)
}
+/** On a friend's track: the audio comes through this server, and the friend does not see who listens. */
+function FriendNote({ friend }: { friend: number }) {
+ const { t } = useTranslation()
+ const name = useFriends().data?.find((f) => f.id === friend)?.name
+ if (!name) return null
+ return
{t('player.friendNote', { name })}
+}
+
/** The full-screen player: a big cover, the controls and what comes next. */
export default function NowPlaying() {
const { t } = useTranslation()
@@ -45,6 +54,7 @@ export default function NowPlaying() {
const queue = usePlayer((s) => s.queue)
const index = usePlayer((s) => s.index)
const jumpTo = usePlayer((s) => s.jumpTo)
+ const upNextRef = useRef(null)
// Nothing left to show (the queue was emptied): close.
useEffect(() => {
@@ -57,26 +67,37 @@ export default function NowPlaying() {