feat: revamp the entire audio player with a refreshed look and cleanup audioPlayer code

This commit is contained in:
--remove-section committed 2025-12-26 20:27:05 +05:30
1 parent 1c8c048df0
commit ad8d8545e9
16 files changed
+1587 -771

No files matched your search

+20 -11
View File
@@ -1,21 +1,18 @@
import { getRuntimeMusic } from "@/utils/date/time";
import useQueue from "@/utils/store/queue";
import { useSortable } from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
import { Typography } from "@mui/material";
import { IconButton, Typography } from "@mui/material";
import React from "react";
import { getRuntimeMusic } from "@/utils/date/time";
import useQueue from "@/utils/store/queue";
type Props = {
track: BaseItemDto;
index: number;
onRemove?: () => void;
};
const QueueTrack = (props: Props) => {
const { track, index } = props;
const { track, index, onRemove } = props;
const [currentItemIndex] = useQueue((s) => [s.currentItemIndex]);
const { attributes, listeners, setNodeRef, transform, transition } =
@@ -50,9 +47,21 @@ const QueueTrack = (props: Props) => {
{track.Artists?.join(", ")}
</Typography>
</div>
<Typography className="opacity-07">
{getRuntimeMusic(track.RunTimeTicks ?? 0)}
</Typography>
<div style={{ display: "flex", alignItems: "center", gap: "0.5em" }}>
<Typography className="opacity-07">
{getRuntimeMusic(track.RunTimeTicks ?? 0)}
</Typography>
{onRemove && (
<IconButton size="small" onClick={onRemove}>
<span
className="material-symbols-rounded"
style={{ fontSize: "1.2em" }}
>
close
</span>
</IconButton>
)}
</div>
</div>
);
};