Small UI Tweaks, Fix Banner Images When Artist Deleted

pull/6/head
Qstick 7 years ago
parent 75aa8af9d2
commit 6718d82432

@ -45,7 +45,13 @@ class InteractiveEpisodeSearchRow extends Component {
// Listeners
onGrabPress = () => {
this.props.onGrabPress(this.props.guid, this.props.indexerId);
const {
guid,
indexerId,
onGrabPress
}= this.props;
onGrabPress(guid, indexerId);
}
//

@ -61,9 +61,11 @@ class ArtistBanner extends Component {
if (nextBanner && (!banner || nextBanner.url !== banner.url)) {
this.setState({
banner: nextBanner,
posterUrl: getBannerUrl(nextBanner, pixelRatio * size),
isLoaded: false,
bannerUrl: getBannerUrl(nextBanner, pixelRatio * size),
hasError: false
// Don't reset isLoaded, as we want to immediately try to
// show the new image, whether an image was shown previously
// or the placeholder was shown.
});
}
}

@ -62,8 +62,10 @@ class ArtistPoster extends Component {
this.setState({
poster: nextPoster,
posterUrl: getPosterUrl(nextPoster, pixelRatio * size),
isLoaded: false,
hasError: false
// Don't reset isLoaded, as we want to immediately try to
// show the new image, whether an image was shown previously
// or the placeholder was shown.
});
}
}

@ -21,7 +21,6 @@ $hoverScale: 1.05;
.bannerContainer {
position: relative;
background-color: #ffffff;
}
.link {

@ -1,7 +1,16 @@
$hoverScale: 1.05;
.container {
&:hover {
.content {
background-color: $tableRowHoverBackgroundColor;
}
}
}
.content {
display: flex;
flex-grow: 1;
}
.poster {

@ -113,91 +113,93 @@ class ArtistIndexOverview extends Component {
return (
<div className={styles.container} style={style}>
<div className={styles.poster} style={elementStyle}>
<div className={styles.posterContainer}>
{
status === 'ended' &&
<div
className={styles.ended}
title="Ended"
/>
}
<Link
className={styles.link}
style={elementStyle}
to={link}
>
<ArtistPoster
className={styles.poster}
<div className={styles.content}>
<div className={styles.poster}>
<div className={styles.posterContainer}>
{
status === 'ended' &&
<div
className={styles.ended}
title="Ended"
/>
}
<Link
className={styles.link}
style={elementStyle}
images={images}
size={250}
lazy={false}
overflow={true}
/>
</Link>
</div>
to={link}
>
<ArtistPoster
className={styles.poster}
style={elementStyle}
images={images}
size={250}
lazy={false}
overflow={true}
/>
</Link>
</div>
<ArtistIndexProgressBar
monitored={monitored}
status={status}
trackCount={trackCount}
trackFileCount={trackFileCount}
posterWidth={posterWidth}
detailedProgressBar={overviewOptions.detailedProgressBar}
/>
</div>
<ArtistIndexProgressBar
monitored={monitored}
status={status}
trackCount={trackCount}
trackFileCount={trackFileCount}
posterWidth={posterWidth}
detailedProgressBar={overviewOptions.detailedProgressBar}
/>
</div>
<div className={styles.info}>
<div className={styles.titleRow}>
<Link
className={styles.title}
to={link}
>
{artistName}
</Link>
<div className={styles.actions}>
<SpinnerIconButton
name={icons.REFRESH}
title="Refresh artist"
isSpinning={isRefreshingArtist}
onPress={onRefreshArtistPress}
/>
<div className={styles.info}>
<div className={styles.titleRow}>
<Link
className={styles.title}
to={link}
>
{artistName}
</Link>
<div className={styles.actions}>
<SpinnerIconButton
name={icons.REFRESH}
title="Refresh Artist"
isSpinning={isRefreshingArtist}
onPress={onRefreshArtistPress}
/>
<IconButton
name={icons.EDIT}
title="Edit Artist"
onPress={this.onEditArtistPress}
/>
</div>
</div>
<IconButton
name={icons.EDIT}
title="Edit Artist"
onPress={this.onEditArtistPress}
<div className={styles.details}>
<Link
className={styles.overview}
style={{
maxHeight: `${height}px`
}}
to={link}
>
<Truncate lines={Math.floor(height / (defaultFontSize * lineHeight))}>
{overview}
</Truncate>
</Link>
<ArtistIndexOverviewInfo
height={height}
nextAiring={nextAiring}
qualityProfile={qualityProfile}
showRelativeDates={showRelativeDates}
shortDateFormat={shortDateFormat}
timeFormat={timeFormat}
{...overviewOptions}
{...otherProps}
/>
</div>
</div>
<div className={styles.details}>
<Link
className={styles.overview}
style={{
maxHeight: `${height}px`
}}
to={link}
>
<Truncate lines={Math.floor(height / (defaultFontSize * lineHeight))}>
{overview}
</Truncate>
</Link>
<ArtistIndexOverviewInfo
height={height}
nextAiring={nextAiring}
qualityProfile={qualityProfile}
showRelativeDates={showRelativeDates}
shortDateFormat={shortDateFormat}
timeFormat={timeFormat}
{...overviewOptions}
{...otherProps}
/>
</div>
</div>
<EditArtistModalConnector

Loading…
Cancel
Save