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.
76 lines
2.0 KiB
76 lines
2.0 KiB
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import Alert from 'Components/Alert';
|
|
import Icon from 'Components/Icon';
|
|
import Button from 'Components/Link/Button';
|
|
import ModalBody from 'Components/Modal/ModalBody';
|
|
import ModalContent from 'Components/Modal/ModalContent';
|
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
|
import { icons, kinds } from 'Helpers/Props';
|
|
import translate from 'Utilities/String/translate';
|
|
import styles from './OrganizeArtistModalContent.css';
|
|
|
|
function OrganizeArtistModalContent(props) {
|
|
const {
|
|
artistNames,
|
|
onModalClose,
|
|
onOrganizeArtistPress
|
|
} = props;
|
|
|
|
return (
|
|
<ModalContent onModalClose={onModalClose}>
|
|
<ModalHeader>
|
|
{translate('OrganizeSelectedArtists')}
|
|
</ModalHeader>
|
|
|
|
<ModalBody>
|
|
<Alert>
|
|
Tip: To preview a rename, select "Cancel", then select any artist name and use the
|
|
<Icon
|
|
className={styles.renameIcon}
|
|
name={icons.ORGANIZE}
|
|
/>
|
|
</Alert>
|
|
|
|
<div className={styles.message}>
|
|
Are you sure you want to organize all files in the {artistNames.length} selected artist?
|
|
</div>
|
|
|
|
<ul>
|
|
{
|
|
artistNames.map((artistName) => {
|
|
return (
|
|
<li key={artistName}>
|
|
{artistName}
|
|
</li>
|
|
);
|
|
})
|
|
}
|
|
</ul>
|
|
</ModalBody>
|
|
|
|
<ModalFooter>
|
|
<Button onPress={onModalClose}>
|
|
{translate('Cancel')}
|
|
</Button>
|
|
|
|
<Button
|
|
kind={kinds.DANGER}
|
|
onPress={onOrganizeArtistPress}
|
|
>
|
|
{translate('Organize')}
|
|
</Button>
|
|
</ModalFooter>
|
|
</ModalContent>
|
|
);
|
|
}
|
|
|
|
OrganizeArtistModalContent.propTypes = {
|
|
artistNames: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
onModalClose: PropTypes.func.isRequired,
|
|
onOrganizeArtistPress: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default OrganizeArtistModalContent;
|