SrGooglo 8482f2e457 Feat: Implement Music Library and overhaul Studio TV
- Introduces a new Music Library system for managing favorites (tracks,
  playlists, releases), replacing the previous TrackLike model.
- Completely revamps the Studio TV profile page, adding live statistics,
  stream configuration, restream management, and media URL display.
- Enhances the media player with a custom seekbar and improved audio
  playback logic for MPD and non-MPD sources.
- Lays foundational groundwork for chat encryption with new models and APIs.
- Refactors critical UI components like PlaylistView and PagePanel.
- Standardizes monorepo development scripts to use npm.
- Updates comty.js submodule and adds various new UI components.
2025-05-10 02:32:41 +00:00

53 lines
990 B
JavaScript
Executable File

import React from "react"
import * as antd from "antd"
import classnames from "classnames"
import Playlist from "@components/Music/Playlist"
import MusicModel from "@models/music"
import "./index.less"
export default (props) => {
const user_id = props.state.user._id
const [L_Releases, R_Releases, E_Releases, M_Releases] =
app.cores.api.useRequest(MusicModel.getAllReleases, {
user_id: user_id,
})
if (E_Releases) {
return (
<antd.Result
status="warning"
title="Failed to retrieve releases"
subTitle={E_Releases.message}
/>
)
}
if (L_Releases) {
return <antd.Skeleton active />
}
const isEmpty = R_Releases.items.length === 0
return (
<div
className={classnames("profile_releases", {
["empty"]: isEmpty,
})}
>
{isEmpty && (
<antd.Result
status="warning"
title="This user has no releases yet."
/>
)}
{R_Releases.items.map((r) => {
return <Playlist key={r._id} playlist={r} />
})}
</div>
)
}