Handling long playlist comments (#2973)

Closes #1737

* wrapping playlist comment in a <Collapse> element

* Extract common collapsible logic into a component

---------

Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Tim
2024-04-26 02:28:25 +02:00
committed by GitHub
parent cf66594b6d
commit 8f9ed1b994
7 changed files with 77 additions and 61 deletions
+2 -6
View File
@@ -1,9 +1,7 @@
import React from 'react'
import { Card, CardContent, Typography } from '@material-ui/core'
import { makeStyles } from '@material-ui/core/styles'
import { useTranslate } from 'react-admin'
import { DurationField, SizeField } from '../common'
import Linkify from '../common/Linkify'
import { CollapsibleComment, DurationField, SizeField } from '../common'
const useStyles = makeStyles(
(theme) => ({
@@ -52,9 +50,7 @@ const PlaylistDetails = (props) => {
<Typography variant="h5" className={classes.title}>
{record.name || translate('ra.page.loading')}
</Typography>
<Typography component="h6">
<Linkify text={record.comment} />
</Typography>
<CollapsibleComment record={record} />
<Typography component="p">
{record.songCount ? (
<span>