feat(music): redesign the music section around the player

- album, playlist and artist pages share one layout: sleeve with a record edge, large title, metadata, full-width track list and an about block
- full-screen player: wall colour from the cover's blurhash, large sleeve, transport at the bottom, queue sliding out from under the cover
- queue rows show current/upcoming tracks with covers, hearts and durations; lyrics open in the same panel
- bottom bar follows: floating capsule, white play button and accent progress
- artist page rebuilt with a round portrait, tabs and an album grid
- music library gets a calmer grid and an aligned alphabet rail
This commit is contained in:
1xDed committed 2026-12-01 02:48:05 +03:00
1 parent fcf61012db
commit 9f314582c0
13 files changed
+2105 -1505

No files matched your search

+34 -40
View File
@@ -1,21 +1,19 @@
import type {
BaseItemDto,
BaseItemDtoQueryResult,
} from "@jellyfin/sdk/lib/generated-client";
import React from "react";
import { useSnackbar } from "notistack";
import lyricsIcon from "../../assets/icons/lyrics.svg";
import { getRuntimeMusic } from "@/utils/date/time";
import {
generateAudioStreamUrl,
playAudio,
useAudioPlayback,
} from "@/utils/store/audioPlayback";
import type {
BaseItemDto,
BaseItemDtoQueryResult,
} from "@jellyfin/sdk/lib/generated-client";
import { Typography } from "@mui/material";
import React from "react";
import { getRuntimeMusic } from "@/utils/date/time";
import { useApiInContext } from "@/utils/store/api";
import { useCentralStore } from "@/utils/store/central";
import { setQueue } from "@/utils/store/queue";
import { useSnackbar } from "notistack";
import lyricsIcon from "../../assets/icons/lyrics.svg";
import LikeButton from "../buttons/likeButton";
import "./albumMusicTrack.scss";
@@ -62,46 +60,42 @@ export default function AlbumMusicTrack(props: AlbumMusicTrackProps) {
setQueue(queue, index);
}
};
const isPlaying = currentPlayingItem?.Id === track.Id;
const artists = track.Artists?.filter(Boolean) ?? [];
return (
<div
className={
currentPlayingItem?.Id === track.Id
? "item-info-track playing"
: "item-info-track"
}
key={track.Id}
className={isPlaying ? "album-track is-playing" : "album-track"}
onClick={() => {
if (musicTracks?.Items) {
handlePlayback(trackIndex, track, musicTracks.Items);
}
}}
>
<div className="index-container">
<span className="material-symbols-rounded fill ">play_arrow</span>
<Typography className="index">{track.IndexNumber ?? "-"}</Typography>
<div className="album-track-index">
<span className="material-symbols-rounded album-track-play">
play_arrow
</span>
<span className="album-track-number">
{track.IndexNumber ?? "–"}
</span>
</div>
<div className="item-info-track-info">
<Typography className="item-info-track-info-name">
{track.Name}
</Typography>
<Typography
variant="subtitle2"
style={{
opacity: 0.6,
display: "flex",
alignItems: "center",
gap: "0.6em",
}}
sx={{
fontWeight: 300,
}}
>
{track.HasLyrics && <img src={lyricsIcon} alt="Текст песни" />}
{track.Artists?.join(", ")}
</Typography>
<div className="album-track-info">
<span className="album-track-name">{track.Name}</span>
{(artists.length > 0 || track.HasLyrics) && (
<span className="album-track-artist">
{track.HasLyrics && (
<img src={lyricsIcon} alt="Есть текст песни" />
)}
{artists.join(", ")}
</span>
)}
</div>
<Typography>{getRuntimeMusic(track.RunTimeTicks ?? 0)}</Typography>
<div className="flex flex-align-center">
<span className="album-track-duration">
{getRuntimeMusic(track.RunTimeTicks ?? 0)}
</span>
<div className="album-track-like" onClick={(e) => e.stopPropagation()}>
<LikeButton
itemId={track.Id}
isFavorite={track.UserData?.IsFavorite}