mirror of
https://github.com/navidrome/navidrome.git
synced 2026-04-28 11:29:38 +00:00
Add Genres as "Chips" in Album details and Song details
This commit is contained in:
parent
e2233779f1
commit
054b5eafdb
12 changed files with 171 additions and 98 deletions
|
|
@ -2,18 +2,19 @@ import React, { memo } from 'react'
|
|||
import Typography from '@material-ui/core/Typography'
|
||||
import sanitizeFieldRestProps from './sanitizeFieldRestProps'
|
||||
import md5 from 'blueimp-md5'
|
||||
import { useRecordContext } from 'react-admin'
|
||||
|
||||
export const MultiLineTextField = memo(
|
||||
({
|
||||
className,
|
||||
emptyText,
|
||||
source,
|
||||
record,
|
||||
firstLine,
|
||||
maxLines,
|
||||
addLabel,
|
||||
...rest
|
||||
}) => {
|
||||
const record = useRecordContext(rest)
|
||||
const value = record && record[source]
|
||||
let lines = value ? value.split('\n') : []
|
||||
if (maxLines || firstLine) {
|
||||
|
|
@ -46,7 +47,6 @@ export const MultiLineTextField = memo(
|
|||
)
|
||||
|
||||
MultiLineTextField.defaultProps = {
|
||||
record: {},
|
||||
addLabel: true,
|
||||
firstLine: 0,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue