You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.2 KiB
53 lines
1.2 KiB
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import FieldSet from 'Components/FieldSet';
|
|
import PageSectionContent from 'Components/Page/PageSectionContent';
|
|
import translate from 'Utilities/String/translate';
|
|
import TagConnector from './TagConnector';
|
|
import styles from './Tags.css';
|
|
|
|
function Tags(props) {
|
|
const {
|
|
items,
|
|
...otherProps
|
|
} = props;
|
|
|
|
if (!items.length) {
|
|
return (
|
|
<div>
|
|
{translate('NoTagsHaveBeenAddedYetAddTagsToLinkArtistsWithDelayProfilesRestrictionsOrNotificationsClickLinkTohttpswikiservarrcomlidarrsettingstagshereLinkToFindOutMoreAboutTagsInLidarr')}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<FieldSet
|
|
legend={translate('Tags')}
|
|
>
|
|
<PageSectionContent
|
|
errorMessage={translate('UnableToLoadTags')}
|
|
{...otherProps}
|
|
>
|
|
<div className={styles.tags}>
|
|
{
|
|
items.map((item) => {
|
|
return (
|
|
<TagConnector
|
|
key={item.id}
|
|
{...item}
|
|
/>
|
|
);
|
|
})
|
|
}
|
|
</div>
|
|
</PageSectionContent>
|
|
</FieldSet>
|
|
);
|
|
}
|
|
|
|
Tags.propTypes = {
|
|
items: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
};
|
|
|
|
export default Tags;
|