Various UI Fixes and Updates

Closes #188
Closes #185
Closes #187
This commit is contained in:
Qstick 2018-01-25 22:01:53 -05:00
parent 3beac03c00
commit 54e9f88648
89 changed files with 2354 additions and 995 deletions

View file

@ -78,6 +78,10 @@ class AddNewArtistSearchResult extends Component {
isSmallScreen
} = this.props;
const {
isNewAddArtistModalOpen
} = this.state;
const linkProps = isExistingArtist ? { to: `/artist/${foreignArtistId}` } : { onPress: this.onPress };
let albums = '1 Album';
@ -88,78 +92,78 @@ class AddNewArtistSearchResult extends Component {
const height = calculateHeight(230, isSmallScreen);
return (
<Link
className={styles.searchResult}
{...linkProps}
>
{
!isSmallScreen &&
<div>
<Link
className={styles.searchResult}
{...linkProps}
>
{
!isSmallScreen &&
<ArtistPoster
className={styles.poster}
images={images}
size={250}
/>
}
}
<div>
<div className={styles.name}>
{artistName}
<div>
<div className={styles.name}>
{artistName}
{
!name.contains(year) && !!year &&
{
!name.contains(year) && !!year &&
<span className={styles.year}>({year})</span>
}
}
{
!!disambiguation &&
{
!!disambiguation &&
<span className={styles.year}>({disambiguation})</span>
}
}
{
isExistingArtist &&
<Icon
className={styles.alreadyExistsIcon}
name={icons.CHECK_CIRCLE}
size={36}
title="Already in your library"
{
isExistingArtist &&
<Icon
className={styles.alreadyExistsIcon}
name={icons.CHECK_CIRCLE}
size={36}
title="Already in your library"
/>
}
</div>
<div>
<Label size={sizes.LARGE}>
<HeartRating
rating={ratings.value}
iconSize={13}
/>
}
</div>
</Label>
<div>
<Label size={sizes.LARGE}>
<HeartRating
rating={ratings.value}
iconSize={13}
/>
</Label>
{
!!artistType &&
<Label size={sizes.LARGE}>
{artistType}
</Label>
}
{
!!artistType &&
<Label size={sizes.LARGE}>
{artistType}
</Label>
}
{
!!albumCount &&
<Label size={sizes.LARGE}>
{albums}
</Label>
}
{
!!albumCount &&
<Label size={sizes.LARGE}>
{albums}
</Label>
}
{
status === 'ended' &&
<Label
kind={kinds.DANGER}
size={sizes.LARGE}
>
Ended
</Label>
}
</div>
{
status === 'ended' &&
<Label
kind={kinds.DANGER}
size={sizes.LARGE}
>
Ended
</Label>
}
</div>
<div>
<div
className={styles.overview}
style={{
@ -173,10 +177,10 @@ class AddNewArtistSearchResult extends Component {
/>
</div>
</div>
</div>
</Link>
<AddNewArtistModal
isOpen={this.state.isNewAddArtistModalOpen && !isExistingArtist}
isOpen={isNewAddArtistModalOpen && !isExistingArtist}
foreignArtistId={foreignArtistId}
artistName={artistName}
year={year}
@ -184,7 +188,7 @@ class AddNewArtistSearchResult extends Component {
images={images}
onModalClose={this.onAddArtistModalClose}
/>
</Link>
</div>
);
}
}

View file

@ -4,7 +4,6 @@ import ReactDOM from 'react-dom';
import TetherComponent from 'react-tether';
import { icons, kinds } from 'Helpers/Props';
import Icon from 'Components/Icon';
import SpinnerIcon from 'Components/SpinnerIcon';
import FormInputButton from 'Components/Form/FormInputButton';
import Link from 'Components/Link/Link';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';

View file

@ -43,7 +43,7 @@ class ImportArtistSelectFolderConnector extends Component {
const newRootFolders = _.differenceBy(items, prevProps.items, (item) => item.id);
if (newRootFolders.length === 1) {
this.props.push(`${window.Sonarr.urlBase}/add/import/${newRootFolders[0].id}`);
this.props.push(`${window.Lidarr.urlBase}/add/import/${newRootFolders[0].id}`);
}
}
}