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

@@ -232,12 +232,12 @@ $art-size: 48px;
display: flex;
align-items: center;
width: min(1440px, calc(100% - 1.5rem));
height: 84px;
height: 82px;
gap: 1.25rem;
padding: 0 0.9rem;
background: #0b0c12;
background: #0b0816;
border: 1px solid rgb(255 255 255 / 0.08);
border-radius: 16px;
border-radius: 18px;
.media-bar {
&-left {
@@ -325,7 +325,7 @@ $art-size: 48px;
background: rgb(255 255 255 / 0.06);
}
&.active {
color: #7cc7ff;
color: $clr-accent-default;
}
.material-symbols-rounded {
font-size: 1.25rem;
@@ -334,11 +334,19 @@ $art-size: 48px;
}
&-play {
width: 42px !important;
height: 42px !important;
margin: 0 0.35rem;
border: 1px solid rgb(255 255 255 / 0.35);
color: #fff !important;
width: 46px !important;
height: 46px !important;
margin: 0 0.5rem;
background: #fff !important;
border: 0;
color: #0b0417 !important;
box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
transition: transform 0.15s ease;
&:hover {
background: #fff !important;
transform: scale(1.04);
}
.material-symbols-rounded {
font-size: 1.6rem !important;
}
@@ -350,7 +358,7 @@ $art-size: 48px;
.MuiSlider-root {
padding: 10px 0;
color: #7cc7ff;
color: $clr-accent-default;
}
.MuiSlider-rail {
background: rgb(255 255 255 / 0.16);
@@ -397,7 +405,7 @@ $art-size: 48px;
&-volume {
width: 84px !important;
margin: 0 0.35rem 0 0 !important;
color: #7cc7ff !important;
color: $clr-accent-default !important;
.MuiSlider-rail {
background: rgb(255 255 255 / 0.16);
+29 -4
View File
@@ -89,6 +89,9 @@ const AudioPlayer = () => {
const [remoteVolumeDraft, setRemoteVolumeDraft] = useState<number | null>(
null,
);
const remoteVolumeTimerRef = useRef<ReturnType<typeof setTimeout> | null>(
null,
);
useEffect(() => setRemoteVolumeDraft(null), [selectedRemoteId]);
const sessions = useQuery({
@@ -132,6 +135,20 @@ const AudioPlayer = () => {
: undefined;
remoteActiveRef.current = Boolean(remote);
// Keep the picked remote volume until the target reports it back (progress
// updates can lag by seconds), then drop the optimistic value.
useEffect(() => {
if (remoteVolumeDraft == null) return;
const server = remote?.PlayState?.VolumeLevel;
if (server != null && Math.abs(server / 100 - remoteVolumeDraft) <= 0.02) {
setRemoteVolumeDraft(null);
if (remoteVolumeTimerRef.current) {
clearTimeout(remoteVolumeTimerRef.current);
remoteVolumeTimerRef.current = null;
}
}
}, [remote?.PlayState?.VolumeLevel, remoteVolumeDraft]);
const activeItem: BaseItemDto | undefined | null =
remote?.NowPlayingItem ?? item;
const artists = activeItem?.ArtistItems?.length
@@ -198,7 +215,9 @@ const AudioPlayer = () => {
// visibility rather than the DOM: during the exit animation the element is
// still mounted but already off-screen.
const isFullPlayer =
location.pathname === "/player" || location.pathname === "/player/audio";
location.pathname === "/player" ||
location.pathname === "/player/audio" ||
location.pathname === "/remote";
useEffect(() => {
const visible = barVisible && !isFullPlayer;
document.body.classList.toggle("has-player-bar", visible);
@@ -735,7 +754,13 @@ const AudioPlayer = () => {
onChangeCommitted={(_, value) => {
if (!remote) return;
const next = Array.isArray(value) ? value[0] : value;
setRemoteVolumeDraft(null);
setRemoteVolumeDraft(next);
if (remoteVolumeTimerRef.current) {
clearTimeout(remoteVolumeTimerRef.current);
}
remoteVolumeTimerRef.current = setTimeout(() => {
setRemoteVolumeDraft(null);
}, 12000);
sendGeneral(GeneralCommandType.SetVolume, {
Volume: String(Math.round(next * 100)),
});
@@ -797,13 +822,13 @@ const AudioPlayer = () => {
<MenuItem
onClick={() => {
setMoreAnchor(null);
openRemoteDialog();
navigate({ to: "/remote" });
}}
>
<ListItemIcon>
<span className="material-symbols-rounded">settings_remote</span>
</ListItemIcon>
<ListItemText primary="Удалённое управление…" />
<ListItemText primary="Удалённый пульт" />
</MenuItem>
<Divider />
<MenuItem