New: Artist folder hint when selecting a root folder while adding a new artist

Closes #1214
Closes #1467
This commit is contained in:
Mark McDowall 2019-08-03 18:55:31 -07:00 committed by Bogdan
parent 86130751c2
commit a16463eeb3
26 changed files with 237 additions and 30 deletions

View file

@ -9,19 +9,34 @@ function RootFolderSelectInputSelectedValue(props) {
name,
value,
freeSpace,
artistFolder,
includeFreeSpace,
isWindows,
...otherProps
} = props;
const text = value === '' ? name : `${name} [${value}]`;
const slashCharacter = isWindows ? '\\' : '/';
const text = value === '' ? name : `[${name}] ${value}`;
return (
<EnhancedSelectInputSelectedValue
className={styles.selectedValue}
{...otherProps}
>
<div className={styles.path}>
{text}
<div className={styles.pathContainer}>
<div className={styles.path}>
{text}
</div>
{
artistFolder ?
<div className={styles.artistFolder}>
{slashCharacter}
{artistFolder}
</div> :
null
}
</div>
{
@ -38,6 +53,8 @@ RootFolderSelectInputSelectedValue.propTypes = {
name: PropTypes.string,
value: PropTypes.string,
freeSpace: PropTypes.number,
artistFolder: PropTypes.string,
isWindows: PropTypes.bool,
includeFreeSpace: PropTypes.bool.isRequired
};