Fixed: Links and already added icons overflowing on add artist/album search results

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
pull/1807/head
Qstick 4 years ago
parent 4d90daebf1
commit 960d738e29

@ -34,17 +34,22 @@
.content { .content {
flex: 0 1 100%; flex: 0 1 100%;
overflow: hidden;
} }
.name { .titleRow {
display: flex; display: flex;
font-weight: 300;
font-size: 36px;
} }
.artistName { .titleContainer {
display: flex;
align-items: flex-end;
flex: 0 1 auto;
}
.title {
font-weight: 300; font-weight: 300;
font-size: 20px; font-size: 36px;
} }
.year { .year {
@ -52,6 +57,14 @@
color: $disabledColor; color: $disabledColor;
} }
.icons {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1 0 auto;
height: 55px;
}
.mbLink { .mbLink {
composes: link from '~Components/Link/Link.css'; composes: link from '~Components/Link/Link.css';
@ -75,3 +88,10 @@
margin-top: 20px; margin-top: 20px;
text-align: justify; text-align: justify;
} }
@media only screen and (max-width: $breakpointMedium) {
.titleRow {
justify-content: space-between;
overflow: hidden;
}
}

@ -111,52 +111,42 @@ class AddNewAlbumSearchResult extends Component {
} }
<div className={styles.content}> <div className={styles.content}>
<div className={styles.name}> <div className={styles.titleRow}>
{title} <div className={styles.titleContainer}>
<div className={styles.title}>
{ {title}
!!disambiguation &&
<span className={styles.year}>({disambiguation})</span> {
} !!disambiguation &&
<span className={styles.year}>({disambiguation})</span>
{ }
isExistingAlbum ? </div>
<Icon </div>
className={styles.alreadyExistsIcon}
name={icons.CHECK_CIRCLE} <div className={styles.icons}>
size={20} {
title="Album already in your library" isExistingAlbum ?
/> : <Icon
null className={styles.alreadyExistsIcon}
} name={icons.CHECK_CIRCLE}
size={36}
<Link title="Already in your library"
className={styles.mbLink} /> :
to={`https://musicbrainz.org/release-group/${foreignAlbumId}`} null
onPress={this.onMBLinkPress} }
>
<Icon <Link
className={styles.mbLinkIcon} className={styles.mbLink}
name={icons.EXTERNAL_LINK} to={`https://musicbrainz.org/release-group/${foreignAlbumId}`}
size={28} onPress={this.onTVDBLinkPress}
/> >
</Link>
</div>
<div>
<span className={styles.artistName}> By: {artist.artistName}</span>
{
isExistingArtist ?
<Icon <Icon
className={styles.alreadyExistsIcon} className={styles.mbLinkIcon}
name={icons.CHECK_CIRCLE} name={icons.EXTERNAL_LINK}
size={15} size={28}
title="Artist already in your library" />
/> : </Link>
null </div>
}
</div> </div>
<div> <div>

@ -34,10 +34,20 @@
.content { .content {
flex: 0 1 100%; flex: 0 1 100%;
overflow: hidden;
} }
.name { .nameRow {
display: flex; display: flex;
}
.nameContainer {
display: flex;
align-items: flex-end;
flex: 0 1 auto;
}
.name {
font-weight: 300; font-weight: 300;
font-size: 36px; font-size: 36px;
} }
@ -47,6 +57,14 @@
color: $disabledColor; color: $disabledColor;
} }
.icons {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1 0 auto;
height: 55px;
}
.mbLink { .mbLink {
composes: link from '~Components/Link/Link.css'; composes: link from '~Components/Link/Link.css';
@ -70,3 +88,10 @@
margin-top: 20px; margin-top: 20px;
text-align: justify; text-align: justify;
} }
@media only screen and (max-width: $breakpointMedium) {
.titleRow {
justify-content: space-between;
overflow: hidden;
}
}

@ -111,44 +111,49 @@ class AddNewArtistSearchResult extends Component {
} }
<div className={styles.content}> <div className={styles.content}>
<div className={styles.name}> <div className={styles.nameRow}>
{artistName} <div className={styles.nameContainer}>
<div className={styles.name}>
{ {artistName}
!name.contains(year) && year ?
<span className={styles.year}> {
({year}) !artistName.contains(year) && year ?
</span> : <span className={styles.year}>
null ({year})
} </span> :
null
{ }
!!disambiguation && {
<span className={styles.year}>({disambiguation})</span> !!disambiguation &&
} <span className={styles.year}>({disambiguation})</span>
}
{ </div>
isExistingArtist ? </div>
<div className={styles.icons}>
{
isExistingArtist ?
<Icon
className={styles.alreadyExistsIcon}
name={icons.CHECK_CIRCLE}
size={36}
title="Already in your library"
/> :
null
}
<Link
className={styles.mbLink}
to={`https://musicbrainz.org/artist/${foreignArtistId}`}
onPress={this.onMBLinkPress}
>
<Icon <Icon
className={styles.alreadyExistsIcon} className={styles.mbLinkIcon}
name={icons.CHECK_CIRCLE} name={icons.EXTERNAL_LINK}
size={36} size={28}
title="Already in your library" />
/> : </Link>
null </div>
}
<Link
className={styles.mbLink}
to={`https://musicbrainz.org/artist/${foreignArtistId}`}
onPress={this.onMBLinkPress}
>
<Icon
className={styles.mbLinkIcon}
name={icons.EXTERNAL_LINK}
size={28}
/>
</Link>
</div> </div>
<div> <div>

Loading…
Cancel
Save