From 3bc72ce88138a5bf167c20c5db6575391cc959c6 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Wed, 16 Oct 2024 13:56:05 +0000 Subject: [PATCH] feat(ui): Improve player ui when player is stopping --- src/client/components/player/Player.tsx | 6 +++--- src/client/components/player/PlayerTimestamp.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/components/player/Player.tsx b/src/client/components/player/Player.tsx index 2321f6bc..c2c858f5 100644 --- a/src/client/components/player/Player.tsx +++ b/src/client/components/player/Player.tsx @@ -81,12 +81,12 @@ const Player = (props: PlayerProps) => {
-

{track}

-

{artists.join(' / ')}

+

{calculated !== 'stopped' ? track : '-'}

+

{calculated !== 'stopped' ? artists.join(' / ') : '-'}

Status: {capitalize(calculated)}

-

Listened: {listenedDuration.toFixed(0)}s{durPer}

+

Listened: {calculated !== 'stopped' ? `${listenedDuration.toFixed(0)}s` : '-'}{durPer}

diff --git a/src/client/components/player/PlayerTimestamp.tsx b/src/client/components/player/PlayerTimestamp.tsx index c353f6aa..ec229cfc 100644 --- a/src/client/components/player/PlayerTimestamp.tsx +++ b/src/client/components/player/PlayerTimestamp.tsx @@ -23,7 +23,7 @@ const Timestamp = (props: TimestampProps) => { {convertTime(Math.floor(props.current))}
-
+
{convertTime(Math.floor(props.duration) - Math.floor(props.current))}